
MAC END
The macro has the following tasks:
■
Start BUTTON3 macro
■
Call itself to set up the main loop
5. Record the BUTTON3 macro on the controller.
MAC BEG button3
MEX DIO? 3 = 0
HIN X 0
MAC START pbloop
MAC END
The macro has the following tasks:
■
If button 3 is not pressed: End the execution of BUTTON3
■
If button 3 is pressed: Disable HID control and start the loop for checking buttons 1, 2
and 4
6. Record the PBLOOP macro on the controller.
MAC BEG pbloop
MAC START button1
MAC START button2
MAC START button4
MAC START pbloop
MAC END
The macro has the following tasks:
■
Start the BUTTON1, BUTTON2 and BUTTON4 macros in succession
■
Call itself up to create the loop to check buttons 1, 2 and 4
7. Record the BUTTON1 macro on the controller.
MAC BEG button1
MEX DIO? 1 = 0
MVR X 1
WAC ONT? X = 1
MAC END
The macro has the following tasks:
■
If button 1 is not pressed: End the execution of BUTTON1
■
If button 1 is pressed: Start a motion of axis X over distance 1 in the positive direction
and pause the macro execution until axis X is at the target position
8. Record the BUTTON2 macro on the controller.
MAC BEG button2
MEX DIO? 2 = 0
MVR X -1
WAC ONT? X = 1
MAC END
The macro has the following tasks:
■
If button 2 is not pressed: End the execution of BUTTON2
■
If button 2 is pressed: Start a motion of axis X over distance 1 in the negative direction
and pause the macro execution until axis X is at the target position
9. Record the BUTTON4 macro on the controller.
MAC BEG button4
MEX DIO? 4 = 0
HIN X 1
MAC START LOOP
MAC END
8 E-871.1A1N FUNCTIONS
PZ285EN
‒
1/30/2019
100
M O T I O N | P O S I T I O N I N G