zros Posted September 25, 2017 Share Posted September 25, 2017 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. UserAlgo.BgCplcStatus[2] UserAlgo.BgCplcStatus[2]=-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 2.3.1.0. I am running FW 2.1.1.3. Any ideas? Link to comment Share on other sites More sharing options...
zros Posted September 27, 2017 Author Share Posted September 27, 2017 Update on this issue - I have 'resolved' the issue by scrapping the project and starting a new one. I assume something in the Project was corrupted somehow. Link to comment Share on other sites More sharing options...
zros Posted September 27, 2017 Author Share Posted September 27, 2017 Update: 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? Thanks. Link to comment Share on other sites More sharing options...
steve.milici Posted September 29, 2017 Share Posted September 29, 2017 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 More sharing options...
Recommended Posts