Hi,
Is it possible to send position (as well as axis angles, I guess) via serial like in CWRITE/CREAD manual example "in background"?
I mean, can I run concurrently more than one program in Kuka? (KSS 5.2)
Sending position via serial in background
-
cezex -
December 3, 2013 at 1:29 PM -
Thread is Resolved
-
-
Only 2 task available at KUKA
SPS and Motion task.
You can use interrupts in motion task. Or you can write your code in to SPS.
-
I want my robot to send position data via serial all the time, I mean during "teaching" session and while running a program (move).
Forgive me my ignorance, what is SPS? -
submit interpreter.
There is S I R on status bar. Green "S" mean is; you have running SPS.
-
SPS is German for "PLC." The SPS is a KRL program that runs continuously in the background of the robot, regardless of what the foreground program is doing. SPS is used for tasks that must be accomplished regardless of whether the robot is stopped, running, faulted, or otherwise.
You could add serial output commands to the SPS, but since the SPS loops faster than the serial output can keep up with, you will need to create internal status flags to keep from issuing a new CWRITE command before the previous command completes. Putting WAITs of any kind inside the SPS loop is generally ill-advised.
-
Do I have anything else running in SPS?
-
check it out, it is just a file with SUB extension rather than SRC:
KRC:\KRC\R1\SYSTEM\SPS.SUB -
Ok, when I'd find it, what it's supposed to do (I mean SPS routine)? The robot was making cars in it's previous life, now it is going to make films, can I write my own code, ignoring (deleting) it's current SPS?
There are any requirements for SPS without of some robot won't run?
Still I dont get it.
Please point me to a source manual I can find some knowledge, please
Cez -
The sps is a software plc that runs in parallel of the motion task.
You could see it in your system folder. Go into expert mode, go to the system folder and open it. Open all folds and take a look inside. Probably it will have plenty of code lines inside.
Be careful with the folds you delete. I don't have any sps program at hand, but it is easy to see the user code area (it is inside a fold that reads something like "user plc program here").
Good luck.
Sent from my BlackBerry 9300 using Tapatalk
-
SPS is a PLC. it can be used to run initialization or continuous background tasks (regardless if your motion program is running or not, regardless of selected mode of operation). for example you can add code to start/stop conveyor, flash some stack light, do some diagnostics, select or abort programs, force speed limits etc. you can do many things you would do in a motion program but - not motion itself.
overall it looks like:
; start here
; init section (executed one time)
LOOP
; statements inside loop are executed all the time (scan)ENDLOOP
; end, this never gets executed unless there is something to break out of loop
-
I'm really confused. Manual says this:
"Caution!
The Submit interpreter must not be used for time-critical applications! A PLC must be used in such cases. Reasons:"So what is PLC? An SPS or something to be used instead of SPS?
-
-
Thanks but what is PLC? And even if this could (must?) be external, can I send positions from Kuka via serial with this?
-
Yes you can send position data via serial but not in realtime. You can send it as much as sps do.
-
TNX, I didn't mean RealTime, I want to have it "in background". Please tell me where I can find (manuals) some help.
Cez -
Ok, No SPS runnig (nor selected). The Icon "S" is white (grey).
In my opinion, if this is so, I could have my very fresh, own, independent SPS (still no reply about PLC, what is it) code.
Can I? -
PLC is Programmable Logic Controller. Technically it could be anything that has ability to perform control tasks as long as it is programmable. In practice however by PLC one understands specialized hardware platform designed to easily configure and use variety of I/O and networks. For example:
http://en.wikipedia.org/wiki/Programmable_logic_controller
Some common PLCs are:
http://www.google.com/search?hl=en&q…&tbm=isch&cad=h
http://www.google.com/search?hl=en&q…&tbm=isch&cad=h
http://www.google.com/search?hl=en&q…&tbm=isch&cad=h
http://www.google.com/search?hl=en&q…&tbm=isch&cad=hThey can be programmed in various languages (ladder logic, structured text, function block, ...). some are graphical and offer great way to see code in action.
User entered code is scanned repeatedly. scan time (scan interval) is usually 1-50ms. performance of the PLCs is increasing just like any other digital platform (PCs, smart phones).
in recent years there was more products on the market which are not hardware PLC, they are SoftPLCs (software running on a PC). the I/O are added through use of network (fieldbus).
while SoftPLCs are interesting in many ways (can run faster than hardware PLC and use huge amounts of memory compared to hardware PLCs) they also have disadvantages and hardware based PLCs are not to be replaced any time soon. the really nice thing about PLCs is ability to control large number of IO, edit code even while it runs production (online edit). compared to hardware PLCs, making/editing code in SPS task of the robot is a rather cumbersome and inflexible - this is why many users add true (hardware) PLC to their robots. -
So, I cannot use any PLC to send Robot position in background process, yes?
In another words, in my robot S is grey, it means I can put there the example from CREAD/CWRITE manual and run it? -
you have to fix that first... you need S to be green.
normally you should just go to Configure menu and start submit interpreter, but if there is a problem with the code in the SPS (something does not compile), it will again fault and stop SPS.
-
S=Green: SPS is running
S=Red: SPS is halted (possibly faulted)
S=Grey: SPS has been cancelled -- no SPS program is selectedIf you Open the SPS.SUB file, it will automatically be deselected to allow you to edit it. Closing it should re-start it automatically, unless you have induced an error.
SPS has two sections: an init section above the LOOP command, and the main loop between the LOOP and ENDLOOP commands. The init section runs once when the robot boots, or when the SPS is re-started after having been cancelled (Stop/Start will not be enough). The code inside the main loop will then run indefinitely.
-