Programming Storage of Current Position on Event
(Original Document)
Instruction
The instruction for storage of current position on event is as follows:
Instruction
Instruction code
Icon
Storage of current position on event
07
After execution of this instruction, a change of state awaited on the event input of the axis control module causes the current position to be stored.
During configuration and in the position parameter X, you can choose to store one or two positions (PREF1 and PREF2):
Storage of Current Position
The following table illustrates storage of current position, according to the choices made during configuration:
Event type on the EVT input
Diagram
Choices made during configuration
Rising edge
Rising edge and PREF1
Falling edge
Falling edge and PREF1
Rising edge
Rising edge and PREF1, then rising edge and PREF2
Falling edge
Falling edge and PREF1, then falling edge and PREF2
Rising and falling edge
Rising edge and PREF1, then falling edge and PREF2
Falling and rising edge
Falling edge and PREF1, then rising edge and PREF2
Event processing is activated on detection of an event, if bit 12 of parameter M is set at 1.
The program passes directly on to the following instruction. The PREF1 (%IDr.m.c.9) and PREF2 (%IDr.m.c.11) words are only refreshed if an event task is triggered by the awaited event.
The performance of the G07 instruction, or in other words the measurement / event delay is immediate for an incremental encoder and less than or equal to 400 microseconds for an absolute encoder.
Example of How to Use an Indexed Position
An indexed position is used to resolve repetitive movements. For example, let us assume that the elementary movement sequence below has to be performed 9 times:
In this example, it is assumed that the reference point is already set and the moving part is in the source position.
NOTE: The sequence of elementary movements is shown in bold on the curve. The numbers indicated correspond to the numbers of program steps included in the SMOVE function.
Program
The elementary movement sequence program is as follows:
NOTE: All the actions have to have been programmed on activation.