Is there any one who knows how to read an input variable coming from a PLC and use it in my robot's program ?? It's really very urgent !!
Thanks!!
need help with KRC2 !!
-
bigboss -
September 1, 2014 at 10:15 AM -
Thread is Resolved
-
-
Hello. Search for the $config.dat in the R1/SYSTEM, open the USER GLOBALS fold and write your signal: SIGNAL MY_INPUT $IN[1], or if you have BYTE variable: SIGNAL MY_INPUT_BYTE $IN[9] TO $IN[16], same goes for the outputs.
I'm assuming that you already have the connection to the PLC configured in iosys.ini.
Declared signal in $config.dat you can use in robot program "my_program.src":
for example:
-
what do you mean by "read it"?
you can display variable (Display>Monitor>Variable>Single...)
what kind of variable? what KSS? -
my KSS version is "V4.0.18/KUKA4.1". And by "read it" i mean that the operator will enter the value of this variable using the PLC and which will be a point of the robot's new trajectory ie: this point of the trajectory is variable and its values is given by the operator using the PLC that's why i want to know how to read the value of this variable so i can be able to use it after that in my program!! Thank you for your help i've been looking for the solution for a month and i didn't found it yet!!
-
only a month..? I am not surprised, its all clear as mud... we don't know what you have there, if you need help, you need to be much more specific.
what do you mean operator is entering variable, using plc etc? that is something PLC programmer would do, not operator.
do you mean that operator is entering value using HMI connected to PLC, and PLC then sends this value to robot?
or do you mean that value somehow computed by PLC and presented on HMI is something that operator needs to punch in on robot teach pendant?if the data is sent by PLC to robot, how are the two connected (what type of interface or fieldbus)? is I/O mapping carried out? can you see bits change value on one end (such as robot) when you toggle bits on the other side (PLC)? how about the other way?
once you are able to send bits back and forth, you may combine them into integer which can be scaled/converted to real, which can be used to produce offset.
-
yes by operator i mean the PLC programmer. That's what i want to do like you said the programmer is entering value using HMI connected to PLC and PLC then sends it to robot. The robot and the PLc are connected by PROFIBUS. So until now my problem is how to manipulate/use the value coming from the PLC with the KCP of the robot!
-
if you have:
a) profibus working correctly and
b) I/O are mapped correctlythen you have working connection. In other words toggling bit on one node shows up on the other.
In that case you need to pass that value to a variable. common way is to use SIGNAL.
you can declare it in the $CONFIG.DAT, for exampleThen in your code you use it any way you like, for example
-
Thank you for your help!! I will try it as soon as possible and i hope it works!!
-
And if i'll need to map I/O for this variable how can i do it??
-
if robot is configured as profibus slave, everything is done in PFMBS.INI file, and IOSYS.INI.
i/o mapping is done in IOSYS.INI. this was discussed many times.
-
ok thank you!