Device Functions

The Automation1 controller gives you read and write access to some drive-level variables, control signals, and status items.

Manual Brake Control

You can use the DriveBrakeOn() and DriveBrakeOff() functions to manually control the brake connected to your drive. These functions control the output specified by the BrakeOutput Parameter. The BrakeOutput parameter defaults to the dedicated brake output on the drive, but you can also set it to a digital output.

You can use these functions to debug the brake operation. You can also use them in an AeroScript program when you want the drive to engage or disengage the brake.

The DriveBrakeOn() and DriveBrakeOff() functions are optional. You can use the BrakeSetup Parameter to automatically disengage the brake when the axis is enabled.

The brake output is fail safe. If the system resets or if the power decreases quickly, the brake automatically engages.

function DriveBrakeOff($axis as axis)

Disengages the brake output and allows the axis to move freely.

Arguments

$axis  The axis on which to disengage the brake.

function DriveBrakeOn($axis as axis)

Engages the brake output and prevents the axis from moving freely.

Arguments

$axis  The axis on which to engage the brake.

Drive Items

You can use the DriveGetItem() function to get status information from the drive. The drive items supply information about the drive that can be used for debugging. You can use the DriveItem enumeration to select the drive item that you want to get.

This function has an overload that includes the $additionalData argument. Some drive items must use the $additionalData argument to select the correct information.

function DriveGetItem($axis as axis, $driveItem as DriveItem) as real

Gets the specified drive item from the specified axis.

Arguments

$axis  The axis from which to retrieve the drive item value.

$driveItem  The drive item to retrieve.

Returns

The value of the specified drive item.

function DriveGetItem($axis as axis, $driveItem as DriveItem, $additionalData as integer) as real

Gets the specified drive item from the specified axis.

Arguments

$axis  The axis from which to retrieve the drive item value.

$driveItem  The drive item to retrieve.

$additionalData  Additional data for the specified drive item. This argument is required by some drive items.

Returns

The value of the specified drive item.

Refer to the DriveItem enumeration that follows.

Drive Array

The Automation1 controller supplies you with a drive array that is on the drive and can be used for fast data transfer. The drive array can be used with the Drive Data Capture feature to store encoder positions or analog inputs or to specify data for the array modes of various PSO features.

You can use an AeroScript program to read the drive array data into an array variable or write data from an array variable into the drive array.

When you reset the controller, all of the elements in the array are set to zero.

IMPORTANT: On the FLEX, GI4, GL4, SI4, iXA4, XA4, iXI4, and XI4, all axes on the drive share the same drive array. You can use any axis as the argument to the drive array functions.

The size of the drive array is in bytes. The size is not the same for all drive types. Use the DriveArraySize drive item to retrieve the size of the data array directly from the drive.

Table: Applicable Drive Types and Drive Array Size

Drive Type Drive Array Size (in bytes)
FLEX 67,108,864
GI4 67,108,864
GL4 67,108,864
SI4 16,777,216
iXA4, XA4 (1 and 2 axis) 16,777,216
iXA4, XA4 (4 axis) 67,108,864
iXC2, XC2 16,777,216
iXC2e, XC2e 67,108,864
iXC4, XC4 16,777,216
iXC4e, XC4e 67,108,864
iXC6e, XC6e 67,108,864
iXI4, XI4 67,108,864
iXL2e, XL2e 67,108,864
XL4s 16,777,216
iXL5e, XL5e 67,108,864
iXR3, XR3 67,108,864
Virtual Drive 2048

The drive array supports multiple native data types, as determined by the underlying AeroScript feature. You can specify which feature to read and write data to the drive array as through the DriveArrayType AeroScript enumeration.

The size of each item that you retrieve depends on the DriveArrayType. The table that follows shows the size in bytes for each item.

Table: DriveArrayType Item Sizes

DriveArrayType Item Size
AnalogOutputVoltages 4 bytes (32 bits)
DataCapturePositions 8 bytes (64 bits)
PsoBitmapBits 4 bytes (32 bits)
PsoDistanceEventDistances 4 bytes (32 bits)
PsoPulseTimes 4 bytes (32 bits)
PsoPulseCounts 4 bytes (32 bits)
PsoWindowRanges 4 bytes (32 bits)

