VXI VT1538A user manual Stepper Motor Control Use the command

Page 41
Stepper Motor Control Use the command

Stepper Motor Control Use the command

SOURce:FUNCtion:STEPper <preset_pos>,<mode>,<max_vel>,<min_vel >,(@<ch_list>)

to control stepper motors. The E1538 can operate 2 or 4 phase motors in full, and half step mode. Position values are sent from the algorithm to the first channel of a 2 or 4 channel "motor group". The algorithm reads the current position from the second channel of the group.

Four-phase stepper motors that require less than 100mA phase current can be directly driven by the SCP. See Figure 29 for a connection diagram that also shows the required user-supplied output protection components.

<preset_pos> defines the position count at algorithm start-up.

<mode> is used to select the stepping mode. the allowable values are:

Table 1. Stepping <mode> values

 

 

 

 

 

 

 

<mode> string

Stepping Mode

Speed

Channel

 

 

 

 

 

 

 

 

MFSFC2

Full

Full

2

 

 

 

 

 

 

 

 

MFSFC4

Full

Full

4

 

 

 

 

 

 

 

 

MFSHC2

Full

Half

2

 

 

 

 

 

 

 

 

MFSHC4

Full

Half

4

 

 

 

 

 

 

 

 

MHSFC2

Half

Full

4

 

 

 

 

 

 

 

 

 

 

 

 

 

<min_vel> is specified in steps per second and is the beginning step rate at the start of the 14 or 38 step ramp-up to <max_vel>.

<max_vel> is specified in steps per second and is the maximum step rate that will be sent to the motor after ramp-up is complete.

Figure 25 shows the relationship between these parameters. A related error message: 3120, "Minimum velocity parameter must not exceed maximum velocity parameter."

Figure 25. Relationship of min_vel, and max_vel

<ch_list> specifies the channels that will control stepper motors. A

Agilent E1538A Enhanced Frequency/Totalize/PWM SCP 37

