Move.StartSpeedDAC Method

Starts, alters or stops automatic control of an analog output channel (DAC) whose value is computed based upon the robot's instantaneous tool tip speed.

Move.StartSpeedDAC (mode, n_segments, speed_array, dac_array)

Prerequisites

Parameters

mode

An optional numeric expression that is not currently used.  This is a placeholder for future capabilities.

n_segments

A required numeric expression that evaluates to the Integer number of piecewise linear interpolation segments that define how tool tip speeds are converted to raw DAC commands.  If this value is 0 or negative, the SpeedDAC mode is terminated.  The maximum permitted value for this parameter is 3.

speed_array

An optional array of Doubles that define the ranges of speeds that are interpolated in each piecewise linear segment.  If n_segments is 1, the first array element (0) and the second array element (1) define the range of tool tip speeds that are converted to DAC values by interpolating between the first two dac_array elements.  If n_segments is 2, the second array element (1) and the third (2) define the range of tool tip speeds that are converted by interpolating between the second and third dac_array elements.  Speed values must be 0 or greater and must monotonically increase within the speed_array.  That is, element (1) must be greater than element (0), and (2) must be greater than (1), etc.  All speeds are in units of mm/sec.

dac_array

An optional array of Doubles that define the ranges of DAC values that are output for each of the piecewise linear interpolation segments.  The first two elements (0) and (1) define the range of DAC values that are interpolated for the first segment.  Each entry in this array is interpreted as a raw DAC value from 32767 to -32768, which represent voltages from +10VDC to -10VDC.  There is no restriction on values stored in each DAC element, i.e. sequential entries can be increasing, decreasing or the same.

Remarks

This method initiates, changes or terminates a special trajectory mode that computes the instantaneous commanded speed of the attached robot's tool tip and automatically sets the value of an analog output channel (DAC) based upon the computed speed.  The trajectory generator computes the tool tip speed each time it evaluates the path set points.  This computation takes into consideration all of the characteristics of the trajectory including accelerations, decelerations, motion blending, any reduced speed due to the global test speed set by the Operator Control Panel, real-time path modifications, etc.

The computed tool tip speed is converted to a DAC value using one or more piecewise linear interpolation segments.  If a single segment is specified, a range of speeds are linearly converted to a range of DAC values.  Speeds that are less than the lowest value in the speed range are set to the first value in the DAC range.  Speeds that are higher than the highest value in the speed range are set to the last value in the DAC range.  If two or more linear segments are specified, a piecewise linear relationship between tool tip speeds and DAC values can be represented. The graphic below illustrates how tool tip speeds are converted to DAC values for a sample two segment (n_segments=2) specification.

Once the DAC value is computed by the Trajectory Generator using the piecewise linear specification, the value is sent to the servo code.  The servo code interpolates between sequential DAC values at the PID loop evaluation rate and writes the interpolated value to the hardware DAC.  This extra level of interpolation ensures that the DAC value will be changed smoothly and accurately. If this method is called with 0 segments specified, this special trajectory mode is terminated and the DAC value is set to 0. This mode can be started, modified and stopped at any time when the robot is idle or moving.  However, once started, only Cartesian interpolated motions (e.g. straight-line or circular interpolated) can be executed. There are several Parameter Database values that are important for the operation of the SpeedDAC method.

Parameter Database ID Parameter Name Description

2014

Speed DAC output map: node, channel

This parameter must be set to the controller node number and the number of the DAC to be controlled.  If this parameter is not set, the SpeedDAC method can still be used to compute the instantaneous speed of the robot's tool tip, but no hardware analog output signal will be generated.  If this parameter is set, the output value of the specified DAC channel will be continuously written by the servo code even when the SpeedDAC method is not enabled.  During this period, the "SpeedDAC mode DAC output value" (DataID 3542) can be manually written to output values to the DAC.  The value of DACs configured for SpeedDAC operation should not be modified via GPL's Signal.AIO methods.

3541

SpeedDAC mode tool tip speed

If the SpeedDAC mode is enabled, this parameter returns the robot's tool tip speed in mm/sec.  This is the actual tool tip speed and is affected by the "System wide test speed" (DataID 601).

3542

SpeedDAC mode DAC output value

If the SpeedDAC mode is enabled, this parameter returns the value that is written to the DAC and will range from 32767 to -32768.  If the SpeedDAC mode is disable but the DAC is configured via the "Speed DAC output map: node, channel" (DataID 2014), the servos control the value of the DAC and this DataID can be written to explicitly set the DAC value.

This mode will remain in effect until one of the following occurs:

  1. A Move.StartSpeedDAC method is executed with a zero n_segments parameter.
  2. The Move.StopSpecialModes method is executed to terminate all special control modes for the robot.
  3. A hardware error or hard E-stop or soft E-stop occurs.
  4. A RapidDecel is issued.
  5. The robot is detached by the user program either by issuing a detach command or by halting user program execution for any reason.

Examples

Dim prof1 As New Profile 
Dim loc1 As New Location
Dim speeds(2), dacs(2) As Double
Robot.Attached = 1 ' Get control of robot #1
speeds(0) = 30 ' At 30 mm/sec
dacs(0) = 1*32768/10 ' output 1 VDC
speeds(1) = 300 ' At 300 mm/sec
dacs(1) = 5*32768/10 ' output 5 VDC

Move.StartSpeedDAC(0, 1, speeds, dacs) ' Start SpeedDAC output
prof1.Straight = True ' Must be Cartesian motion
loc1.XYZ(10,20,-30,0,180,20) ' Define position to move to
Move.Loc(loc1, prof1) ' Move to loc1 using prof1
Move.WaitForEOM
Move.StartSpeedDAC(0,0) ' Terminate mode
Robot.Attached = 0 ' Release control of robot

See Also

Move Class | Move.StopSpecialModes | Robot.CartMode