VXI VT1538A user manual Sense Quadrature Position, Sensfuncquad 0,@148,149

Page 25

Sense Quadrature Position

This means that the E1538 will convert a digital quadrature signal pair into an absolute 24-bit count. The count value can be read by the algorithm.

The E1538’s quadrature position function increments a counter value each time there is a transition on either of the quadrature channel pair. When the lower numbered channel’s signal LEADS the higher numbered channel, the function counts up. When the lower numbered channel LAGS the higher numbered channel, the function counts down.

To configure a pair of channels to sense quadrature count use [SENSe:]FUNCtion:QUADrature [<count_preset>,](@<ch_list>)

<count_preset> if included, allows presetting the absolute counter associated with the channel pair. All quadrature pairs in <ch_list> will be preset to the same value. If not included, the default count at algorithm start will be zero. <count_preset> can range from 0 to 16,777,215. The variable type is int32

<ch_list> must always specify both channels of a pair. More than one pair can be specified. Both channels of any pair must be adjacent. <ch_list> can specify channels on more than one E1538. The channel numbers in <ch_list> must be in ascending order. The related error messages are:

3115, "Channels specified are not in ascending order."

3116, "Multiple channels specified are not grouped correctly." 3117, "Grouped channels are not adjacent."

3122, "This multiple channel function must not span multiple SCPs."

The algorithm reads the current count through the low numbered channel. The count is an unsigned 24-bit value ranging from 0 to 16,777,215. The counter can roll over from 16,777,2215 to 0, and roll under from 0 to 16,777,215 is 16,777,215.

To configure channels 42 and 43 as one quadrature pair, and channels 48 and 49 as another pair

*RST

 

SENS:FUNC:QUAD 8192,(@142,143)

pair 42&43 preset to count of

SENS:FUNC:QUAD 0,(@148,149)

8192

pair 48&49 preset to 0

algorithm will retrieve values from input channels and place in CVT elements

ALG:DEF ’ALG1’,’writecvt(I142,42); writecvt(I148,48);’

INIT

start algorithm execution

begin loop

loops between here and end loop

SENS:DATA:CVT? (@42,48)

get quadrature position count

display or otherwise use count info

 

end loop

 

Agilent E1538A Enhanced Frequency/Totalize/PWM SCP 21

Image 25
Contents VT1538A VXI Technology, Inc Introduction Support Resources User’s and Scpi Programming Manual Page About this Manual Agilent E1538A Enhanced Frequency/Totalize/PWM SCPIntroduction Identifying the Plug-on Important Switch Location and Example Settings Setting Configuration SwitchesConnecting To The Terminal Module InstallationE1419A Option 11 Terminal Module Connections Recommended Signal ConnectionsRecommended Connections and Voltage Limits Input and Output CharacteristicsE1538A Input/Output Characteristics VRS Mode Input Operation SCP Channels 0 & 1 onlyShows the VRS mode input characteristics Programming With Scpi CommandsSetting the Input Threshold Level Configuring I/O DirectionInppol Norm Determining the Input Threshold LevelTo set channels 40 through 43 to input digital states Reading Static Digital StateInit SENSDATACVT? @44 Totalize Positive or Negative Edge State ChangesAbout Period Frequency Measurements SENSDATACVT? @45 SENSDATACVT? @45 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Sensfuncquad 0,@148,149 Sense Quadrature PositionRPS Sense Rotational Velocity Example of Rotational Velocity SenseOutput Static Digital State Controlling Output PolarityVariable Width Pulse Per Trigger Variable Width Pulse Train PWM Variable Frequency Fixed Width Pulse Train FM Variable Frequency Square-Wave Pulse Train Rotationally Positioned Pulse Output Rotational Pulse Command Usage Algupdate Init RST Sensfuncrvel 12,MISS,@140 Example of variable position, preset widthVariable Position, Width Preset by Time Example of variable width by angle, preset position Fixed Position, Variable Width by Angle Example of variable width by time, preset positionALGSCALAR’ALG1’,’Width2’,.010 Stepping mode values Stepper Motor Control Use the commandSensfuncvolt @100 Full Step Mode, Full and Half Speed, 4-Channel Page RST and *TST important Command Syntax For newer Units only Scpi Command ReferenceCommand Syntax For newer Units only Discussed INPutPOLarity? INPutPOLarityParameters CommentsINPutTHResholdLEVel Level can be set to a resolutionINPutTHResholdLEVel? OUTPutPOLarity? OUTPutPOLaritySend with VXIplug&play Function hpe14XXcmdReal64Q SENSeFREQuencyAPERture SENSeFREQuencyAPERture? Related Commands SensfreqaperSENSeFREQuencyLIMitLOWer Init SENSeFREQuencyLIMitLOWer? Related Commands INPutPOLaritySENSeFUNCtionCONDition SENSeFUNCtionPERiod SENSeFUNCtionFREQuencySENSeFUNCtionQUADrature SENSeFUNCtionPWIDthSENSeFUNCtionRVELocity RPS SENSeFUNCtionTOTalize SENSePERiodAPERture SENSePERiodLIMitUPPer SENSePERiodAPERture?Init SENSePERiodMODE SENSePERiodLIMitUPPer?SENSePERiodMODE? Related Commands SENSePERiodMODESENSePERiodNPERiods SENSePERiodRANGeUPPer SENSePERiodNPERiods?Send with VXIplug&play Function hpe14XXcmdInt32Q SENSePERiodRANGeUPPer? SENSeTOTalizeRESetMODERST Condition is Send with VXIplug&play Function hpe14XXcmd SOURceFMSTATe SENSeTOTalizeRESetMODE?Send with VXIplug&play Function hpe14XXcmdInt16Q SOURceFMSTATe?SOURceFUNCtionRPULse SOURceFUNCtionSHAPePULSe SOURceFUNCtionSHAPeCONDitionSOURceFUNCtionSTEPper SOURceFUNCtionSHAPeSQUareComments Send with VXIplug&play Function hpe14XXcmd Relationship of minvel, and maxvel Usage See Stepper Motor Control on SOURcePULMSTATeSOURcePULSePERiod SOURcePULMSTATe?SOURcePULSeWIDTh SOURcePULSePERiod?SOURceRPULsePOSitionANGLe SOURcePULSeWIDTh?33,554,430 to 33,554,430 SOURRPULseVARType SOURceRPULsePOSitionANGLe?Usage SOURceRPULseWIDThANGLe SOURRPULseVARType?SOURceRPULseWIDThTIME SOURceRPULseWIDThANGLe?00000787 to SOURceRPULseWIDThTIME? General Specifications SpecificationsFrequency Measurement Pulse Width Measure Rotational Pulse Source