LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple serial connections

Solved!
Go to solution
I have a program running that has three serial connections and a GPIB connection. Because of this I have visa wires running every which way. Is there some way to organize it so I dont have tons of these wires running through my program and I can make it more compact? Possibly using an array somehow?
0 Kudos
Message 1 of 6
(3,517 Views)
Solution
Accepted by topic author GregFreeman

An array will certainly work but I think I would use a bundle by name to create a cluster. Then, using the unblundle by name it's clearer as to what resource you are using instead of just using an index array function.

 

Message Edited by Dennis Knutson on 10-28-2008 02:47 PM
Message 2 of 6
(3,513 Views)
Thanks, ill try this tomorrow. Much appreciated.
0 Kudos
Message 3 of 6
(3,505 Views)
I have done what was suggested with the bundle and I am using a stacked sequence structure. The only problem I am running into is if I have multiple frames I need to unbundle the visa session again and then I have more visa closes than I want. My code works, I am just looking for ways to make it more effecient/clean it up, etc Essentially my program reads pressure and temperature and writes it to a file, shows the values on the front panel, and plots them vs. time on the front panel. The comments in the code should help clarify what is actually happening. Anyways, if someone can let me know a better way of using this bundle so that I don't have those extra visa closes I'd appreciate it. Thanks.
0 Kudos
Message 4 of 6
(3,424 Views)

Don't have the VISA wire run to the edge of the loop from each and every frame of the stacked sequence.  Outside your loop you are trying to close VISA resource 1 three times and VISA resource 3 three times.  Do you ever use the VISA resource name 2?.  You open VISA resource 2, but never seem to use it and close it.  Outside your loop, just unbundle the resources from your cluster wire and close each resource.  You don't need a VISA close for each purple wire from every frame.  You just need a VISA close for each VISA resource that you open.

 

Also, I recommend getting rid of the stacked sequence and replacing it with a flat sequence.  Even the flat sequence may not be necessary if the error wires are used to enforce the order of execution by way of data flow.

Message Edited by Ravens Fan on 11-12-2008 03:02 PM
0 Kudos
Message 5 of 6
(3,414 Views)
Thanks I think I got it working. One of the fallbacks of teaching Labview to yourself is clearly not understanding exactly how data flows :). Much appreciated
0 Kudos
Message 6 of 6
(3,407 Views)