LatchEnable Statement

Enables / Disables the latch function for the robot position by the R-I/O input.

Syntax
LatchEnable { On | Off }​

Parameters

On | Off
On: Enables the latch function of the robot position. Off : Disables the latch function of the robot position.

Result
When the parameter is omitted, displays that the current latch function is ON or OFF.

Description
Enables / Disables the latch function for the robot position using the trigger input signals connected to the R-I/O. It latches the robot position with the first trigger input after you enable the latch function. To repeatedly latch the robot position, execute LatchEnable Off and then execute LatchEnable On again. To use the command repeatedly, it needs at least 60 ms interval for the each command dprocessing time but you do not need to consider the command executing time.

Note


Before enabling the latch function, set the trigger input port and trigger signal logic using SetLatch.d


See Alsodd
LatchPos Function, LatchState Function, SetLatch

LatchEnable Statement Example

Function main
    SetLatch 24, SETLATCH_TRIGGERMODE_LEADINGEDGE
    LatchEnable On    'Enable the latch function
    Go P1
    Wait LatchState = True     'Wait a trigger
    Print LatchPos      Display the latched position
    LatchEnable Off     ' Disable the latch function
Fend