LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

looking for suggestions

I am planning to expand the test capability of my first test program I created in LabView a few years ago. Since this was my first shot using LabView my final version of this test program became a monster. So I have a chose to start from scratch and put together a new, more creative and mainly more efficient program or modify the beast of a program I already have. I'm not sure what direction to go right now. I am not an expert using LabView by no means; this is basically my first and last test program I created. This test program does the following:

 

I push the start button on the front panel

 

LabView commands the data switch (34970) to output a logic high (5 v) to switch a multi-channel RF relay. This relay is a one in, 12 out coaxial relay with 12 logic terminals for switching the relay.

 

So, one at a time the relay switches in and out depending on the logic line selected from LV. Each of the twelve coaxial outputs from the relay is connected to the device under test (DUT). The RF input port of the relay is connected to a network analyzer (also under the command of LV) to measure VSWR. 

 

When all connected and test program running, each of the 12 DUT's are measured at room temperature. Then the temp chamber (not under command of LV but running in auto mode) goes to 100 deg and soaks for one hour.

 

After one hour all 12 DUT's are re-measured. The process is repeated when the temp chamber goes cold.

 

There are 12 temperature cycles total. At the end of each half cycle data or VSWR is measured and stored as a *.png file within the network analyzer.

 

My question is how can I simplify this program? My test program right now is so...messy; it has 6 while loops within each other and my block diagram are a mile long. 

 

Looking for suggestions 

 

Mike    

 

0 Kudos
Message 1 of 5
(2,774 Views)
Hi Mike,
i think some changes are enough. Don´t start from the scratch. I think you can use a Producer/Consumer structure (with Events). See the shipped examples in LabView for more information about it. Combine the consumer loop with a state diagram structure, there you can program some wait states.

Hope it helps.
Mike

Message Edited by MikeS81 on 06-18-2008 09:19 PM
0 Kudos
Message 2 of 5
(2,766 Views)
Thanks Mike I'll look into it.
 
Mike
0 Kudos
Message 3 of 5
(2,753 Views)
I would start from scratch, but re-using functional code (create commands, send commands, read data, etc) from the old app. Create subVI's from the functional code, logic one that each perform a distinct function, it look like there is lots of duplicate code, e.g. create command to set voltage with voltage as input and command string as output.

For the architecture I would as Mike suggested use a producer/consumer structure with event structure to handle the user interaction. If the event structure is available to you that is the recommended way to deal with user interaction imho.

To cleanup the old, start by replacing the 16 iterations while loop with a for loop and wire the 16 to N.

Good luck and don't hesitate to post new code and ask more questions about it.
Regards,
André (CLA, CLED)
0 Kudos
Message 4 of 5
(2,734 Views)
Thanks for the info Andre.
 
Mike
0 Kudos
Message 5 of 5
(2,722 Views)