hibitor Posted July 12, 2013 Share Posted July 12, 2013 Yes, I wrote a PLC0 program. make it monitor the digital inputs. But when running a long time, it was aways disabled automatically withour any foreboding. It occurs about one time a day(8 hours) on average. the whole PLC0 program is just less then 12 lines. So, anyone can give me some ideas? Link to comment Share on other sites More sharing options...
steve.milici Posted July 12, 2013 Share Posted July 12, 2013 How do you determine the PLC 0 is disabled? A "DISABLE PLC 0" or "PAUSE PLC 0" command, setting I5=0 or 2 or PMAC recieving a CONTROL-D character will stop the execution of a PLC 0. Check to see if any of these are occuring. Do other PLCs continue to run? Can you post the PLC code? Link to comment Share on other sites More sharing options...
hibitor Posted July 15, 2013 Author Share Posted July 15, 2013 How do you determine the PLC 0 is disabled? A "DISABLE PLC 0" or "PAUSE PLC 0" command, setting I5=0 or 2 or PMAC recieving a CONTROL-D character will stop the execution of a PLC 0. Check to see if any of these are occuring. Do other PLCs continue to run? Can you post the PLC code? Yes, this is part of a big windows software, when the PLC0 program was disabled, the software doesn't work properly, So I can see it when it occurs, then I use the 'PeWin32' to watch the state of the PLC. the state of the PLC0 is not running. But the PLC1 and PLC31's (the all others PLC's) running are ok. I checked the points, 'Disable' and 'PAUSE' are not used, I5=3, Controll and 'D' is not triggered at all. the PLC0 code is : ///////////////////////////////////////// IF(M10=0) ENDIF IF(M12=0AND P8001=1 AND M3=0) P8006=72 M3=1 M6=1 ENDIF IF(P8005=1ANDP8002=1ANDM10=0) P8002=0 P8008=1 P8003=65087 M4003=M4003&P8003 ENDIF //////////////////////////////////////////// so, what else other reasons can cause the error? Link to comment Share on other sites More sharing options...
steve.milici Posted July 15, 2013 Share Posted July 15, 2013 If this is the complete PLC0 code then I see nothing that would cause this issue. What is the purpose of the: ///////////////////////////////////////// IF(M10=0) ENDIF Link to comment Share on other sites More sharing options...
hibitor Posted July 16, 2013 Author Share Posted July 16, 2013 If this is the complete PLC0 code then I see nothing that would cause this issue. What is the purpose of the: ///////////////////////////////////////// IF(M10=0) ENDIF Yes, it is entire code. Er.,the "IF(M10=0) ENDIF" is just reserved for future use, no sense at here. Or I should change another piece of Clipper card for a test, is it meaningful? Link to comment Share on other sites More sharing options...
steve.milici Posted July 16, 2013 Share Posted July 16, 2013 Put a dummy counter (P99=P99+1) at the beginning of the PLC to see how many times it scans before it stops. Also send me a full backup of your PMAC to smilici@deltatau.com. Link to comment Share on other sites More sharing options...
hibitor Posted August 8, 2013 Author Share Posted August 8, 2013 I have read the URM recently, and find a 'NOTE', it said that 'it is never advisable to have PLC0 or PLCC0 running on power-up'. But no explaining. So what will happen if so? Link to comment Share on other sites More sharing options...
Gregs Posted August 8, 2013 Share Posted August 8, 2013 That is somewhat of a carryover from non-turbo days with slower CPUs, particularly at 20 MHz. It is much less likely to be a problem with a Turbo PMAC. If foreground PLCs (PLC0/PLCC0) are large enough, a watchdog might occur, especially at power-up. Running a large motion program(s) at power-up will compound the problem. Another consideration is that if background initialization PLCs are large enough, they might not complete before the foreground PLC runs. Link to comment Share on other sites More sharing options...
Recommended Posts