The byte address that you specify to DriveArrayRead(), DriveArrayReadFast(), or DriveArrayWrite() must be evenly divisible by the size of the DriveArrayType item that you specify. For example, if you retrieve DriveArrayType.DataCapturePositions values (8 bytes each), the byte address that you specify to DriveArrayRead(), DriveArrayReadFast(), or DriveArrayWrite() must be evenly divisible by 8.

Reading from the Drive Array

You can use the DriveArrayRead() function to read the drive array into an AeroScript array variable. You can specify the byte address where you want to start reading from the drive array and the number of subsequent elements you want to read. The byte address that you specify must be evenly divisible by the size of the DriveArrayType item that you specify. Refer to the table, DriveArrayType Item Sizes for information about the size of each DriveArrayType item.

The function will not complete until it retrieves all of the specified elements from the drive array. The function retrieves 32,000 bytes per second, per axis, letting you read 8,000 32-bit values or 4,000 64-bit values per second.

You can use the DriveArrayReadFast() function to retrieve the drive array faster. The number of values that the controller can retrieve per second is in the table that follows.

Table: DriveArrayReadFast() Bandwidth

Drive Type Bytes per Second 32-bit Values per Second 64-bit Values per Second
FLEX 576,000 144,000 72,000
GI4 432,000 108,000 54,000
GL4 288,000 72,000 36,000
SI4 (2 axis) 288,000 72,000 36,000
SI4 (4 axis) 576,000 144,000 72,000
iXA4, XA4 (1 axis) 144,000 36,000 18,000
iXA4, XA4 (2 axis) 288,000 72,000 36,000
iXA4, XA4 (4 axis) 576,000 144,000 72,000
iXC2, XC2, iXC2e, XC2e 144,000 36,000 18,000
iXC4, XC4, iXC4e, XC4e 144,000 36,000 18,000
iXC6e, XC6e 144,000 36,000 18,000
iXI4, XI4 (2 axis) 288,000 72,000 36,000
iXI4, XI4 (4 axis) 576,000 144,000 72,000
iXL2e, XL2e 144,000 36,000 18,000
XL4s 144,000 36,000 18,000
iXL5e, XL5e 144,000 36,000 18,000
iXR3, XR3 144,000 36,000 18,000
Virtual Drive 144,000 36,000 18,000

IMPORTANT: The DriveArrayReadFast() function uses the full bandwidth of communications. Do not use this function while you are doing other operations on the drive (such as homing). You also cannot use this function while the controller is collecting data through the Data Visualizer module of Studio or data collection AeroScript functions.

function DriveArrayRead($axis as axis, ref $values[] as real, $startAddress as integer, $numElements as integer, $driveArrayType as DriveArrayType)

Reads the contents of the drive array into an AeroScript array variable.

Arguments

$axis  The axis from which to read the drive array.

ref $values  The AeroScript array variable in which to store the drive array data.

$startAddress  Byte-addressable index of the drive array from which to begin reading data.

$numElements  The number of drive array elements to read.

$driveArrayType  The underlying data type to read from the drive array.

function DriveArrayReadFast($axis as axis, ref $values[] as real, $startAddress as integer, $numElements as integer, $driveArrayType as DriveArrayType)

Reads the contents of the drive array into an AeroScript array variable, utilizing the maximum available communication bandwidth.

Arguments

$axis  The axis from which to read the drive array.

ref $values  The AeroScript array variable in which to store the drive array data.

$startAddress  Byte-addressable index of the drive array from which to begin reading data.

$numElements  The number of drive array elements to read.

$driveArrayType  The underlying data type to read from the drive array.

Writing to the Drive Array

You can use the DriveArrayWrite() function to write an AeroScript array variable into the drive array. You can specify the byte address where you want to start writing to the drive array and the number of subsequent elements you want to write. The byte address that you specify must be evenly divisible by the size of the DriveArrayType item that you specify. Refer to the table, DriveArrayType Item Sizes for information about the size of each DriveArrayType item.

The function will not complete until it writes all of the specified elements to the drive array. The function writes a maximum of 200,000 bytes per second, per axis, letting you write 50,000 32-bit values or 25,000 64-bit values per second. You can use the DriveArrayWrite() function to write to a drive array on two or more user tasks at the same time. But the speed of each function will be slower. To see the number of values that the controller can write per second, refer to the table that follows:

Table: DriveArrayWrite() Bandwidth

