LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO: variable names in loop communication

Hi!

Im using cRIO from few hours,  and taking much advantage from examples.

In the most simply examples it is  shown how to acquire data (for example thermocouples) in high priority loop, and show data in low priority loop by using "loop communication"  shared variable. In my easy application I would like to show on fron panel not only variables data (for example temperatures) but also their tags.

It will help me to design panel with a big amount of data, being sure to link in automatic way tags and data.

Does anybody can help me?

Thank you very much

Antonio

 

0 Kudos
Message 1 of 7
(2,804 Views)

Hi Antonio,

 

I can't understand what "tags" mean, can you explain it to me or make an example?
Thanks!


MarcoMar

National Instruments Italy
0 Kudos
Message 2 of 7
(2,781 Views)

Hi Marco.

Please have a look of attached file.

Lets suppose im acquiring, in typical RT design, a big amount of signals; in a slow loop i will show all signals in the panel using an array. For portability of code im using alias names for variables. Now I would like to build an array showing the names (or alias names) of variables, so the user of project will be able to read all the data with the proper variable names. If i can do this taks, i mean to automatize showing of variables names, i can chage the content of my data array, being sure in names array will be displayed always the right name of variables.

Hope this time i has been clearer.

Ciao

Antonio

0 Kudos
Message 3 of 7
(2,777 Views)

Another idea...you can programmatically obtain all the NSV URLs from a cRIO process, then you can use the SV API to open up references to these variables and display in any fashion.  Since you have an array of channel or tag names in the URL array you can easily correlate to your data.  Also keep in mind that you can directly bind HMI controls to cRIO NSV's as another efficient method to display your data.

0 Kudos
Message 4 of 7
(2,752 Views)

Hi Sachsm

I suppose "Get shared variable list" is a DCS Module. Isnt it?

Unfortunately I dont have that moduleSmiley Sad

0 Kudos
Message 5 of 7
(2,748 Views)

In LV2010 you can use the native Search Variable Container vi to perform this function.

0 Kudos
Message 6 of 7
(2,744 Views)

Or if you do not have LV2010 you can use the Variable Container.AllVariables[] property to get the same list.

0 Kudos
Message 7 of 7
(2,742 Views)