VXI VT1538A user manual Example of variable width by angle, preset position

Page 38
*RST
SENS:FUNC:RVEL 12,MISS,(@140) SOUR:FUNC:RPULSE (@140),(@145:147) SOUR:RPULSE:POS:ANGL 20,(@145)
SOUR:RPULSE:POS:ANGL 140,(@146) SOUR:RPULSE:POS:ANGL 260,(@147) SOUR:RPULSE:VART ANGL,(@145:147)

SOURce:RPULse:POSition[:ANGLe] <degrees>,(@<ch_list>), to preset the angular pulse position in degrees. The algorithm will control the pulse duration.

SOUR:RPULse:VARType ANGLe,(@<ch_list>) to set the type of value that will vary with algorithm control (in this case pulse width ANGLe).

Example of variable width (by angle), preset position:

Set up channel 40 as the reference channel, and channels 45 through 47 to output variable width pulses:

sense rvel for reference channel 3 rotational pulse output chans preset channel 45 pulse position to 20 degrees

preset channel 46 pulse position to 140 degrees

preset channel 47 pulse position to 260 degrees

algorithm will control pulse width by ANGLE

Algorithm outputs pulses on all three channels with variable width.

ALG:DEF ’ALG1’,’static float Width1, Width2, Width3;O145 = Width1; O146 = Width2; O147 = Width3;’

ALG:SCALAR’ALG1’,’Width1’,5

preset ch 45’s pulse width to 5°

ALG:SCALAR’ALG1’,’Width2’,10

preset ch 46’s pulse width to 10°

ALG:SCALAR’ALG1’,’Width3’,15

preset ch 47’s pulse width to 15°

ALG:UPDATE

.

INIT

start algorithm execution

 

calculate NewWidth(n)

 

ALG:SCALAR 'ALG1','Width1',NewWidth1

ALG:SCALAR 'ALG1','Width2',NewWidth2

ALG:SCALAR 'ALG1','Width3',NewWidth3

later, adjust channel 45’s width while algorithm is running later, adjust channel 46’s width while algorithm is running later, adjust channel 47’s width while algorithm is running

ALG:UPDATE

34 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP

Image 38
Contents VT1538A VXI Technology, Inc Introduction Support Resources User’s and Scpi Programming Manual Page Agilent E1538A Enhanced Frequency/Totalize/PWM SCP About this ManualIntroduction Identifying the Plug-on Important Setting Configuration Switches Switch Location and Example SettingsInstallation Connecting To The Terminal ModuleRecommended Signal Connections E1419A Option 11 Terminal Module ConnectionsInput and Output Characteristics Recommended Connections and Voltage LimitsVRS Mode Input Operation SCP Channels 0 & 1 only E1538A Input/Output CharacteristicsProgramming With Scpi Commands Shows the VRS mode input characteristicsConfiguring I/O Direction Setting the Input Threshold LevelDetermining the Input Threshold Level Inppol NormReading Static Digital State To set channels 40 through 43 to input digital statesTotalize Positive or Negative Edge State Changes Init SENSDATACVT? @44About Period Frequency Measurements SENSDATACVT? @45 SENSDATACVT? @45 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Sense Quadrature Position Sensfuncquad 0,@148,149RPS Example of Rotational Velocity Sense Sense Rotational VelocityControlling Output Polarity Output Static Digital StateVariable 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 Example of variable position, preset width RST Sensfuncrvel 12,MISS,@140Variable Position, Width Preset by Time Example of variable width by angle, preset position Example of variable width by time, preset position Fixed Position, Variable Width by AngleALGSCALAR’ALG1’,’Width2’,.010 Stepper Motor Control Use the command Stepping mode valuesSensfuncvolt @100 Full Step Mode, Full and Half Speed, 4-Channel Page RST and *TST important Scpi Command Reference Command Syntax For newer Units onlyCommand Syntax For newer Units only Discussed Parameters INPutPOLarityINPutPOLarity? CommentsINPutTHResholdLEVel? Level can be set to a resolutionINPutTHResholdLEVel Send with VXIplug&play Function hpe14XXcmdReal64Q OUTPutPOLarityOUTPutPOLarity? SENSeFREQuencyAPERture SENSeFREQuencyLIMitLOWer Related Commands SensfreqaperSENSeFREQuencyAPERture? Init SENSeFUNCtionCONDition Related Commands INPutPOLaritySENSeFREQuencyLIMitLOWer? SENSeFUNCtionFREQuency SENSeFUNCtionPERiodSENSeFUNCtionPWIDth SENSeFUNCtionQUADratureSENSeFUNCtionRVELocity RPS SENSeFUNCtionTOTalize SENSePERiodAPERture SENSePERiodAPERture? SENSePERiodLIMitUPPerInit SENSePERiodLIMitUPPer? SENSePERiodMODESENSePERiodNPERiods Related Commands SENSePERiodMODESENSePERiodMODE? Send with VXIplug&play Function hpe14XXcmdInt32Q SENSePERiodNPERiods?SENSePERiodRANGeUPPer RST Condition is Send with VXIplug&play Function hpe14XXcmd SENSeTOTalizeRESetMODESENSePERiodRANGeUPPer? SENSeTOTalizeRESetMODE? SOURceFMSTATeSOURceFMSTATe? Send with VXIplug&play Function hpe14XXcmdInt16QSOURceFUNCtionRPULse SOURceFUNCtionSHAPeCONDition SOURceFUNCtionSHAPePULSeComments Send with VXIplug&play Function hpe14XXcmd SOURceFUNCtionSHAPeSQUareSOURceFUNCtionSTEPper Relationship of minvel, and maxvel SOURcePULMSTATe Usage See Stepper Motor Control onSOURcePULMSTATe? SOURcePULSePERiodSOURcePULSePERiod? SOURcePULSeWIDTh33,554,430 to 33,554,430 SOURcePULSeWIDTh?SOURceRPULsePOSitionANGLe Usage SOURceRPULsePOSitionANGLe?SOURRPULseVARType SOURRPULseVARType? SOURceRPULseWIDThANGLe00000787 to SOURceRPULseWIDThANGLe?SOURceRPULseWIDThTIME SOURceRPULseWIDThTIME? Specifications General SpecificationsFrequency Measurement Pulse Width Measure Rotational Pulse Source