June 19, 2019, 03:07:04 AM
Robotforum | Industrial Robots Community

 Accessing a variable in a local .dat

normal_post Author Topic:  Accessing a variable in a local .dat  (Read 154 times)

0 Members and 1 Guest are viewing this topic.

June 10, 2019, 03:14:52 PM
Read 154 times

Alexander Kalis

Hi guys!

First time poster, long time lurker.

I have the following situation:

My team and I are programming a press line with KUKA.PressTechReady using KRC4 KSS8.3.38, KR120 R3500 Press.

One part of the comissioning includes doing the LoadDataDetermination on each robot (7 total) and on each tool (20+).

The thing is, PressTechReady stores the load data of each tool inside the .dat file of each different program; so program100.dat has a different load data than program101.dat. LOAD_DATA[] in $config.dat is not used. You must manually input the load information after performing a load data determination, which is very time consuming.

So, the question is the following:

Is there a way to access each one of those individual local .dat files and modify that local variable using another program? Let me explain: I want to create a program "loadDataTransfer.src" that will take the values saved by the KUKA Load Data Determination in the $config.dat file, ask the user for the program number (using OrangeApp SmartInputBox) and then transfer the data automatically into the program .dat file.

So the process would look like this:

User performs loadDataDetermination->loadDataDetermination ends (user assigned the load values to tool X)->my program loadDataTransfer is triggered->user inputs program number Y->LOAD_DATA[X] is transfered to the local load variable of programY.dat.

Thanks a lot, hope I explained myself well enough.

Today at 03:07:04 AM
Reply #1



June 11, 2019, 04:39:45 PM
Reply #1


Global Moderator
This is a scope issue.  Any variable located in the .DAT file of a module, without a GLOBAL declaration, is only accessible by subroutines inside the SRC file of that module.

And unless each local Load variable has a unique name, you don't want to simply add GLOBAL to their declaration -- that way lies namespace collisions, and "silent" errors.

What you can do, is add a line to each program that accesses that LOAD_DATA array (which is Global by default, being part of $CONFIG.DAT), and alters the local Load variable to match that member of LOAD_DATA.

Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

Local variable to a Output group

Started by kewal on Yaskawa Motoman Robot Forum

4 Replies
Last post June 13, 2018, 02:16:50 PM
by 95devils

Started by Bober on Yaskawa Motoman Robot Forum

3 Replies
Last post June 23, 2016, 08:45:47 PM
by Bober
Accessing Position variable of user frame

Started by motorobo on Yaskawa Motoman Robot Forum

5 Replies
Last post June 11, 2013, 05:12:54 PM
by automationig
Regarding Local Variables

Started by rAviteja_g on Yaskawa Motoman Robot Forum

1 Replies
Last post August 28, 2017, 11:59:21 AM
by 95devils