
7 Operation
C-863.12 Mercury Controller
MS249E
Version: 1.2.1
111
Action
Command
Result
for axis 1.
can be controlled via a joystick.
Start reference move
for axis 1.
FRF 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.
JAX 1 1 1
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.
MAC BEG testjoyb
The macro has the following tasks:
MEX JBS? 1 1 = 0
▪
Stop macro execution if joystick button 1 is not
pressed
JON 1 1
▪
Activate joystick 1
DIO 0 15
▪
Switch on all LEDs on the pushbutton box
JRC 6 JBS? 1 1 = 0
▪
Jump forward 6 lines (to JON 1 0), if joystick
button 1 is no longer pressed
DEL 50
▪
Wait 50 ms
DIO 0 0
▪
Switch off all LEDs on the pushbutton box
JRC 3 JBS? 1 1 = 0
▪
Jump forward 3 lines (to JON 1 0), if joystick
button 1 is no longer pressed
DEL 50
▪
Wait additional 50 ms
JRC -6 JBS? 1 1 =
1
▪
Jump back 6 lines (to DIO 0 15), if joystick button
1 is still pressed