Drive Type Bytes per Second 32-bit Values per Second 64-bit Values per Second
FLEX 800,000 200,000 100,000
GI4 600,000 150,000 75,000
GL4 400,000 100,000 50,000
SI4 (2 axis) 400,000 100,000 50,000
SI4 (4 axis) 800,000 200,000 100,000
iXA4, XA4 (1 axis) 200,000 50,000 25,000
iXA4, XA4 (2 axis) 400,000 100,000 50,000
iXA4, XA4 (4 axis) 800,000 200,000 100,000
iXC2, XC2 200,000 50,000 25,000
iXC2e, XC2e 200,000 50,000 25,000
iXC4 , XC4 200,000 50,000 25,000
iXC4e, XC4e 200,000 50,000 25,000
iXC6e, XC6e 200,000 50,000 25,000
iXI4, XI4 (2 axis) 400,000 100,000 50,000
iXI4, XI4 (4 axis) 800,000 200,000 100,000
iXL2e, XL2e 200,000 50,000 25,000
XL4s 200,000 50,000 25,000
iXL5e, XL5e 200,000 50,000 25,000
iXR3, XR3 200,000 50,000 25,000
Virtual Drive 200,000 50,000 25,000

The AeroScript array used to write elements to the drive array is made of 64-bit reals, but the data must be valid for the provided DriveArrayType. Thus, for 32-bit value AeroScript features, the data must not be larger than the 32-bit boundary.

function DriveArrayWrite($axis as axis, $values[] as real, $startAddress as integer, $numElements as integer, $driveArrayType as DriveArrayType)

Writes the contents of an AeroScript array variable to the drive array.

Arguments

$axis  The axis on which to write the drive array.

$values  The AeroScript array variable from which to write data to the drive array.

$startAddress  Byte-addressable index of the drive array from which to begin writing data.

$numElements  The number of drive array elements to write.

$driveArrayType  The underlying data type to write to the drive array.

Drive Data Capture

The Automation1 controller lets you capture encoder positions or analog inputs and store them in the drive array. You can trigger data capture with PSO or a high speed digital input.

The drive can capture up to 320,000 points a second and write them to the drive array.

The data capture points of the drive array are stored as 64-bit floating point values.

You can read the captured points by using the DriveArrayRead() or DriveArrayReadFast() functions.

Data capture can have a maximum of two configurations per axis. To specify the configuration, use the $configurationNumber argument. Each configuration has an input, trigger, and array. You cannot capture the same input through more than one configuration on the same axis.

HARDWARE: The FLEX, GI4, SI4, iXA4, XA4, iXI4, and XI4 support only one data capture configuration per axis. All other drives support two data capture configurations per axis.

Configuring Drive Data Capture

You can use the DriveDataCaptureConfigureArray() function to configure the drive array for data capture. This function allocates a section of the drive array to store the data capture points. Starting at the $driveArrayStartAdress argument, data capture points are stored in the drive array as they occur. The number of data capture points that are stored in the array is set by the $numberOfPoints argument.

The maximum value of the $numberOfPoints argument is 2,147,483,647, but you can collect an infinite number of points by specifying a value of -1. If you use -1, data capture continues until you disable it. When you collect a number of points that exceeds the size of the drive array, make sure that the points are read from the array before they are overwritten by subsequent captures.

function DriveDataCaptureConfigureArray($axis as axis, $configurationNumber as integer, $driveArrayStartAddress as integer, $numberOfPoints as integer)

Configures the drive array for drive data capture.

Arguments

$axis  The axis on which to configure the drive array for drive data capture.

$configurationNumber  The data capture configuration number. When capturing one input signal on the specified axis, specify a value of 0. When capturing two input signals on the specified axis, specify 0 for the first signal and 1 for the second signal.

$driveArrayStartAddress  The byte-addressable index of the drive array where the first drive data capture value will be written.

$numberOfPoints  The number of points that will be written to the drive array by drive data capture.

You can use the DriveDataCaptureConfigureInput() function to configure the encoder position or analog input that will be captured. You can use the DriveDataCaptureInput enumeration to select the input that you want to capture. Your drive might not support every enumeration option. See the table that follows for the options that are supported on your drive. If you select an unsupported option for your drive, it defaults to PositionCommand.

IMPORTANT: Use PositionCommand for DriveDataCaptureInput only with Part-Speed PSO.

