Jump to content
OMRON Forums

background Cplc status returns -1


Recommended Posts

I have written several background C plc's. When I check the status of my second bgcpcl[2], it returns -1. According to the SW Ref manual, range on this should be 0..1.





I get this status regardless of whether I have enabled or disabled this bgcplc.


What does a -1 status indicate?


I'm not sure if this is related, but I don't see the any bg c plc's listed in the Task Manager anywhere. Finally, not sure if this is somehow related to this thread:


http://forums.deltatau.com/showthread.php?tid=2528 which reports an issue with bg c plc's not running or updating after upgrading to FW


I am running FW


Any ideas?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic



I assume the Project was somehow corrupted - so I started a new Project and now can see the CPLC listed on the task manager.


I also wonder about my usage of UserAlgo.BgCplcStatus[0] at the terminal window. I can't find any documentation on this element even though it shows up on the auto-completion list for the terminal window. The tool tip indicates that this should display the background C PLC execution status. This doesn't seem to work as it now returns 0 regardless of the execution state of my C PLC.


Issuing UserAlgo.BgCplc[0], for example, does correspond to the state of the C PLC.


Does anyone know if UserAlgo.BgCplcStatus is a deprecated feature?



Link to comment
Share on other sites

UserAlgo.BgCplcStatus is an undocumented status only structure indicating the "project download" status of the code:


0 ... code downloaded successfully

-1 ... the code does not exist (this could be due to project corruption or property set other than "Compile")

-2 ... the object code failed to download (usually due to ftp administration issues or project corruption)


There currently is no "live" status bit indicating "enable status" as this code will go in and out of scope by the PMAC RT scheduler. The Task Manager uses UserAlgo.BgCplc to indicate status.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...