Bootstrak Skip to main content

3. Operating Modes

Streszczenie: Tryby pracy napędu wybierane zmienną desired state (0x24): tryby prądowe (programowany, analogowy, PWM), prędkościowe (programowany, analogowy, PWM) i pozycyjne (programowany z generatorem trajektorii, analogowy, puls/kierunek, puls góra/dół, kwadratura) oraz bazowanie. Dla każdego trybu podano tabelę zmiennych i przykładową sekwencję komend.
EN: Operating modes selected with the desired state variable 0x24: current, velocity and position modes plus homing, with variable tables and command examples.

Dotyczy: serwonapędy Copley Controls z interfejsem ASCII (RS-232, sieć multi-drop CAN), program CME 2
Źródło: dokumentacja producenta (Copley Controls ASCII Interface Programmer’s Guide); tabele przepisane z obrazów na tekst – opracowanie Multiprojekt

This chapter describes the variables related to the amplifier’s operating modes. Contents include: 

3.1:1 Desired State Variable

The amplifier desired state variable (0x24) defines the amplifier’s operating mode and which input source controls it. Mode-specific values are mentioned in the remaining sections of this chapter. The relevant values are described in the table below:

Desired state (variable 0x24) – values

ValueState
0Disabled. NOTE: If the desired state is saved to flash as 0, then CME 2 assumes the amplifier has not been programmed, and when CME connects to the amplifier, the Basic Set Up screen opens.
1The current loop is driven by the programmed current value.
2The current loop is driven by the analog command input.
3The current loop is driven by the PWM & direction input pins.
4The current loop is driven by the internal function generator.
5The current loop is driven by UV commands via PWM inputs.
11The velocity loop is driven by the programmed velocity value.
12The velocity loop is driven by the analog command input.
13The velocity loop is driven by the PWM & direction input pins.
14The velocity loop is driven by the internal function generator.
21In servo mode, the position loop is driven by the trajectory generator.
22In servo mode, the position loop is driven by the analog command input.
23In servo mode, the position loop is driven by the digital inputs (pulse & direction, master encoder, etc).
24In servo mode, the position loop is driven by the internal function generator.
25In servo mode, the position loop is driven by the camming function.
30In servo mode, the position loop is driven by the CANopen interface.
31In microstepping mode, the position loop is driven by the trajectory generator.
33In microstepping mode, the position loop is driven by the digital inputs (pulse & direction, master encoder, etc).
34In microstepping mode, the position loop is driven by the internal function generator.
35In microstepping mode, the position loop is driven by the camming function.
40In microstepping mode, the amplifier is driven by the CANopen interface.
42Micro-stepping diagnostic mode. The current loop is driven by the programmed current value, and the phase angle is micro-stepped.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Desired state (variable 0x24) – values

3.2:2 Current Mode

3.2.1:1 Programmed Current Mode

The Programmed Current Mode sets the output of the amplifier at a programmed current level. When the amplifier is enabled in this mode, or when the programmed current level is changed, the output current ramps to the new level at the programmed rate.

Programmed Current Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 1 = Programmed Current Mode.
0x02R FProgrammed current value. Units: 0.01 A.
0x6aR FCurrent ramp rate. Units: mA/second. A value of zero in this register results in a step change.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Programmed Current Mode Variables

NOTE: When changing both the level and the ramp parameters while the amplifier is enabled, change the ramp rate first.

Programmed Current Mode Example

Enable the amplifier in Programmed Current Mode. Ramp the output current up to 2 A in 0.5 seconds. The controller monitors the output current, and after it reaches 2 A the current is ramped down to 1 A in 2 seconds.

CommandResponseComment
s r0x6a 4000okSet ramp rate to 4 A/second.
s r0x02 200okSet the output level to 2 A.
s r0x24 1okEnable the amplifier in Programmed Current Mode. Output current will start increasing at a rate of 4 A/second.
The controller uses the following command to monitor the output current.
g r0x0cv 150Reads actual current output from the amplifier. Example displays a returned value equal to 1.50 A.
After the output current reaches 2 A, the controller sends the new ramp and level parameters.
s r0x6a 4000okSet new ramp rate of 0.5 A/second.
s r0x02 100okChange the output level to 1 A. Output current will start decreasing at a rate of 0.5 A/second.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Current Mode › Programmed Current Mode › Programmed Current Mode Example

