AIO_TrackingSet Statement
Sets the distance tracking function.
Syntax
(1) AIO_TrackingSet
channelNumber, Conversion coefficient of measured value and distance, Measured value at 0mm, Lower limit of available range for tracking, Upper limit of available range for tracking, [, Robot motions out of the available range for tracking [,Axis to execute the distance tracking function]]
(2) AIO_TrackingSet
channelNumber
Parameters
- channelNumber
- Specify the channel number of the analog I/O to which the distance sensor used is connected as an integer value from 1 to 8.
- Conversion coefficient of measured value and distance
- Coefficient for converting distance sensor measurements (V, mA) to distance (mm). Specify the coefficient in read number between -500 to 500 excepting 0. (Unit: mm/V, mm/mA)
- Measured value at 0mm
- Specify the voltage or current value when the distance (or amount of displacement for the displacement meter) is 0mm, as a real number in the range below. (Unit: V, mA)
Set the value within the input range setting of the analog I/O board.Input range setting Minimum value Maximum value ±10.24 V -10.24 V 10.24 V ±5.12 V -5.12 V 5.12 V 0-5.12 V 0 V 5.12 V 0-10.24 V 0 V 10.24 V 0-24 mA 0 mA 24 mA - Lower limit of available range for tracking
- Lower limit of the available range for tracking is the same as the lower limit of the allowable displacement amount when executing the distance tracking function. Specify the limit between -300 to 300 in real number. (Unit: mm)
Be sure to specify a larger value than the lower limit of the measurable range of the distance sensor. For lower limit of the available range for tracking, specify a smaller value than its upper limit. - Upper limit of available range for tracking
- Upper limit of the available range for tracking is the same as the upper limit of the allowable displacement amount when executing the distance tracking function. Specify the limit between -300 to 300 in real number. (Unit: mm)
Be sure to specify a smaller value than the upper limit of the measurable range of the distance sensor. For upper limit of the available range for tracking, specify a larger value than its lower limit. - Robot motions out of the available range for tracking
- When the robot is out of the available range for tracking (between the upper and lower limits as described in previous page), specify 0 or 1 to stop/continue the robot motion. The value can be omitted. If omitted, “0” is set. Constants are as follows:
Constant Value Description AIOTRACK_ERRSTOP 0 Robot stops due to an error outside of the available range for tracking. AIOTRACK_CONTINUE 1 Robot continues motion outside of the available range for tracking. - Axis to execute the distance tracking function
- Specify an axis (integer value from 0 to 5) to execute the distance tracking function. Specify the axis which is matched with the measured direction of the distance sensor to be used.
The value can be omitted. If omitted, “2” is set. Constants are as follows:Constant Value Description AIOTRACK_TOOL_X 0 Too coordinate X axis AIOTRACK_TOOL_Y 1 Tool coordinate Y axis AIOTRACK_TOOL_Z 2 Tool coordinate Z axis AIOTRACK_ECP_X 3 ECP coordinate X axis AIOTRACK_ECP_Y 4 ECP coordinate Y axis AIOTRACK_ECP_Z 5 ECP coordinate Z axis
3 to 5 can be specified when the external control point (ECP) option is enabled.
Return Values
Syntax (2) shows the current set value on the console.
The following is a correspondence table of the above mentioned parameter names and parameter names displayed on the console.
Parameter names | Names displayed on the console |
---|---|
Conversion coefficient of measured value and distance | ScaleFactor |
Measured value at 0mm | RefVoltage |
Lower limit of available range for tracking | ThresholdMin |
Upper limit of available range for tracking | ThresholdMax |
Robot motions out of the available range for tracking | OutOfRangeMode |
Axis to execute the distance tracking function | TrackingAxis |
Displayed examples are as follows:
Ex 1: When channel #1 is set
Ch1:
ScaleFactor 1.000[V/mm or mA/mm]
RefVoltage 0.000 [V or mA]
ThresholdMin -10.000[mm]
ThresholdMax 10.000[mm]
OutOfRangeMode AIOTRACK_ERRSTOP
TrackingAxis AIOTRACK_TOOL_Z
Ex 2: When channel #1 is not set
Ch1: Undefined
Description
AIO_TrackingSet sets parameters for the distance tracking function. Parameters to be set are determined by the distance sensor or the working environment. After booting the controller, AIO_TrackingSet must be executed before executing AIO_TrackingStart. Set parameters keep values until the robot controller is turned OFF or rebooted.
Detailed descriptions for parameters are as follows:
- Conversion coefficient of measured value and distance
- When the distance sensor indicates displacement: +2mm per +1V, conversion coefficient is 2. At this time, +2mm is the displacement to direction where the distance becomes longer. Depending on the displacement meter, the voltage is set to positive to the direction where the distance becomes shorter. In this case, the conversion coefficient will be negative.
- Measured value at 0mm
- For the distance sensor, especially the displacement meter, voltage or current value at distance: 0mm differs depending on the products. Also, some of products can set any value for voltage or current value at distance: 0mm by user setting. Specify values depending on the using distance sensor. If the output voltage is of distance sensor is 0V when the distance (or displacement) is 0mm, this parameter is “0”.
- Upper or lower limit of available range for tracking
- Set the upper and lower limits depending on the variations allowed by applications. Set values must be within the measurable range of the distance sensor. The measurable range of the distance sensor differs depending on each sensor and user settings. Be sure to set the limits before executing the distance tracking function. If this parameter is set outside the measurable range of the distance sensor, the distance tracking function cannot work properly and the robot may move unintentionally.
- Robot motions out of the available range for tracking
- The following figures indicates the motion trajectory of the robot when the distance tracking function is executed to Z direction in Tool (when the “Robot motions out of the available range for tracking” parameter is set to “0” or “1”).
- P1: Start point of the distance tracking function
- P2: Target point
The figures indicate an object which will move outside of the measurable range at point A and return inside the range at point B.
Set the measured value (displacement) in Tool Z direction at P1 (start point of the function) as a reference value. The distance tracking function controls the robot so that the measured value always becomes the reference value. Therefore, when the robot moves from P1 to P2, the measured values between P1 and point A will be constant.
When the robot is arrived at point A, it stops due to an error if the parameter is set to “0”. If the parameter is set to “1”, the robot keeps moving to P2 from point A. However, the distance tracking function is disabled while the robot is out of the available range. When the robot moved to point B, the function is enabled since the robot is within the available range. The robot moves as with the motion from P1 to point A so that the measured value will be constant.
0: Stop the robot motion due to out of the range 1: Continue the robot motion even out of the range - a: Distance tracking function enabled
- b: Out of range, distance tracking function disabled
When the parameter is set to “1” and the robot moves outside of the range, the robot moves on the trajectory from the start point (P1) to the target point (P2) with CP motion. As shown in the figures below, the trajectory between A and B (outside of the available range) will become parallel to its of P1-P2. When the robot arrived to point B, the robot returned to inside the available range. Therefore, the robot is controlled based on the measured value and may move suddenly.
0: Stop the robot motion due to out of the range 1: Continue the robot motion even out of the range
CAUTION
If each parameter is not set correctly, the robot may move unintentionally when AIO_TrackingStart is executed.
Be sure to set properly depending on the using device and working environment.
If the robot moves abnormally, immediately hold down the emergency button.
See Also
AIO_TrackingStart, AIO_TrackingEnd, AIO_TrackingOn Function
AIO_TrackingSet Function Example
The following is an example program which moves the robot by using the distance tracking function. (P1: Start point, P2: End point)
CAUTION
The parameters set in the example are reference values.
Please note that the operation may not be successful or the motion may be vibratory depending on the set parameters and some operating conditions.
If the robot moves abnormally, immediately hold down the emergency button.
Function Main
Motor On
Power High
SpeedS 30
AccelS 300300
Go P1 ‘ Move to P1: start point
AIO_TrackingSet 1,1,0,-5,5,0,2 ‘ Set the distance tracking function
AIO_TrackingStart 1,5,5,5 ‘ Start the distance tracking function
Move P2 ‘ Move to P2 with executing the distance tracking function
AIO_TrackingEnd ‘ End the distance tracking function
Motor Off
Fend