IMPORTANT: PositionFeedback for DriveDataCaptureInput is updated only at the servo rate. Use it only when you cannot use Primary Feedback or Auxiliary Feedback with your configuration.

Table: DriveDataCaptureInput Drive Support

Drive Support

DriveDataCaptureInput Enumeration

PositionCommand PositionFeedback PrimaryFeedback

AuxiliaryFeedback

AnalogInput0

AnalogInput1

AnalogInput2 AnalogInput3
FLEX Yes Yes No No Yes Yes Yes No
GI4 Yes No No Yes Yes Yes Yes Yes
GL4 Yes No Yes Yes No No No No
SI4 Yes Yes Yes No No No No No
iXA4 Yes Yes Yes Yes Yes Yes Yes Yes
XA4 Yes Yes Yes Yes Yes Yes Yes Yes
iXC2 Yes Yes Yes Yes Yes No No No
XC2 Yes Yes Yes Yes Yes No No No
iXC2e Yes Yes Yes Yes Yes No No No
XC2e Yes Yes Yes Yes Yes No No No
iXC4 Yes Yes Yes Yes Yes Yes Yes Yes
XC4 Yes Yes Yes Yes Yes Yes Yes Yes
iXC4e Yes Yes Yes Yes Yes Yes Yes Yes
XC4e Yes Yes Yes Yes Yes Yes Yes Yes
iXC6e Yes Yes Yes Yes Yes Yes Yes Yes
XC6e Yes Yes Yes Yes Yes Yes Yes Yes
iXI4 Yes Yes Yes Yes Yes Yes Yes Yes
XI4 Yes Yes Yes Yes Yes Yes Yes Yes
iXL2e Yes Yes Yes Yes Yes No No No
XL2e Yes Yes Yes Yes Yes No No No
XL4s Yes No Yes No No No No No
iXL5e Yes Yes Yes Yes Yes Yes Yes Yes
XL5e Yes Yes Yes Yes Yes Yes Yes Yes
iXR3 Yes Yes Yes Yes Yes Yes No No
XR3 Yes Yes Yes Yes Yes Yes No No

function DriveDataCaptureConfigureInput($axis as axis, $configurationNumber as integer, $input as DriveDataCaptureInput)

Selects the signal that will be stored by drive data capture.

Arguments

$axis  The axis on which to select the drive data capture signal.

$configurationNumber  The data capture configuration number. When capturing one input signal on the specified axis, specify a value of 0. When capturing two input signals on the specified axis, specify 0 for the first signal and 1 for the second signal.

$input  The input signal for drive data capture.

Refer to the DriveDataCaptureInput enumeration that follows.

You can use the DriveDataCaptureConfigureTrigger() function to configure the signal that will trigger a capture of the input. You can use the DriveDataCaptureTrigger enumeration to select the signal you want to use. Your drive might not support every enumeration option. There are also hardware limitations on each signal that cause latency between the trigger event and when the data is captured. See the table for the triggers that are supported on your drive and the corresponding latency, in nanoseconds. If you select an unsupported option for your drive, data capture events will not be triggered.

Table: DriveDataCaptureTrigger Drive Support

Drive Support

DriveDataCaptureTrigger Enumeration (latency in nanoseconds)

PsoOutput PsoEvent

HighSpeedInput0
RisingEdge

HighSpeedInput0
FallingEdge

HighSpeedInput1
RisingEdge

HighSpeedInput1
FallingEdge
AuxiliaryMarker
RisingEdge

AuxiliaryMarker
FallingEdge

FLEX 10 10 NA NA NA NA NA NA
GI4 10 10 60 60 NA NA NA NA
GL4 10 10 NA NA NA NA NA NA
SI4 NA NA 60 60 NA NA NA NA
iXA4 10 10 60 60 60 60 NA NA
XA4 10 10 60 60 60 60 NA NA
iXC2 10 10 NA NA NA NA 60 60
XC2 10 10 NA NA NA NA 60 60
iXC2e 10 10 NA NA NA NA 60 60
XC2e 10 10 NA NA NA NA 60 60
iXC4 10 10 60 60 60 60 60 60
XC4 10 10 60 60 60 60 60 60
iXC4e 10 10 60 60 60 60 60 60
XC4e 10 10 60 60 60 60 60 60
iXC6e 10 10 60 60 60 60 60 60
XC6e 10 10 60 60 60 60 60 60
iXI4 10 10 60 60 NA NA NA NA
XI4 10 10 60 60 NA NA NA NA
iXL2e 10 10 NA NA NA NA 60 60
XL2e 10 10 NA NA NA NA 60 60
XL4s 10 10 NA NA NA NA NA NA
iXL5e 10 10 60 60 60 60 60 60
XL5e 10 10 60 60 60 60 60 60
iXR3 10 10 60 60 NA NA 60 60
XR3 10 10 60 60 NA NA 60 60