3.2.2:2 Analog Current Mode

In the Analog Current Mode, the current output of the amplifier is proportional to the analog reference input command signal.

Analog Current Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 2 = Analog Current Mode.
0x19R FAnalog input scaling factor. Amount of current commanded per 10 volts of input. Units: 0.01 A.
0x26R FAnalog input dead band. Units: mV.
0x1aR FAnalog input offset. Units: mV.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Analog Current Mode Variables

NOTE: Variables 0x19, 0x26 and 0x1a are used in Analog Current, Velocity and Position modes. Verify that these variables are set correctly before switching between these modes of operation. 

Analog Current Mode Example

The controller sets the scaling, enables the amplifier in Analog Current Mode, monitors the current output, and changes the scaling to a new value. 

CommandResponseComment
s r0x19 1000okSet scaling factor to 10V = 10A.
s r0x24 2okSet amplifier to Analog Current Mode.
The controller uses the following command to monitor the output current.
g r0x0cv 525Reads actual current output from the amplifier. Example displays a returned value equal to 5.25 A.
The controller changes the scaling factor.
s r0x19 100okSet scaling factor to 10V = 1A.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Current Mode › Analog Current Mode › Analog Current Mode Example

3.2.3:3 PWM Current Mode

In the PWM Current Mode, the current output of the amplifier is proportional to the duty cycle of the input command signal. In most applications the command signal configuration is set using CME 2 and not changed during operation. 

PWM Current Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 3 = PWM Current Mode.
0xa9R FDigital input scaling factor. Amount of current commanded at 100 percent duty cycle. Units: 0.01 A.
0xa8R FDigital input command configuration normally set using the CME 2 PWM Command screen. See table below for definition of the values.
Original image of the table (from the PDF manual)

image.pngOriginal table image: PWM Current Mode Variables

NOTE: Variables 0xa9 and 0xa8 are used in PWM Current and Velocity modes. Verify that these variables are set correctly before switching between these modes of operation. 

PWM Current Mode Example

The controller sets the scaling, enables the amplifier in PWM Current Mode, and monitors commanded and actual current. 

CommandResponseComment
s r0xa9 1000okSet scaling factor to 10A.
s r0x24 3okEnable the amplifier in PWM Current Mode.
The controller uses the following commands to monitor the commanded and output currents.
g r0x15v 500Reads commanded current from the amplifier. Example displays a returned value equal to 5 A.
g r0x0cv 495Reads actual current output from the amplifier. Example displays a returned value equal to 4.95 A.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Current Mode › PWM Current Mode › PWM Current Mode Example

PWM Current Mode Command Signal Configuration

If required during operation, the PWM command signal configuration can be changed by setting the value of variable 0xa8 as shown below

Values of variable 0xa8 (PWM input configuration)

PWM Input TypeInvert PWM InputInvert Sign InputAllow 100% OutputValue
50%No--No0x00
50%No--Yes0x08
50%Yes--No0x02
50%Yes--Yes0x0a
100%NoNoNo0x01
100%NoNoYes0x09
100%NoYesNo0x05
100%NoYesYes0x0d
100%YesNoNo0x03
100%YesNoYes0x0b
100%YesYesNo0x07
Original image of the table (from the PDF manual)

image.pngOriginal table image: Values of variable 0xa8 (PWM input configuration)

3.3:3 Velocity Mode

3.3.1:1 Programmed Velocity Mode

The Programmed Velocity Mode sets the output of the amplifier to a programmed motor velocity. When the amplifier is enabled in this mode, or when the programmed velocity is changed, the motor velocity will ramp to the new level at the programmed rate.

Programmed Velocity Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 11 = Programmed Velocity Mode.
0x2fR FProgrammed velocity command. Units: 0.1 counts/second.
0x36R FVelocity acceleration limit. Units: 1000 counts/second².
0x37R FVelocity deceleration limit. Units: 1000 counts/second².
0x39R FFast stop ramp. Units: 1000 counts/second².
Original image of the table (from the PDF manual)

