Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling 50 indicators

Hello-

 

  I am a very beginner LabView programmer. I have a simple vi that monitors up to 50 voltages from an Agilent 34970. I have case for three different situations. One will be to read all 50, another to read 25 and last to read 15. What I am trying to do is use the T/F visible property node to display or not display the indicator. It seems like I need to have 150 of these property nodes to take care of all these scenarios. I was wondering if there was a more efficient way to do this.

 

I have included the incomplete vi for reference.

 

Also I would appreciate any input on my programming style or tips that could help me out. 

 

 

Thanks,

Scott

0 Kudos
Message 1 of 4
(3,620 Views)

As this is more of a LabVIEW question you would have received more visibility by posting in the LabVIEW forum as opposed to this forum. Regardless, here's my take on it: Don't use 50 separate indicators. The penalty in terms of having to change the visibility of the controls is quite high. You can alleviate this by deferring panel updated, but there are better ways to do this. Since you basically have three groupings (15, 25, 50), you could create three clusters. One cluster would contain the first 15 values. The second cluster would contain 16 through 25. The third cluster would contain 26 through 50. Then, all you'd have to worry about is hiding/unhiding 2 clusters, rather that a few dozen numeric indicators. The array coming from your read can be easily split into subarrays of that size and you can use Array to Cluster (appropriately sized to the size of the cluster) to directly convert it to the cluster.

 

Other comments:

  • Use VISA. Use VISA. Use VISA. Use VISA. Have I mentioned to use VISA?  
  • There's a driver for the 34970 on IDNET. It seems you are already using this to convert the string read returned from the GPIB to an array. Is there no VI in there to perform the read without you having to create the command yourself? Even if there isn't, read bullet 1.
  • Don't start relying on sequence frames. I can see why you were using them for the peeling off of the values, but be aware that they have a tendency to hide code and make you think sequentially rather than in dataflow.
  • Index Array does not need to have every single index input wired. The default is to start at zero with no index value wired in. The index value is automatically incremented by 1 when you expand it. 
Message 2 of 4
(3,600 Views)

Thank you for your input. I have seen VISA on some of the later examples I have downloaded, but the software I copied was GPIB read/write commands. I will try and learn VISA.

 

I did use the stacked sequence just for real estate savings and can understand how it could get very messy.

 

Thank you very much for the unwired index array tip, that will be very helpful.

 

 

Sorry about posting in the wrong forum. First post failure.

0 Kudos
Message 3 of 4
(3,594 Views)

Attached is a crude example to give you an idea of how you can use the three clusters as I had suggested. Note that the Array to Cluster function has to be appropriately size (right-click and select Cluster Size...).

 

 

Message 4 of 4
(3,587 Views)