gshort Posted May 12, 2011 Posted May 12, 2011 I had a subprog that consisted of: open subprog EnableESTOPReset // Nothing to do close I was calling this conditionally from a PLC that is common to other projects and in those other projects this subprog had code in it to perform machine-specific functions. What I found is that when I called this from a background PLC, that PLC stopped with a status of 7 which according to http://forums.deltatau.com/showthread.php?tid=11&pid=16&mode=threaded means "7 == Stopped on a Called and non-existent program". The subprog does exist and is included in the symbol table and there's no error in the mapping of the subprog.
Sina.Sattari Posted May 12, 2011 Posted May 12, 2011 gshort, In Power PMAC, opening a buffer (PLC, PROG or SUBPROG) will erase the contents of that buffer and if no line is written into the buffer (comments will be discarded) before close statement, then the firmware assumes that you want to remove the specified buffer. So your program is essentially clearing the buffer and the error code you get is correct. Regards,
gshort Posted May 12, 2011 Author Posted May 12, 2011 Fair enough that it is expected behaviour from your perspective. It would be at least useful to add a warning in the docs.
Recommended Posts