image.pngOriginal table image: Programmed Velocity Mode Variables

Programmed Velocity Mode Example

The controller sets the velocity parameters, enables the amplifier in Programmed Velocity Mode, monitors the actual motor velocity, and then changes the velocity.

CommandResponseComment
s r0x36 2okSet acceleration limit to 2000 counts/second².
s r0x37 4okSet deceleration limit to 4000 counts/second².
s r0x2f 10000okSet the programmed velocity to 1000 counts/second.
s r0x24 11okEnable the amplifier in Programmed Velocity Mode.
The controller uses the following commands to monitor the motor velocity.
g r0x18v 10010Reads actual velocity from the amplifier. Example displays a returned value equal to 1001 counts/second.
The controller sets a new velocity of 500 counts/second.
s r0x2f 5000okSet the programmed velocity to 500 counts/second. Motor will decelerate at 4000 counts/second² to 500 counts/second.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Velocity Mode › Programmed Velocity Mode › Programmed Velocity Mode Example

3.3.2:2 Analog Velocity Mode

In the Analog Velocity Mode, the motor velocity is proportional to the analog reference input command signal.

Analog Velocity Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 12 = Analog Velocity Mode.
0x19R FAnalog input scaling factor. Velocity commanded per 10 volts of input. Units: 0.1 counts/second.
0x26R FAnalog input dead band. Units: mV.
0x1aR FAnalog input offset. Units: mV.
0x36R FVelocity acceleration limit. Units: 1000 counts/second².
0x37R FVelocity deceleration limit. Units: 1000 counts/second².
0x39R FFast stop ramp. Units: 1000 counts/second².
Original image of the table (from the PDF manual)

image.pngOriginal table image: Analog Velocity Mode Variables

NOTE: Variables 0x19, 0x26 and 0x1a are used in Analog Current, Velocity and Position modes. Verify that these variables are set correctly before switching between these modes of operation.

Analog Velocity Mode Example

The controller sets the scaling, enables the amplifier in Analog Velocity Mode, monitors the actual motor velocity, and changes the scaling. 

CommandResponseComment
s r0x19 10000okSet scaling factor to 1000 counts/second.
s r0x24 12okEnable the amplifier in Analog Velocity Mode.
The controller uses the following command to monitor the actual motor velocity.
g r0x18v 5000Reads actual velocity from the amplifier. Example displays a returned value equal to 500.0 counts/second.
The controller changes the scaling factor.
s r0x19 7000okSet scaling factor to 700 counts/second.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Velocity Mode › Analog Velocity Mode › Analog Velocity Mode Example

3.3.3:3 PWM Velocity Mode

In the PWM Velocity Mode, the motor velocity is proportional to the duty cycle of the input command signal. In most applications the command signal configuration is set using CME 2 and not changed during operation.

PWM Velocity Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 13 = PWM Velocity Mode.
0xa9R FScaling Factor. Velocity command at 100 percent duty cycle. Units: 0.1 counts/second.
0x36R FVelocity acceleration limit. Units: 1000 counts/second².
0x37R FVelocity deceleration limit. Units: 1000 counts/second².
0x39R FFast stop ramp. Units: 1000 counts/second².
0xa8R FDigital input command configuration. This is normally set using the CME 2 PWM Command screen. See table below for the definition of the values.
Original image of the table (from the PDF manual)

image.pngOriginal table image: PWM Velocity Mode Variables

NOTE: Variables 0xa9 and 0xa8 are used in PWM Current and Velocity modes. Verify that these variables are set correctly before switching between these modes of operation.

PWM Velocity Mode Example

The controller sets the PWM scaling, enables the amplifier in PWM Velocity Mode, and monitors the commanded and actual velocity. 

