User's Manual

Table Of Contents
16-Axis MACRO CPU User Manual
58 How to use the 16-Axis MACRO CPU
MACRO ASCII Communication Mode
MACRO ASCII Communication Mode allows direct access to the MACRO Device. This mode of
communication allows our Master controller to setup all MACRO devices in the ring one at a time using
the Ring Order Method. One other benefit to this method of communications is that it allows direct
communication to the MACRO device without having to issue MS commands as in the traditional
PEWIN Terminal window.
Usually, the MACRO ASCII Communication Mode is the mode that is used to set up the MM-variable
definitions, set MP-variables, and down load the MACRO PLCC programs.
At a minimum, set the following I-variables to enable MACRO ASCII mode communications.
I6840=$4030 ;to enable MACRO IC0 as sync-master and node 14 for
;auxiliary communications
I6841=$0FCxxx ;to enable node 15 and 14. If activating nodes 0,1,4,5
;we would set I6841=$0FC033
I79=32 ;Timeout value for Node 14 Auxiliary communications
If using more than one MACRO IC, then set up I6890, I6891, I6940, I6941, I6990, and I6991 appropriately.
Once the communication variables are modified, they must be saved to the memory of the controller with the
save command and then reset the controller with either a $$$ command or power cycle the controller.
Note:
The PMAC Controller will be able to communicate to the MACRO Device in
MACRO ASCII communication mode after the unit has been restarted with the
changes saved to its memory.
How to Enable and Disable MACRO ASCII Communication Mode
To start the MACRO ASCII Mode, issue the MACSTAn (n stands for the assigned station number for the
device) command to the device in the ring. In many cases, there will be one device only and a number
may not be assigned to the device. In that case, use the MACSTA255 or MACSTA0 commands. The
actual number that is assigned to the device resides in MI11 of the MACRO Device and the default value
is 0. If there are multiple MACRO devices in the ring and communication is in MACRO ASCII mode,
set up the systems with the Ring Order Method and assign station numbers to each device. If the assigned
station number is not known, check MI11.
Once in MACRO ASCII Mode, communicate to the MACRO device is done directly. To change an MI-
variable or create an MM-variable definition, write directly to the Variable in the terminal window.
MI996=$0F803F ;To activate Nodes 0,1,2,3,4,5 at the MACRO Device
MM80->X:$8001,0,24,s ;Set M80 to the Counter register of channel 1
To exit or disable MACRO ASCII Communication mode, issue the <CTRL>T command.
Note:
MACSTA255 command will look for the first MACRO device that does not have
have a station number assigned to it (MI11=0). As soon as MI11 is changed to a
value greater than zero, then it will look immediately for the next device with
MI11 set to zero.