User manual

Brick Controller User Manual
MACRO Connectivity 160
5. Clock settings considerations
The MACRO ring is synchronized at phase rate. Keep in mind that the phase clock frequency
must be the same on both the master and the slave.
The MACRO IC must be sourcing the clock (parameter I19). A Save followed by a $$$ are
required whenever I19 is changed.
It is advised to have both the MACRO and servo ICs set at the same phase frequency.
I19 = 6807 ; Clock source, MACRO IC 0
I6800 = I7000 ; Macro IC 0 MaxPhase/PWM Frequency Control
I6801 = I7001 ; Macro IC 0 Phase Clock Frequency Control
I6802 = I7002 ; Macro IC 0 Servo Clock Frequency Control
6. Make sure that the motors are fully operational and can be controlled in closed loop (e.g. jog
commands). Position PID tuning is not critical at this point. Fine tuning of the slave motors should be
eventually performed from the master side.
7. Kill all motors
8. MACRO ring settings
I80, I81 and I82 enable the ring error check function.
I85 specifies a station number which the slave unit is assigned to (e.g. multiple slave stations).
I6840 specifies whether this is a master or a slave.
I6841 specifies which MACRO nodes are enabled. Note, that it is not advised to enable nodes
which will not be used.
I85=1 ; Station number #1 User Input
I6840=$4080 ; Macro IC0 Ring Configuration/Status, typical slave setting
I6841=$0FF333 ; Macro IC0 Node Activate Ctrl (Servo nodes 0, 1, 4, 5, 8, 9, 12, 13) User Input
#define RingCheckPeriod 20 ; Suggested Ring Check Period [msec]
#define FatalPackErr 15 ; Suggested Fatal Packet Error Percentage [%]
I80=INT(RingCheckPeriod *8388608/I10/(I8+1)+1) ; Macro Ring Check Period [Servo Cycles]
I81=INT(I80* FatalPackErr /100+1) ; Macro Maximum Ring Error Count
I82=I80-I81*4 ; Macro Minimum Sync Packet Count
9. MACRO slave command address
Ixx44 specifies the MACRO command address and mode for slave motors.
I144=$178423 ; Macro IC0 Node 0 Command Address. Torque Mode
I244=$178427 ; Macro IC0 Node 1 Command Address. Torque Mode
I344=$17842B ; Macro IC0 Node 4 Command Address. Torque Mode
I444=$17842F ; Macro IC0 Node 5 Command Address. Torque Mode
I544=$178433 ; Macro IC0 Node 8 Command Address. Torque Mode
I644=$178437 ; Macro IC0 Node 9 Command Address. Torque Mode
I744=$17843B ; Macro IC0 Node 12 Command Address. Torque Mode
I844=$17843F ; Macro IC0 Node 13 Command Address. Torque Mode
Setting Ixx44 to the MACRO command register hands control of the motors to the master. To allow
motor commands from the slave again, Ixx44 needs to be set back to default of zero.
Ixx44 must be set for at least one channel to allow MACRO auxiliary
mode, thus enabling MX commands.
10. Issue a Save followed by a reset $$$ to maintain changes.