CommandResponseComment
s r0xa9 800000okSet scaling factor to 80000 counts/second at 100%.
s r0x24 13okEnable the amplifier in PWM Velocity Mode.
The controller uses the following commands to monitor the commanded and actual motor velocities.
g r0x2cv 49995Reads commanded velocity from the amplifier. Example displays a returned value equal to 4999.5 counts/second.
g r0x18v 49991Reads actual velocity from the amplifier. Example displays a returned value equal to 4999.1 counts/second.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Velocity Mode › PWM Velocity Mode › PWM Velocity Mode Example

PWM Velocity Mode Command Signal Configuration

If required during operation, the PWM command signal configuration can be changed by setting the value of variable 0xa8 as shown below. 

Values of variable 0xa8 (PWM input configuration)

PWM Input TypeInvert PWM InputInvert Sign InputAllow 100% OutputValue
50%No--No0x00
50%No--Yes0x08
50%Yes--No0x02
50%Yes--Yes0x0a
100%NoNoNo0x01
100%NoNoYes0x09
100%NoYesNo0x05
100%NoYesYes0x0d
100%YesNoNo0x03
100%YesNoYes0x0b
100%YesYesNo0x07
Original image of the table (from the PDF manual)

image.pngOriginal table image: Values of variable 0xa8 (PWM input configuration)

3.4:4 Position Mode

3.4.1:1 Updating Trajectory Variables in Position Modes

When the amplifier enters a position mode, the trajectory variables (velocity, acceleration and deceleration) are copied into the trajectory generator. To change any of them after the amplifier is in a position mode, send the new value to the appropriate variable and then send a t 1command.

3.4.2:2 Programmed Position Mode

In the Programmed Position Mode, the axis moves to target positions sent to the amplifier over the serial interface. The target positions can be absolute or relative from the current position. The motion profile used can be set to trapezoidal or S-curve.

To initiate a move, first set the appropriate variables and then send the trajectory command t 1 to start the move (see Trajectory (t) Generator Command, p. 17). When using the trapezoidal profile, the move parameters can be changed during the move. Again, first set the appropriate variables and then send another t 1 command. When the t 1 command is received, the target position, absolute / relative, velocity, acceleration and deceleration rates will be updated. In this manner, the move in progress can be changed. The S-curve profile cannot be updated in this manner.

To abort a move in progress, send a t 0 command. This will stop the move in progress using the abort deceleration rate. The amplifier will remain enabled.

A special velocity mode can be used to move the axis using the velocity, acceleration and deceleration of the trapezoidal profile but with no specific target position. Direction of motion is set by entering a “1” or “-1” into the position command variable. Once started, the move will continue until the velocity variable is set to zero and a t 1 command is sent or a t 0 abort command is sent.

Programmed Position Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 21 = Programmed Position Mode, Servo; 31 = Programmed Position Mode, Stepper.
0xc8R FProfile type: 0 = Absolute move, trapezoidal profile; 1 = Absolute move, S-curve profile; 256 = Relative move, trapezoidal profile; 257 = Relative move, S-curve profile; 2 = Velocity move.
0xcaR FPosition command. Units: counts. Relative move = the distance of the move. Absolute move = the target position of the move. Velocity move = 1 for positive direction, -1 for negative direction.
0xcbR FMaximum velocity. Units: 0.1 counts/second.
0xccR FMaximum acceleration rate. Units: 10 counts/second².
0xcdR FMaximum deceleration rate. Units: 10 counts/second².
0xceR FMaximum jerk rate. Units: 100 counts/second³.
0xcfR FAbort deceleration rate. Units: 10 counts/second².
Original image of the table (from the PDF manual)

image.pngOriginal table image: Programmed Position Mode Variables

NOTES: 1) Maximum jerk rate is not used in the trapezoidal profile. 2) In the S-curve profile, the maximum deceleration rate is note used. The maximum acceleration rate is used for both acceleration and deceleration. 

Programmed Position Mode Example

The controller sets profile parameters, executes an absolute trapezoidal move to position 40,000 counts, monitors for move completion, and then executes a relative move of 10,000 counts using the same profile parameters. 

