LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with loops, need to pass value each iteration

On each pass through the whole sequnce structure I am trying too:

 

1.) Set "Enable" true        - Works

 

2.) Set "Valid"    true        - Works

 

3.) Set "Reset" true at the beginning of the sequence      - Works

 

4.) Output a T,F,T,F in that order in the second frame one value at a time (like a clock or pulse train) into my DAQ assist - Doesn't Work

 

5.) Set "Reset" false before starting the whole sequnce over again, with "Reset" being set to true

 

i.e.

 

----------------------

start

 

Enable   - T

Valid      - T

Reset    - T

Clock     -F

Clock    - T

Clock    - F

Reset    -F

GOTO: start

----------------------

 

I don't know if this will need to be done with while loops so that I can use shift registers in order to switch between true and false using the boolean "not"

 

Could someone please point me in a helpful direction.

 

Thanks

-Dan

0 Kudos
Message 1 of 11
(3,671 Views)

My bad, its

 

----------------------

start

 

Enable   - T

Valid      - T

Reset    - T

Clock     -T

Clock    -F

Clock    - T

Clock    - F

Reset    -F

 

GOTO: start

----------------------

0 Kudos
Message 2 of 11
(3,670 Views)

Post the code that you have so far, and tell us where you are hung up.  Your description is not very clear.  Are you using a DAQmx digital output line to produce all of the digital out?  What is the speed of the output?  What is the clock source?

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 11
(3,649 Views)

Try something like this as a start.

 

0 Kudos
Message 4 of 11
(3,643 Views)

Do you know how DAQmx works?  From your picture, in the first loop iteration the DAQ will output the first row of booleans on 4 lines.  Line 1 gets column 1 value, line 2 gets col 2 value, and so on.  The next iteration will get the 2nd row.  I'm not sure what you are trying to do?  Do you have 4 digital output lines?  What is the sequence of booleans you wish to put out on each line?

 

You really need to explain it in more detail.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 11
(3,635 Views)

Ern-

 

really you can upload a vi. look down at the "Add Attachments" link below the

 

"Post/cancel" and

 

"Tags"

 

bars under the edit window while you reply

.....

 ...

  .

down here

 

Message Edited by Jeff Bohrer on 05-27-2010 08:12 PM

"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 11
(3,620 Views)
The original post was 8.6, so I uploaded an image. I thought the original question writer would not be able to open it.
0 Kudos
Message 7 of 11
(3,613 Views)

Attached is a VI with what I am trying to do. I have everything working so far up to the last frame in the sequence structure. I need a way to send a false value to the 4th row of the array going into the DAQ at the end of the sequence. The JPG in the block diagram shows the "clock" signals I am trying to simulate. I know this isn't the traditional way of setting up control lines for all my hardware when people have told me just to generate pulse trains, but why not try it a different way. Plus I could implement this on a lot cheaper DAQ-Card without the need for onboard counters etc....

 

So like I said  above in my post yesterday, I need to set my reset pin HI initially in my first frame, generate a bunch of HI LO HI LO "Pulses" then set the reset pin LO, and start through the whole sequence structure again. How fast this whole sequence runs is arbitrary at the moment. I am only sweeping through 4 channels of the 16 on my multiplexer to gather real time data so I don't need to do this at a very high rate. I don't want to burn up the relays in the multiplexer too soon.

 

Any hints or ideas?

Thanks

-Dan

Download All
0 Kudos
Message 8 of 11
(3,571 Views)

And as it stands now, if I could figure out how to set the reset pin low in the last frame, thus setting my multiplexer back to the first channel, I would only be reading the first Boolean value in my array in the second frame every iteration. So how would I make sure that I:

 

1.) Set "reset" HI

 

2.) Generate 8 pulses

 

3.) Set "reset" LO

 

and start the whole sequence back over?

 

Thanks-Dan

0 Kudos
Message 9 of 11
(3,547 Views)
Look at the example that ErnieH gave and get rid of that sequence structure.
0 Kudos
Message 10 of 11
(3,534 Views)