Delta Tau Forums
Macro Power Up - ModBus - Printable Version

+- Delta Tau Forums (http://forums.deltatau.com)
+-- Forum: Delta Tau Data Systems (http://forums.deltatau.com/forumdisplay.php?fid=1)
+--- Forum: Turbo PMAC (http://forums.deltatau.com/forumdisplay.php?fid=6)
+--- Thread: Macro Power Up - ModBus (/showthread.php?tid=627)



Macro Power Up - ModBus - Richard - 08-10-2011

If the Macro ring is not up, any Macro communication commands can cause the USB/Ethernet processor to not detect the PMAC cpu. Furthermore, the ModBus (if configured) configuration will not be retrieved.

In general, regardless of ModBus status, do NOT send any Macro communication commands until the Macro ring is active, and faults are cleared.

Clearing Macro Station (at least 1st MACRO IC), and Ring Controller Macro faults in a start-up PLC (see example below) should alleviate this problem.
Note that this requires I80, I81, I82, MS{},I8, MS{},I9, and MS{},I10 to be set properly.

The Ring Active bit is in the Global Status word.

Code:
End Gat
Del Gat
Close

#define RingActiveBit M8000
#define ClrfRequest   P8000    

RingActiveBit->Y:$6,9,1 ; Macro ring active bit - Must have I80, I81, I82 set
ClrfRequest=0           ; Macro clear faults request flag          

Open PLC 1 Clear
ClrfRequest=1        ; Request to clear Macro Faults
If (RingActiveBit=1 AND ClrfRequest=1)
    CMD"MSCLRF15"    ; Clear Faults Macro IC0                    
    I5111=250*8388608/I10 while(I5111>0) endw    ; 250 msec delay
    CMD"CLRF"            ; Clear Faults Macro IC0
    I5111=250*8388608/I10 while(I5111>0) endw    ; 250 msec delay
    CMD"MSCLRF15"    ;    Clear Faults Macro IC0
    I5111=250*8388608/I10 while(I5111>0) endw    ; 250 msec delay
    ClrfRequest=0    ; Reset request flag
EndIF
Close