CommandResponseComment
s r0xc8 0okSet the trajectory generator to absolute move, trapezoidal profile.
s r0xca 40000okSet the position command to 40000 counts.
s r0xcb 70000okSet maximum velocity to 7000 counts/second.
s r0xcc 200000okSet maximum acceleration to 2000000 counts/second².
s r0xcd 200000okSet maximum deceleration to 2000000 counts/second².
s r0x24 21okEnable the amplifier in Programmed Position (Trajectory Generator) Mode.
The controller verifies actual axis position before starting move.
g r0x32v 0Read actual position. Example displays an actual position of 0.
t 1okExecute the move.
The controller monitors the event status register to determine when the move has been completed.
g r0xa0v 134217728The controller monitors bit 27 of the event status register to determine when the move is complete. Example displays a status register value of 134217728. When this is decoded, it shows that bit 27 is set meaning the axis is in motion.
After the controller determines that motion has stopped, it checks the trajectory status register to see if the move was aborted for any reason.
g r0xc9v 4096The controller checks bit 14 of the trajectory status register to determine if the move was aborted. Example displays a status register value of 4096. When this is decoded, it shows that bit 14 is not set meaning the move was not aborted.
The controller sets the trajectory configuration and commanded position variables to their new values and executes the new move.
s r0xc8 256okSet the trajectory generator to relative move, trapezoidal profile.
s r0xca 10000okSet the position command to 10000 counts.
t 1okExecute the move.
The controller aborts the move.
t 0okMotion stops and the amplifier is left enabled.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Position Mode › Programmed Position Mode › Programmed Position Mode Example

3.4.3:3 Analog Position Mode

In the Analog Position Mode, the axis position is commanded by the analog reference input command signal.

The analog position command operates as a relative motion command. When the amplifier is enabled the voltage on the analog input is read. Then any change in the command voltage will move the axis a relative distance, equal to the change in voltage, from its position when enabled.

To use the analog position command as an absolute position command, the amplifier should be homed every time it is enabled.

Analog Position Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 22 = Analog Position Mode.
0x19R FAnalog input scaling factor. Commanded position per 10 volts of input. Units: counts.
0x26R FDead band. Units: mV.
0x1aR FAnalog input offset. Set to 0 when in this mode of operation.
0xcbR FMaximum velocity. Units: 0.1 counts/second.
0xccR FMaximum acceleration rate. Units: 10 counts/second².
0xcdR FMaximum deceleration rate. Units: 10 counts/second².
0xcfR FAbort deceleration rate. Units: 10 counts/second².
Original image of the table (from the PDF manual)

image.pngOriginal table image: Analog Position Mode Variables

NOTES: 1) Variables 0x19, 0x26 and 0x1a are used in Analog Current, Velocity and Position modes. Verify that these variables are set correctly before switching between these modes of operation. 2) To invert the direction of motion with respect to the polarity of the command voltage, set the scaling factor as a negative value. 

Analog Position Mode Example

The controller sets the move parameters, homes the axis and then places the amp in the Analog Position Mode. The controller monitors actual position. The controller then changes the maximum velocity and scaling factor. 

CommandResponseComment
s r0x19 4000okSet analog scaling to 4000 counts per 10V.
s r0xcb 70000okSet velocity to 7000 counts/second.
s r0xcc 20000okSet acceleration to 200000 counts/second².
s r0xcd 20000okSet deceleration to 200000 counts/second².
s r0x24 21okAmplifier set in Programmed Position Mode required for homing.
t 2okExecute homing. Assumes all homing parameters have been previously set.
The controller monitors the trajectory status register to determine when the axis has been homed.
g r0xc9v 8192Controller checks bit 12 of the trajectory status register to determine if the axis was homed successfully. Example displays a status register value of 8192. Decoded, this value shows that bit 12 is not set, meaning the axis has not finished homing.
After a successful homing, the controller changes the amplifier’s operating mode.
s r0x24 22okAmplifier set in Analog Position Mode.
t 1okThis command will guarantee all new move parameters are in effect.
The controller monitors actual motor position.
g r0x32v 2012Reads actual motor position from the amplifier. Example displays a returned value equal to 2012 counts.
The controller changes velocity and scaling variables.
s r0xcb 20000okSet velocity to 2000 counts/second.
s r0x19 1000okSet analog scaling to 1000 counts / 10V input.
t 1okThis command required for new velocity to take effect.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Position Mode › Analog Position Mode › Analog Position Mode Example

