LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to update shared variables

Hi, I have a VI that opens an text file and reads some information from that page. That information should be copied to shared variables. The problem is that I have 160 shared variables and I don't want to drag them all from project explorer to Block diagram and wire them all. Is there any other way to update that data to shared variables? I can easily open and read data with couple of while loops. I'd really be thankful if someone could help me.
 
Mika
0 Kudos
Message 1 of 3
(2,641 Views)

Hi Mika,

are you sure that you really need 160 shared variables? What did you make with this variables? Can you explain in more detail what your program shall do?

Mike

0 Kudos
Message 2 of 3
(2,636 Views)
I do need all 160 variables. I have to make a sequencer.With cFP modules and laptop is ment to specify sequences needed for testing some equipment. I have 16 digital inputs and 16 digital outputs and 8 analog inputs. Those shared variables specify which channel is ON and for how long, and the delay of the channel. There is also variable that tells if channel is in use or not. One variable is channel factor, which tells how many cycles there will be in that cycle time. So if one channel needs only 5 variables, those 40 channels need 160-200 variables.  Shared variables are specified in the user interface and then cFP module can easily read them. In user interface there is also the possibility to open a file that have variables specified earlier. In that point I need to open a text file and update the data to shared variables.
 
Mika
0 Kudos
Message 3 of 3
(2,617 Views)