LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure help

Rusty with labview and need help.
 
Each value (13 total) from an array is selected one at a time to form part of a command which is sent to test equipment.
 
The first frame of the stacked sequence structure should execute all of the array values then move to frame 2. 
 
Note: The only difference in each frame is a value of a channel card, channel "1"  is selected first then channel "2" is selected in the second frame.
 
My problem is the frame doesn't execute all the values in the first frame before moving to frame 2.  
 
If there is a simpler way of doing what I am trying to do please let me know.
 
Mike 
 
 
0 Kudos
Message 1 of 14
(3,374 Views)
Well, that big "Stop" function is probably a good reason why your program is stopping. Smiley Very Happy

You need to spend some time learning about loop auto-indexing, and loops in general. Some specific comments:
  • Are the 2 arrays supposed to be of equal size? Is the loop supposed to run for 12 times (value of control), 13 times (comment in code), or 15 times (hard-coded value)?
  • Why are there 2 separate controls for the number of units to test?
  • You are adding 0 to the loop counter. The point?
  • You have a Time Delay, but it is not tied to anything. Dataflow dictates that this node will execute whenever its data inputs have been specified. Since it has none, it can execute at any time, and not necessarily when you think it will. If you want the delay to occur at a specific time, such as before or after something, you need to have it depend on data from someplace else, such as the error cluster from another VI.
  • You want "The first frame of the stacked sequence structure should execute all of the array values then move to frame 2". That's not what will happen. For each iteration the first frame will execute, and then the next frame. Then, the loop will move to the next iteration.
  • You don't need the sequence frame at all. You can use the error cluster to force data dependency.
0 Kudos
Message 2 of 14
(3,364 Views)

The first thing to do is to remove the stacked sequence structure. 

The structure will execute the first sequence, then the second one.  And repeat that 15 times.

It does not build any array.  You need to re-architecture the code to do what you described. 

If I understand correctly, you want an array of 13 elements for the first channel and then an array of 13 elements for the 2nd channel.  All you need are two loops and index the channels to the outer loop.   A nested FOR loop should do the trick.

RayR

0 Kudos
Message 3 of 14
(3,360 Views)
Big mess, ha.
 
each array is of equal size and there are two controls, the reason is I cut and pasted frame one to frame two and I didn't think of removing one.
I'll try removing the "0" from the loop counter
 
There is a total of 13 values in the array
 
I'll look into using clusters
 
If l am lucky I use labview once a year at work    
0 Kudos
Message 4 of 14
(3,358 Views)

@mikebiker wrote:

I'll look into using clusters

Who said anything about clusters? How did clusters enter this picture? Clusters of what? For what?

You still haven't explained how many times the loop(s) are actually supposed to run. You said there's 13 elements in the array. But you have the loop hard-coded to 15. But you also seem to be trying to make it stop based on a front panel control of something else.
0 Kudos
Message 5 of 14
(3,356 Views)
Thanks Ray I'll try that
 
Not using labview much it's easy to run into problems like this and thanks to folks like you can help point the way a little.
 
Mike
0 Kudos
Message 6 of 14
(3,355 Views)

I'm trying to make each array (of 13 values) run 15 times total.

my misake about custers

 

0 Kudos
Message 7 of 14
(3,353 Views)
Well, there has to be something that you do different in each iteration of 15 times. Right now your code does not reflect what you seem to want, or at least what I can decipher that you want. Perphaps it would help if you explained in words what you have, and what you want to do.
0 Kudos
Message 8 of 14
(3,350 Views)

I am planning to expand the test capability of my first test program I created in LabView a few years ago. Back then it was my first shot using LabView so my final version of this test program became a monster. 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 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 (array). 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 is 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 15 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.

 

 

m

0 Kudos
Message 9 of 14
(3,344 Views)
You will definitely need a completely different architecture. What you're describing is essentially a state machine. Look into how state machines work, and the KB article Application Design Patterns: State Machines is a good start.
0 Kudos
Message 10 of 14
(3,331 Views)