Monitor robot position through IO

  • Hello all,


    I need to monitor current robot position in real-time through DeviceNet Output port from remote PC. The idea is to program in SPS.SUB by assign $POS_ACT to $OUT with data conversion.


    But an error message is showed: 1419 XYZABC TOOL not programmed.
    I look for Error messages/troubleshooting manual, it tells me that No value has been assigned to the program datum “$TOOL”.


    So I assigned a value to $TOOL, but another error is showed: 1388 $TOOL VARIABLE WRITE PROTECTED IN MODULE SPS.


    How can I send the current robot position to $OUT? using SPS.SUB? or any alternative options?


    Thanks...

  • I don't think you can assign TOOL in the SPS. I use very similar code to yours though, and I have gotten that error. You simply need to select a tool(or assign one in your program) and the SPS error will clear. If it doesn't clear, deselect it and restart it. Note you will also need a Base selected, or that will be the next error you get ;).

  • Monitoring $POS_ACT from the SPS is tricky -- $POS_ACT does not always have a valid value, for example when a Program Reset has been carried out. And since this can happen asynchronously from the SPS, it's very hard to protect against this error.


    If your KSS version is late enough, you could try using ON_ERROR_PROCEED to get around the problem. But you'll want to signal that the data output is invalid.

  • That explains why I have to reselect the submit after every reset ;). Which is not so hard, and more of an annoyance I haven't got around to fixing, but now you have motivated me to fix it. In my SPS, I put that assignments from POS_ACT after a conditional, like:
    IF $ACT_TOOL >= 0 THEN
    IF $ACT_BASE >= 0 THEN


    Assuming this would keep it from failing in the case that they weren't assigned. I think maybe this doesn't account for the fact that POS_ACT could go invalid after the conditional passes, but before all the assignments complete, and hence it always fails on program reset. How does ON_ERROR_PROCEED work? I don't have a new expert programming manual, just a 5.5 one.

  • You'll probably have more luck searching the Forum archives -- I don't recall ever seeing ON_ERROR_PROCEED documented in any of my KUKA manuals. KSS 5.5 might be the earliest version where ON_ERROR_PROCEED got added; that or 5.6, I'm uncertain.
    Newer versions of BAS.SRC make use of ON_ERROR_PROCEED quite a bit. Basically, it works a bit like a CONTINUE command, in that it affects the very next command, and only that one: if that command generates a fault, the ON_ERROR_PROCEED will allow the program to keep running, but sets an error flag that your program can access and use for error handling.

Advertising from our partners