function DriveDataCaptureConfigureTrigger($axis as axis, $configurationNumber as integer, $trigger as DriveDataCaptureTrigger)

Selects the event that will trigger drive data capture.

Arguments

$axis  The axis on which to select the drive data capture trigger.

$configurationNumber  The data capture configuration number. When capturing one input signal on the specified axis, specify a value of 0. When capturing two input signals on the specified axis, specify 0 for the first signal and 1 for the second signal.

$trigger  The trigger event for drive data capture.

Refer to the DriveDataCaptureTrigger enumeration that follows.

Enabling Drive Data Capture

After you configure data capture, you must use the DriveDataCaptureOn() function to enable it.

You cannot enable this feature while homing.

You can use the DriveDataCaptureOff() function to disable this feature at any time. This function is optional. This feature also disables when it captures the number of elements specified by the $numberOfPoints argument in the DriveDataCaptureConfigureArray() function.

You can use the DriveGetItem() function to read the number of elements captured by setting $driveItem to DriveItem.DriveDataCaptureSamples and $additionalData to the necessary $configurationNumber.

function DriveDataCaptureOff($axis as axis, $configurationNumber as integer)

Disables drive data capture of configured inputs.

Arguments

$axis  The axis on which to disable drive data capture.

$configurationNumber  The data capture configuration number. When capturing one input signal on the specified axis, specify a value of 0. When capturing two input signals on the specified axis, specify 0 for the first signal and 1 for the second signal.

function DriveDataCaptureOn($axis as axis, $configurationNumber as integer)

Enables drive data capture of configured inputs.

Arguments

$axis  The axis on which to enable drive data capture.

$configurationNumber  The data capture configuration number. When capturing one input signal on the specified axis, specify a value of 0. When capturing two input signals on the specified axis, specify 0 for the first signal and 1 for the second signal.

Drive Encoder Output

Automation1 drives can send encoder feedback signals to external devices. These feedback signals are transmitted as incremental square-wave encoder signals from one or more supported drive connectors. You can use the DriveEncoderOutput* functions to configure a supported drive connector to send these encoder feedback signals.

The Drive Encoder Output feature lets you send encoder signals to other drives. Then these drives use the encoder signals as PSO tracking inputs in multi-axis PSO configurations.

For information about which connectors you can use for Drive Encoder Output, see the hardware manual for your drive. You can download your manual from the Manuals & Help Files section of www.aerotech.com.

Configuring the Drive Encoder Output

You can use the DriveEncoderOutputConfigureInput() function to select the correct feedback source to transmit from the specified drive output connector.

function DriveEncoderOutputConfigureInput($axis as axis, $outputChannel as EncoderOutputChannel, $inputChannel as EncoderInputChannel)

Configures an output channel to echo encoder signals from the specified input channel.

Arguments

$axis  The axis on which to apply the configuration.

$outputChannel  The outgoing encoder channel.

$inputChannel  The incoming encoder channel.

Use the EncoderOutputChannel enumeration to select the output connector that is necessary to configure so it can transmit encoder feedback signals. For information about which output connectors are available on each drive, see your drive hardware manuals.

Refer to the EncoderOutputChannel enumeration that follows.

Use the EncoderInputChannel enumeration to select the source of the encoder signals that you want to send on the output connector:

  • For the PrimaryEncoder option: The IncrementalEncoderSquareWave, the IncrementalEncoderSineWave (-MX2, -MX3, -CT2, and -CT4 only), and the CapacitanceSensor primary feedback types are supported.
  • For the AuxiliaryEncoder option: The IncrementalEncoderSquareWave and the IncrementalEncoderSineWave (-CT4) feedback types are supported.

