
7 Operation
C-863.12 Mercury Controller
MS249E
Version: 1.2.1
109
Action
Command
Result
Start the SLAVE macro
on the slave controller.
MAC START slave
The axis on the slave controller is still not moving
because the condition for further macro execution
has not yet been met.
Start the MASTER
macro on the master
controller.
MAC START master
Both axes are moving because their velocity is now
each different from zero. The motion occurs
synchronously.
7.7.6
Macro Example: Stopping Motion by Pushbutton
INFORMATION
You can connect the C-170.PB pushbutton box from PI to the
I/O
socket to generate the digital
input signals for use in macros. It also displays the state of the digital output lines via LEDs.
INFORMATION
When macros are recorded on the
Controller macros
tab in PIMikroMove, the
MAC BEG
and
MAC END
commands must be left out.
Action
Command
Result
Connect digital input
line 1 on the
I/O
socket
to an appropriate signal
source.
-
Pin assignment see "I/O"
(p. 266).
For example,the digital input signal can be used for a
conditional jump of the macro pointer.
Record the HALT macro
on the controller.
MAC BEG halt
MVR 1 5
JRC 2 DIO? 1 = 1
JRC -1 ONT? 1 = 0
HLT 1
MAC END
The macro has the following tasks:
▪
Start relative motion of axis 1
▪
Set a condition: If digital input line 1 has the high
state (when using the pushbutton box: button 1 is
pressed), the macro execution pointer jumps two
lines forward. This stops the axis. Otherwise
macro execution is continued with the next line.
▪
Set condition: The macro execution pointer jumps
back one line as long as axis 1 has not yet reached
the target position. A loop is established as a
result.
Run the HALT macro on
the controller.
MAC START halt
Axis 1 starts to move. It is stopped by switching digital
input line 1 to the high state (e.g., by pushbutton).
Irrespective of whether the axis has reached the
target position or was halted previously, the error
code is set to 10 via the
HLT
command.