3.4.4:4 Pulse and Direction Mode

In the Pulse and Direction Position Mode, the axis position is commanded by pulses applied to one of the amplifiers digital inputs. The direction of the commanded move is determined by the logic level of a second digital input. 

The scaling factor sets the ratio of position command, in counts, for each input pulse. This ratio is stored in variable 0xa9 as two 16 bit words. The first word stores the numerator or number of position counts. The second stores the denominator or the number of input pulses.

Example: To set a ratio of 10 counts of position change for every input pulse. The ration would be 10/1. To make sending the data easier, it should be converted to hex word format so the ratio would now be 0x000a / 0x0001. The two words can now simply be combined and sent to the amplifier by sending the command s r0xa9 0x000a0001.

To invert the direction, the numerator should be set to a negative value.

Example: Changing direction of the previous example would require a ratio of -10/1. Using the 2’s complement method, -10 is represented as 0xfff6 hex. The ratio in hex would now be 0xfff6 / 0x001. Combining these words, the command to be sent would be s r0xa9 0xfff60001.

Pulse and Direction Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 23 = Digital Input Position Mode, Servo; 33 = Digital Input Position Mode, Stepper.
0xa8R FDigital Command Configuration – Pulse and Direction: 0 = Increment position on rising edge; 4096 = Increment position on falling edge.
0xa9R FScaling factor. Output counts/Input pulses.
0xcbR FMaximum velocity. Units: 0.1 counts/second.
0xccR FMaximum acceleration rate. Units: 10 counts/second².
0xcdR FMaximum deceleration rate. Units: 10 counts/second².
0xcfR FAbort deceleration rate. Units: 10 counts/second².
Original image of the table (from the PDF manual)

image.pngOriginal table image: Pulse and Direction Mode Variables

Pulse and Direction Mode Example

The controller sets the move parameters, places the amp in the Pulse and Direction Position Mode, monitors commanded and actual position, and then changes the scaling factor

CommandResponseComment
s r0xa8 0okConfigure the digital inputs to pulse and direction with the position incrementing on the rising edge of the input pulse.
s r0xa9 0x00020001okSet scaling factor to 2 output counts per input pulse.
s r0xcb 70000okSet velocity to 7000 counts/second.
s r0xcc 20000okSet acceleration to 200000 counts/second².
s r0xcd 20000okSet deceleration to 200000 counts/second².
s r0x24 23okEnable the amplifier in Digital Input Position Mode.
The controller monitors commanded and actual motor position.
g r0x3dv 4000Reads commanded position from the amplifier. Example displays a returned value equal to 4000 counts.
g r0x32v 2012Reads actual motor position from the amplifier. Example displays a returned value equal to 2012 counts.
The controller changes the scaling variable.
s r0xa9 0x00010001okSet scaling factor to 1 output count per input pulse.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Position Mode › Pulse and Direction Mode › Pulse and Direction Mode Example

3.4.5:5 Pulse Up/Down Mode

In the Pulse Up/Down Position Mode, the axis position is commanded by pulses applied to the amplifiers digital inputs. The direction of the commanded move is determined by which of the digital inputs the pulses are applied to.

The scaling factor sets the ratio of position command, in counts, for each input pulse. It is stored in variable 0xa9 as two 16 bit words. The first word stores the numerator or number of position counts. The second stores the denominator or the number of input pulses.

Example: To set a ratio of 10 counts of position change for every input pulse. The ration would be 10/1. To make sending the data easier, it should be converted to hex word format so the ratio would now be 0x000a / 0x0001. The two words can now simply be combined and sent to the amplifier by sending the command s r0xa9 0x000a0001. To invert the direction, the numerator should be set to a negative value.

Example: Changing direction of the previous example would require a ratio of -10/1. Using the 2’s complement method, -10 is represented as 0xfff6 in hex format. The ratio in hex format would now be 0xfff6 / 0x001. Combining these words, the command to be sent would be s r0xa9 0xfff60001.

