Jump to content
OMRON Forums

fsave with csglobals


jtaseff
 Share

Recommended Posts

Hi there,

We're testing out using fsave/fload instead of our implementation of something similar. Couple of questions.

 

Is there a way to deal with csglobal variables? I tried putting this in the .tpl file:

&1 csvar1

&2 csvar1

 

And in the .cfg file, I only get this, which won't work to reload to the correct coordinate systems:

Q1024 = 10

Q1024 = 20

 

 

 

 

Additionally, is there any way to have it work with variable names? For example, if I always have it fsave a global by name, myvar1 gets stored as P1111. But if I update the project to add a new global before that, myvar1 is now in P1112, and the next fload will put the saved value into the wrong place in P1111.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Is there a way to do it by name when accessing Coord[x].Q, or a way to programatically find the Q-number of a named variable? Would much rather be able to save by name if the project changes around, instead of tracking Q numbers around by hand
Link to comment
Share on other sites

For anyone else trying this, I did find a way around the csglobal problem:

 

In the .tpl file, I can have it run this to output the currently addressed CS:

&1
Ldata.coord
csvar1
csvar2
&2
Ldata.coord
csvar1
csvar2

 

This produces the following in the .cfg file on fsave, which seems to load things in properly on fload.

Ldata.coord=1
Q1024=10
Q1025=20
Ldata.coord=2
Q1024=30
Q1025=40

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...