C-863.12 Mercury Controller MS249E Version: 1.2.1 111
can be controlled via a joystick.
Start reference move
for axis 1.
The axis starts a reference move – here to the
reference switch. After this, absolute axis positions
can be commanded.
Specify which axis is to
be controlled via the
joystick axis.
Axis 1 is assigned to joystick axis 1 of joystick 1.
Joystick control is not yet active.
Record the STARTUP
macro on the
controller.
MAC BEG startup
CPY STORE1 POS? 1
CPY STORE2 POS? 1
CPY STORE3 POS? 1
CPY STORE4 POS? 1
MAC START MAINLOOP
MAC END
The macro has the following tasks:
▪ Initialize variables for storing the position
▪ Start MAINLOOP macro for the main loop
Record the MAINLOOP
macro on the
controller.
MAC BEG mainloop
MAC START TESTJOYB
VAR COUNTER 1
MAC START TESTDION
${COUNTER}
ADD COUNTER
${COUNTER} 1
JRC -2 VAR?
COUNTER < 5
MAC START MAINLOOP
MAC END
The macro has the following tasks:
▪ Start TESTJOYB macro for joystick control
▪ Start TESTDION macro successively for all digital
inputs (i.e., every button on the pushbutton box),
using a loop
▪ Call itself to set up the main loop
Record the TESTJOYB
macro on the
controller.
The macro has the following tasks:
▪ Stop macro execution if joystick button 1 is not
pressed
▪ Switch on all LEDs on the pushbutton box
▪ Jump forward 6 lines (to JON 1 0), if joystick
button 1 is no longer pressed
▪ Switch off all LEDs on the pushbutton box
▪ Jump forward 3 lines (to JON 1 0), if joystick
button 1 is no longer pressed
▪ Jump back 6 lines (to DIO 0 15), if joystick button
1 is still pressed