Jump to content
OMRON Forums

PLC Program stops running


bradp

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

[quote=brad] I have a script PLC with various logical branches. When I activate one branch the PLC stops executing. What could cause this? [/quote] Some errors are not based on syntax and can not be caught during the download process. These errors can cause a Script PLC or Motion Program to stop executing. The most likely cause is that there is an illegal operation in that branch of the PLC code. If you have the IDE then start the task manager. Under the PLC tab select the PLC in question and the details box will report the PLC status including the reason why the PLC stopped. To use direct Power PMAC commands use the Plc[n].ldata.status execution status structure. Plc[n].ldata.status (Execution engine status format) Lower 4 bits != 0 means stopped => 4 stopped due to a fault (on this case the upper 4 bits go to zero) 4 == Stopped on an Illegal script operation code 5 == Stopped on a Stack overflow 6 == Stopped on a L-variable stack overflow 7 == Stopped on a Called and non-existent program 8 == Stopped on a Not assigned 9 == Stopped on a Inverse Kinematics Fault (No equations defined) 10-15 == Not assigned < 4 stopped legally 1 == Stopped on a Quit or Prog exceeded Software Limits (For a PLC this stopped due to a PAUSE PLC command.) 2 == Stopped on a Single Step 3 == Stopped on a Breakpoint Upper 4 bits (Mask = 0xF0) 0x8 == 1, Pmatch will be done at start of program (Disregard this bit; for internal F/W use.) 0x4 == 1/0 == Program/PLC 0x2 == 1 Program/Plc is active Active – Running/Valid Stop. If this bit is set && the lower 4 bits are zero the PLC or PROG is Running 0x1 == 1 In Single Step Mode Active – Single Step If any of the above upper 4 bits 0x2 is set, the PLC or PROG is ACTIVE and either Running or stopped due to a valid Stop If it is an error stop, upper 4 bits 0x4, 0x2, 0x1 will be zero. An error stop is if the lower 4 bits are => 4.
Link to comment
Share on other sites

  • 2 years later...
Having discovered that the PLC has stopped because of an illegal operation, is it possible to discover which line caused the error, in a similar fashion to "list apc" for cooordinate systems, or otherwise?
Link to comment
Share on other sites

Firmware dated 8/23/2010 or later has the command to do this. As this is a pre-release firmware it will not be available in the general firmware download location as we want to keep track of who has it. If you need this firmware contact me directly at bradp@deltatau.com The syntax for the new command is: list plcx,apc,y where x=the plc number 0 to 31 and y=the number of lines you wish to list. y=1 lists the aborted program counter line only. Having no y value lists the rest of the plc starting from and including the aborted program counter location.
Link to comment
Share on other sites

  • 6 years later...
[quote='terry@deltasigmacorp.com' pid='9931' dateline='1487790302'] What if the Plc[n].ldata.status returns a 10, which means "Not Assigned"? The PLC will run for about 5-6 seconds then stop with this status. Thanks [/quote] Just noticed that 10 has been updated in the manual to mean "Program stopped on synchronous variable buffer overflow". What does this mean?
Link to comment
Share on other sites

[quote='terry@deltasigmacorp.com' pid='9932' dateline='1487790468'] [quote='terry@deltasigmacorp.com' pid='9931' dateline='1487790302'] What if the Plc[n].ldata.status returns a 10, which means "Not Assigned"? The PLC will run for about 5-6 seconds then stop with this status. Thanks [/quote] Just noticed that 10 has been updated in the manual to mean "Program stopped on synchronous variable buffer overflow". What does this mean? [/quote] Found it. I had a statement like below in the plc. P8 == P9; It compiled and downloaded without errors.
Link to comment
Share on other sites

Synchronous P-variable assignments are valid in PLC programs. In PLCs these can execute at high rates and overflow the addressed CSs synchronous variable buffer if there are no motor or axis moves to remove them. See the section "Synchronous Variable Value Assignment" in the "Power PMAC Users Manual" starting on page 528 for more details.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...