Certain digital input signals may be configured to trigger the sampling or “latching” of robot and conveyor belt positions. These latched positions may then be used to determine the location of a robot or belt with high accuracy even though the device is moving. For example, a conveyor belt position may be latched when a part on the belt passes a “part present” sensor.
Depending on your controller model and whether you have installed the required license keys, selected digital input signals may be connected to special hardware that implements very high accuracy latching. This hardware is called a hardware latch, and applies to the lowest numbered digital inputs in your system. For example, if you have two hardware latches, then signals 10001 and 10002 are affected. The number of hardware latches is shown by DataID 506 (Number of hardware latches).
If you are utilizing the PreciseFlex™ Ethernet servo network to communicate with slave controllers, you can use the digital inputs on the slave controllers for latching. Latching from these inputs is somewhat less accurate than local hardware latching due to jitter of about 20 µsec in time synchronization between the master and the slaves.
If you are utilizing the PreciseFlex™ serial servo network to communicate with slave boards (GSB's or GIO's), you can use the digital inputs on these boards for latching (requires GPL 4.0B4 or later). These boards do not have hardware latching, but they poll their inputs every 65.5 µsec, so the jitter is much less than that of local software polling on a PreciseFlex™ controller but still somewhat worse than the controller's local IO.
The table below shows the type of latching available for various digital inputs. In order to enable the latching functions, the "Encoder Latching" or the “Conveyor Tracking” or the “Advanced Control” license key must be installed on your controller.
| Signal Number | Type | Description |
|---|---|---|
|
10001 - 10002 |
Local hardware latching, if available. |
Signals
are monitored by hardware for high-accuracy latching. Very
small position errors are possible depending upon the sensors.
|
|
10001 - 10012 |
Local software latching. Inputs used for hardware latching may not be used for software latching. |
Signals are monitored by software. Position errors as low as 1mm are possible when an axis is traveling at 1 meter/second. |
|
10033 - 10040 |
ZIO board input software latching. |
Signals are monitored by software. Position errors as low as 4mm are possible when an axis is traveling at 1 meter/second. |
|
n10001 - n10002 |
Remote hardware latching, if available, for Ethernet servo network node n. |
Signals
are monitored by hardware on remote servo boards in the Ethernet
servo network. Position errors as low as 20µm are possible
when an axis is traveling at 1 meter/second. |
|
10001 - n10012 |
Remote software latching for Ethernet servo network node n. |
Signals are monitored by software. Position errors as low as 1mm are possible when an axis is traveling at 1 meter/second. |
|
n10001
- n10003 |
Remote software latching for Serial servo network node n. (GSB or GIO). |
Signals are monitored by software at 16KHz. Position errors as low as 62.5µm are possible when an axis is traveling at 1 meter/second (requires GPL 4.0B4 or later). |
Digital inputs from RIO boards or MODBUS/TCP boards may not be used for latching.
Latch Timing
All latching is performed by sampling the time when a digital input makes a transition, and determining the position of the various robot encoders at that time. The accuracy of the position is determined by the accuracy of the latched time value.
The positional accuracy may be approximated by the formula:
position_error = time_error * velocity
So, for a robot moving at 1 meter/second, each millisecond of time error causes 1 millimeter of position error.
There are several aspects of latch timing to consider:
| Local Hardware Latch | Remote Hardware Latch | Software Latch | ZIO Latch | GSB** or GIO** Latch | |
|---|---|---|---|---|---|
|
Resolution |
125 nsec |
125 nsec |
1 msec |
4 msec |
62.5 µsec |
|
Latency* |
40
µsec, +edge |
40
µsec, +edge |
1 msec (+edge or -edge) |
4 msec |
40
µsec, +edge |
|
Pulse width (minimum) |
200 µsec |
200 µsec |
1.2 msec |
5 msec |
125 µsec |
|
Repetition period (minimum) |
1.2 msec |
1.2 msec |
2.2 msec |
10 msec |
4 times the trajectory period |
|
Jitter (minimum) |
125 nsec |
20 µsec |
1 msec |
4 msec |
62.5 µsec |
|
Position error at 1 meter/second due to jitter |
0.125 µm |
20 µm |
1 mm |
4 mm |
62.5 µm |
* This is a typical value. It
may be different for your controller model.
** GSB and GIO require GPL 4.0B4 or later.
Latch Configuration
Latching is enabled by specifying the digital input signals that are to trigger the latching for a robot. The signal numbers are entered in the database parameter array Latch DIN (DataID 16100). A positive edge (from low to high) is specified by a positive signal number, and a negative edge (from high to low) is specified by a negative signal number. Note, do not write to DataID 16100 when GPL is actively processing latching because this may cause latch results to be lost.
Each robot (or conveyor belt robot) may be configured to latch based upon an arbitrary combination of up to 12 signal numbers, both positive or negative, with one exception: If you want a hardware latch to respond to both positive and negative edges, you must specify an odd-numbered signal, and you cannot use the even-numbered hardware latch that is one greater.
For example, if you specify latching on signals 10001 and -10001, you cannot latch using 10002 or -10002. And, you can never latch on both 10002 and -10002 since this is an even signal number. You can specify 10001 and -10002, provided that -10001 and 10002 are not specified.
Latch Queuing
In many applications, latch results occur in bursts, faster than a GPL procedure can process them. When latches occur, they are placed in a queue, ordered by the time of the event. A GPL procedure can then remove the latch results from the queue and process them as time permits.
The maximum size of the queue is specified for each robot. If too many latches occur before the GPL procedure removes them, the GPL procedure receives an overflow error when it reaches the point in the queue where the overflow occurred. The queue size should be set to a value large enough that overflow errors never occur during normal operation, but small enough that the system does not use up too much memory if a malfunction generates a large number of latch events. Each queued latch consumes approximately 152 bytes of RAM.
The database parameter Latch queue max (DataID 16101) is set to the maximum number of latch events allowed. There are separate values for each robot.
Latch Latency
Any delay between when a latch sensor triggers and when the controller detects the change in input shifts the latch event in time. If the robot is moving slowly, this time difference is not significant, but if the robot is moving quickly, this can result in a meaningful latency error. DataID 16102 (”Latch signal latency in sec") allows you to adjust the latch position computation to compensate for this latency. To set this parameter, start with the value shown in the Latency row of the table above, and increase the value to add in any delays due to the sensing operation.