Pulse Up/Down Mode Variables

Variable
ID
BankDescription
0x24R FDesired state: 0 = Disabled; 23 = Digital Input Position Mode, Servo; 33 = Digital Input Position Mode, Stepper.
0xa8R FDigital Command Configuration – Pulse Up/Down Mode: 256 = Increment position on rising edge; 4352 = Increment position on falling edge.
0xa9R FInput / Output Ratio.
0xcbR FMaximum velocity. Units: 0.1 counts/second.
0xccR FMaximum acceleration rate. Units: 10 counts/second².
0xcdR FMaximum deceleration rate. Units: 10 counts/second².
0xcfR FAbort deceleration rate. Units: 10 counts/second².
Original image of the table (from the PDF manual)

image.pngOriginal table image: Pulse Up/Down Mode Variables

Pulse Up/Down Mode Example

The controller sets the move parameters and then places the amp in the Pulse Up/Down Position Mode, monitors commanded and actual position, and then changes the scaling factor. 

CommandResponseComment
s r0xa8 256okConfigure the digital inputs to pulse up/down with the position incrementing on the rising edge of the input pulse.
s r0xa9 0x000f0001okSet scaling factor to 15 output counts per input pulse.
s r0xcb 70000okSet velocity to 7000 counts/second.
s r0xcc 20000okSet acceleration to 200000 counts/second².
s r0xcd 20000okSet deceleration to 200000 counts/second².
s r0x24 23okEnable the amplifier in Digital Input Position Mode.
The controller monitors commanded and actual motor position.
g r0x3dv 4000Reads commanded position from the amplifier. Example displays a returned value equal to 4000 counts.
g r0x32v 2012Reads actual motor position from the amplifier. Example displays a returned value equal to 2012 counts.
The controller changes the scaling variable.
s r0xa9 0x00010001okSet scaling factor to 1 output count per input pulse.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Position Mode › Pulse Up/Down Mode › Pulse Up/Down Mode Example

3.4.6:6 Quadrature Mode

In the Quadrature Position Mode, the axis position is commanded by a master encoder with its A and B channels applied to the amplifier’s digital inputs.

The scaling factor sets the ratio of position command, in counts, for each count of the master encoder. The scaling factor is stored in 0xa9 as two 16 bit words. Word 1 stores the numerator or number of position counts. Word 2 stores the denominator or the number of input counts.

Example: To set a ratio of 10 counts of position change for every input count, the ratio would be 10/1. To make sending the data easier, the ratio should be converted to its hex equivalent (0x000a/0x0001). The two words can now be combined and sent to the amplifier by sending the command s r0xa9 0x000a0001.

To invert the direction, the numerator should be set to a negative value.

Example: Changing direction of the previous example would require a ratio of -10/1. Using the 2’s complement method, -10 is represented as 0xfff6 in hex format. The ratio in hex format would now be 0xfff6/0x001. Combining these words, the command to be sent would be s r0xa9 0xfff60001.

Quadrature Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 23 = Digital Input Position Mode, Servo; 33 = Digital Input Position Mode, Stepper.
0xa8R FDigital Command Configuration: 512 = Quadrature Mode.
0xa9R FInput / Output Ratio.
0xcbR FMaximum velocity. Units: 0.1 counts/second.
0xccR FMaximum acceleration rate. Units: 10 counts/second².
0xcdR FMaximum deceleration rate. Units: 10 counts/second².
0xcfR FAbort deceleration rate. Units: 10 counts/second².
Original image of the table (from the PDF manual)

image.pngOriginal table image: Quadrature Mode Variables

Quadrature Mode Example

The controller sets the move parameters, enables the amplifier in the Quadrature Position Mode, and monitors commanded and actual position. 