When you use the Drive Encoder Output to send Drive Pulse Stream signals (EncoderInputChannel.PulseStream), the format of the signals is controlled by the Pulse Stream feature. Refer to the DrivePulseStreamConfigure() function for available options.

Refer to the EncoderInputChannel enumeration that follows.

You can configure the Drive Encoder Output feature to apply an integer divider to the encoder feedback signals as they are transmitted from the drive output connector. To configure this divider, use the DriveEncoderOutputConfigureDivider() function. Aerotech recommends that you use this divider to make sure that the switching rate of the Drive Encoder Output quadrature signals is not more than the maximum supported rate of 25 MHz, as measured in counts per second. If the PrimaryFeedbackType Parameter of the axis on which you want to configure to this divider is set to IncrementalEncoderSineWave, then the PrimaryEmulatedQuadratureDivider Parameter also has an effect on switching rate of the Drive Encoder Output quadrature signal. In this case, the PrimaryEmulatedQuadratureDivider parameter and the $outputDivider argument are multiplied together to get the divider. When the PrimaryFeedbackType parameter is set to IncrementalEncoderSineWave, Aerotech recommends that you use only the PrimaryEmulatedQuadratureDivider parameter to adjust the switching rate and set $outputDivider to 1.

function DriveEncoderOutputConfigureDivider($axis as axis, $outputChannel as EncoderOutputChannel, $outputDivider as integer)

Applies a divider on the specified output channel, lowering the frequency of output signals.

Arguments

$axis  The axis on which to apply the configuration.

$outputChannel  The outgoing encoder channel.

$outputDivider  The divider to apply to encoder output.

Controlling the Drive Encoder Output

After you configure a connector for the Drive Encoder Output feature, you can use the DriveEncoderOutputOn() function to enable it. While the connector is enabled, the drive tracks the specified encoder input and sends the counts on the configured output connector. If you are receiving feedback on another drive input, you must also configure the correct feedback parameters for the input you are using. These can include PrimaryFeedbackType Parameter, AuxiliaryFeedbackType Parameter, and the Primary Multiplier and Auxiliary Multiplier parameters.

IMPORTANT: Most of the connectors that you can use for the Drive Encoder Output feature are bidirectional. When you use the DriveEncoderOutputOn() function to enable the Drive Encoder Output feature on a connector, you cannot use that same connector as an input.

function DriveEncoderOutputOn($axis as axis, $outputChannel as EncoderOutputChannel)

Enables encoder output on the specified output channel.

Arguments

$axis  The axis on which to enable encoder output.

$outputChannel  The outgoing encoder channel.

To disable encoder output, use the DriveEncoderOutputOff() function. The DriveEncoderOutputOff() function does not reset the configuration of the Drive Encoder Output feature. You can immediately use the DriveEncoderOutputOn() function again to enable the feature with the existing configuration.

function DriveEncoderOutputOff($axis as axis, $outputChannel as EncoderOutputChannel)

Disables encoder output on the specified output channel.

Arguments

$axis  The axis on which to disable encoder output.

$outputChannel  The outgoing encoder channel.

Pulse Stream

The Automation1 controller lets you generate pulses that are proportional to the speed of one or more real or virtual axes. The pulse stream can be an internal signal that is used as an input to PSO. It can also be a quadrature output signal when used with the Encoder Output feature.

When the pulse stream is enabled, the controller sends pulses to the drive controlling the specified output axis at a 20 kHz rate. The maximum rate for the pulse stream is 95 MHz.

Some of the use cases of the pulse stream are as follows:

  • Pulse a laser input signal that is proportional to the velocity command of one or more axes.
  • Perform PSO operations based on the position or velocity of one or more axes.

Configuring the Pulse Stream

You can use the DrivePulseStreamConfigure() function to configure which axes are tracked by the controller. The input axes can be real or virtual. The output axis specified by the $outputAxis argument generates the pulse stream.

When you configure the pulse stream to track only one axis, the controller calculates the speed and direction of that axis. When you configure the pulse stream to track multiple axes, the controller calculates a vector speed by calculating the square root of the sum of squares of the position of each axis, without direction information.

The controller calculates the speed in encoder counts. You can use the $inputScaleFactors argument to apply scale factors and track the axes in other units. The scale factors should be set in the same order as the axes you specified with the $inputAxes argument. The scale factors are multiplied to the speed of each axis before the controller calculates the vector speed.