Image 41
Contents Irvine, CA 949 82-0093-000 Release April 28 VXI Technology, Inc 2031 Main StreetENHANCED FREQUENCY/TOTALIZE/ PWM SIGNAL CONDITIONING PLUG-ON VT1538AVXI Technology, Inc Static DAC Products INTRODUCTIONDynamic DAC Products VXI Technology World Headquarters SUPPORT RESOURCESVXI Technology Cleveland Division VXI Technology Lake Stevens Instrument DivisionSignal Conditioning Plug-on User’s and SCPI Programming ManualAgilent Technologies E1538A Enhanced Frequency/Totalize/PWM Agilent 75000 Series CPage Agilent E1538A Enhanced Frequency/Totalize/PWM SCP About this ManualIntroduction Identifying the Plug-on IMPORTANT Configuring Channel Pull-up Resistor Setting Configuration SwitchesConfiguring Input- Output direction Connecting To The Terminal Module Installation8 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Recommended Signal ConnectionsFigure 4. E1419A Option 11 Terminal Module Connections Input and Output Characteristics VRS Mode Input Operation SCP channels 0 & 1 only Programming With SCPI Commands Configuring I/O Direction Configuring the ChannelsSetting the Input Threshold Level Checking the ID of the SCPreturns threshold value Determining the Input Threshold LevelTo set channels 40 through 43 to input digital states Reading Static Digital StateTotalize Positive or Negative Edge State Changes About Period and Frequency Measurements To measure frequency at channel 45 with aperture of 1 second For PERiod function, the E1538 spports two distinct measurement ranges To measure period at channel 45 as the average of 1000 signal periods chlist specifies the channels that will read pulse widths Sense Quadrature Position The value read by the algorithm can range from Example of Rotational Velocity Sense Output Static Digital State Programming Output ChannelsControlling Output Polarity Variable Width Pulse Per Trigger 26 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Variable Width Pulse Train PWMFigure 17. Output Pulse-Width-Modulated Signal Variable Frequency Fixed Width Pulse Train FM 28 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Variable Frequency Square-Wave Pulse Train FMFigure 19. Output Square Wave Variable Frequency FM Rotationally Positioned Pulse Output Rotational Pulse Command Usage Rotational Pulse Mode Variable Angular Position, Preset Pulse Width by angleExample of variable position, preset width Variable Angular Position, Preset Pulse Width by timeFigure 21. Variable Position, Width Preset by Angle 32 Agilent E1538A Enhanced Frequency/Totalize/PWM SCPFigure 22. Variable Position, Width Preset by Time Variable Pulse Width by angle, Preset Angular Position34 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Example of variable width by angle, preset positionExample of variable width by time, preset position Variable Pulse Width by time, Preset Angular Positionpreset ch 47 pulse width to 15ms preset ch 46 pulse width to 10msFigure 24. Fixed Position, Variable Width by Time 36 Agilent E1538A Enhanced Frequency/Totalize/PWM SCPStepper Motor Control Use the command motor phase channel group can not be split across SCPs Figure 28. Half Step Mode, Full Speed, 4-Channel Figure 27. Full Step Mode, Full and Half Speed, 4-Channel40 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Figure 29. Directly Driving 4-Phase Stepper MotorsRST and *TST important Command Syntax SCPI Command ReferenceFor newer PageDiscussed INPutPOLarity? INPutPOLarityParameters CommentsINPutTHResholdLEVel? level can be set to a resolution ofINPutTHResholdLEVel OUTPutPOLarity? OUTPutPOLaritySend with VXIplug&play Function hpe14XXcmdReal64Q generatedRST Condition .001 sec Send with VXIplug&play Function hpe14XXcmd SENSeFREQuencyAPERtureSENSeFREQuencyLIMitLOWer Related Commands SENSFREQAPERSENSeFREQuencyAPERture? INIT SENSeFREQuencyLIMitLOWer? Related Commands INPutPOLaritySENSeFUNCtionCONDition Returned Value .01667 to 250, The type is float32SENSeFUNCtionPERiod SENSeFUNCtionFREQuencySENSeFUNCtionQUADrature SENSeFUNCtionPWIDthUsage See “Sense Quadrature Position” on page SENSeFUNCtionRVELocity54 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Usage See “Sense Rotational Velocity” on pageUsage See “Totalize Positive or Negative Edge State Changes” on page SENSeFUNCtionTOTalizeSENSePERiodAPERture SENSePERiodLIMitUPPer SENSePERiodAPERture?58 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP SENSePERiodMODE SENSePERiodLIMitUPPer?RST Condition is “APERture” SENSePERiodMODE mode,@chlist selects the measurementSENSePERiodMODE? Related Commands SENSePERiodMODESENSePERiodNPERiods interval mode currently set for period measurementSend with VXIplug&play Function hpe14XXcmdInt32Q SENSePERiodNPERiods?SENSePERiodRANGeUPPer RST Condition is Send with VXIplug&play Function hpe14XXcmd SENSeTOTalizeRESetMODESENSePERiodRANGeUPPer? SOURceFMSTATe SENSeTOTalizeRESetMODE?Send with VXIplug&play Function hpe14XXcmdInt16Q SOURceFMSTATe?SOURceFUNCtionRPULse SOURceFUNCtionSHAPePULSe SOURceFUNCtionSHAPeCONDitionComments Send with VXIplug&play Function hpe14XXcmd SOURceFUNCtionSHAPeSQUareSOURceFUNCtionSTEPper 68 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Table 3. Stepping mode valuesFigure 31. Relationship of minvel, and maxvel Usage See “Stepper Motor Control” on page SOURcePULMSTATeSOURcePULSePERiod SOURcePULMSTATe?SOURcePULSeWIDTh SOURcePULSePERiod?33,554,430 to 33,554,430 SOURcePULSeWIDTh?SOURceRPULsePOSitionANGLe Usage SOURceRPULsePOSitionANGLe?SOURRPULseVARType 74 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP SOURRPULseVARType?SOURceRPULseWIDThANGLe 00000787 to SOURceRPULseWIDThANGLe?SOURceRPULseWIDThTIME 76 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP SOURceRPULseWIDThTIME?Usage SOURRPULSEWIDTTIME? @147 General Specifications SpecificationsOutput Characteristics Input CharacteristicsResolution Hz 1 mSec to 1 Second, resolutionTotalizer Frequency MeasurementPulse Width Measure Rotational Velocity MeasureFrequency Source Pulse SourceRotational Pulse Source Characteristics80 Agilent E1538A Enhanced Frequency/Totalize/PWM SCP Extra Tooth Wheel