CommandResponseComment
s r0xa8 512okConfigure the digital inputs to quadrature position mode.
s r0xa9 0x00010001okSet scaling factor to 1 output counts per input pulse.
s r0xcb 70000okSet velocity to 7000 counts/second.
s r0xcc 20000okSet acceleration to 200000 counts/second².
s r0xcd 20000okSet deceleration to 200000 counts/second².
s r0x24 23okEnable the amplifier in Digital Input Position Mode.
The controller monitors commanded and actual motor position.
g r0x3dv 4000Reads commanded position from the amplifier. Example displays a returned value equal to 4000 counts.
g r0x32v 2012Reads actual motor position from the amplifier. Example displays a returned value equal to 2012 counts.
The controller disables the amplifier.
s r0x24 0okDisable the amplifier.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Position Mode › Quadrature Mode › Quadrature Mode Example

3.4.7:7 Homing Mode

Homing sequences can be performed using the t 2 command when the amplifier is in Programmed Position Mode (servo or stepper). In most applications the homing sequence is configured using CME 2 and not changed during operation.

Homing Mode Variables

Variable IDBankDescription
0x24R FDesired state: 0 = Disabled; 21 = Programmed Position Mode, Servo; 31 = Programmed Position Mode, Stepper. This is the required mode for homing.
0xc2R FHoming Method. See table below for values.
0xc3R FFast Velocity. Units: 0.1 counts/second.
0xc4R FSlow Velocity. Units: 0.1 counts/second.
0xc5R FAcceleration / Deceleration. Units: 10 counts/second².
0xc6R FHome Offset. Units: counts.
0xc7R FCurrent Limit. Units: 0.01 Amps.
0xbfR FCurrent Delay Time. Units: milliseconds.
0xb8R FPositive Software Limit. Units: counts.
0xb9R FNegative Software Limit. Units: counts.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Homing Mode Variables

Homing Example

The controller modifies the homing parameters, enables the amplifier in the Programmed Position Mode, initiates a homing sequence and then monitors homing status

CommandResponseComment
Setting the homing parameters is only required if the home sequence stored in flash memory is not satisfactory.
s r0xc2 544okSets the homing method to use the next index pulse as home.
s r0xc4 40000okSets the slow velocity to 4000 counts/second.
s r0xc6 1000okSets the home offset to 1000 counts.
s r0x24 21okEnables the amplifier in programmed position mode.
t 2okStarts the homing sequence.
The controller monitors the trajectory status register to determine when the homing sequence is complete.
g r0xc9v 20480Controller checks bit 12 of the trajectory status register to determine if the axis was homed successfully. Example displays a status register value of 20480. Decoded, this value shows that bit 12 is set meaning the axis is referenced.
Original image of the table (from the PDF manual)

image.pngOriginal table image: Position Mode › Homing Mode › Homing Example

Homing Methods (0xc2)

For a full description of the methods listed below, see Homing Method Descriptions

Homing methods – values of variable 0xc2

MethodStart DirectionValue
Set Current Position as Home-----512
Next IndexPositive544
Next IndexNegative560
Limit SwitchPositive513
Limit SwitchNegative529
Limit Switch Out to IndexPositive545
Limit Switch Out to IndexNegative561
Home SwitchPositive514
Home SwitchNegative530
Home Switch Out to IndexPositive546
Home Switch Out to IndexNegative562
Home Switch In to IndexPositive610
Home Switch In to IndexNegative626
Hard StopPositive516
Hard StopNegative532
Hard Stop Out to IndexPositive548
Hard Stop Out to IndexNegative564
Lower HomePositive771
Lower HomeNegative787
Upper HomePositive515
Upper HomeNegative531
Lower Home Outside IndexPositive803
Lower Home Outside IndexNegative819
Lower Home Inside IndexPositive867
Lower Home Inside IndexNegative883
Upper Home Outside IndexPositive547
Upper Home Outside IndexNegative563
Upper Home Inside IndexPositive611
Upper Home Inside IndexNegative627
Original image of the table (from the PDF manual)

image.pngOriginal table image: Homing methods – values of variable 0xc2

Słowa kluczowe

desired state, 0x24, tryb prądowy, current mode, tryb prędkościowy, velocity mode, tryb pozycyjny, position mode, generator trajektorii, trajectory generator, analog, PWM, pulse and direction, pulse up/down, quadrature, homing, bazowanie, 0xa8, 0xa9, 0xc8, 0xca