The controller then sends the vector speed to the drive controlling the output axis. The output axis generates a number of pulses corresponding to the vector speed.

function DrivePulseStreamConfigure($outputAxis as axis, $inputAxes[] as axis, $inputScaleFactors[] as real)

Configures pulse streaming mode.

Arguments

$outputAxis  The output axis on which to configure pulse streaming mode.

$inputAxes  An array of one or more axes which will be tracked.

$inputScaleFactors  An array of scale factors to apply to each axis in the $inputAxes array.

function DrivePulseStreamConfigure($outputAxis as axis, $inputAxes[] as axis, $inputScaleFactors[] as real, $signalMode as DrivePulseStreamSignalMode)

Configures pulse streaming mode.

Arguments

$outputAxis  The output axis on which to configure pulse streaming mode.

$inputAxes  An array of one or more axes which will be tracked.

$inputScaleFactors  An array of scale factors to apply to each axis in the $inputAxes array.

$signalMode  The signal mode used when DriveEncoderOutputConfigureInput() and DriveEncoderOutputOn() are configured to echo the Pulse Stream signal to an encoder output.

Use the $signalMode argument to specify the format of the pulse stream signals sent to the drive. The $signalMode argument has an effect on the format of the signals only when it is used in conjunction with the Drive Encoder Output feature. For more information, refer to Drive Encoder Output.

Refer to the DrivePulseStreamSignalMode enumeration that follows.

Enabling the Pulse Stream

You can use the DrivePulseStreamOn() and DrivePulseStreamOff() functions to enable and disable the pulse stream on the output axis. If you do not use the DrivePulseStreamOn() function, pulses will not be generated.

function DrivePulseStreamOff($outputAxis as axis)

Disables pulse streaming mode on an axis.

Arguments

$outputAxis  The axis on which to disable pulse streaming mode.

function DrivePulseStreamOn($outputAxis as axis)

Enables pulse streaming mode on an axis.

Arguments

$outputAxis  The axis on which to enable pulse streaming mode.

Drive Position Registers

The Automation1 controller lets you set the different position command and feedback values on the drive.

You can use the StatusGetAxisItem() function to read the Position Command, Position Feedback, and Position Feedback Auxiliary at any time.

Setting Position Command

You can use the DriveSetPositionCommand() function to set the position command of the axis without physically moving the axis to that position. This function sets the position command on the drive at the servo loop level. The drive calculates the difference between the current position command and the new position command specified by the $positionCommand argument. The drive reduces the position feedback by this difference to maintain the current position error.

WARNING: Do not use this function to arbitrarily change the position command if axis calibration is active. This will cause the calibration table to be misaligned and incorrect. Use the PositionOffsetSet() function to set axis programmed positions without affecting the calibration table alignment.

function DriveSetPositionCommand($axis as axis, $positionCommandValue as real)

Sets the position command value of the specified axis at the servo loop level and adjusts the position feedback for position error.

Arguments

$axis  The axis on which to set the position command.

$positionCommandValue  The position command value to set.

Setting Position Feedback

You can use the DriveSetPositionFeedback() function to set the position feedback of the axis without physically moving the axis to that position. This function sets the position feedback on the drive at the servo loop level. The drive also sets the position command to the new position feedback value specified by the $positionFeedback argument. This results in no position error to prevent the axis from being commanded back to the original position.

WARNING: Calibration tables are referenced from the zero position, which is normally established by homing the axis. However, this function establishes a new zero at an arbitrary position, so if you have calibration tables, you must adjust them based on the position feedback value in this function or they will be incorrect.

function DriveSetPositionFeedback($axis as axis, $positionFeedbackValue as real)

Sets the position command and the position feedback value of the specified axis at the servo loop level.

Arguments

$axis  The axis on which to set the position command.

$positionFeedbackValue  The position feedback value to set.

Setting Auxiliary Feedback

You can use the DriveSetAuxiliaryFeedback() function to set the position feedback of the encoder connected to the auxiliary connector. This function sets the feedback on the drive to the value of encoder counts specified by the $auxiliaryFeedback argument.

WARNING: For the drive to read the feedback from the encoder connected to the auxiliary connector, the AuxiliaryFeedbackType parameter must be set to a feedback option other than “None”, and the feedback option must be supported on your drive.