LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I pass changing values to a single channel with an array or queue?

Solved!
Go to solution

Hi, 

 

I need to pass a changing digital waveform (e.g. High-Low-Low-High ... where a new signal would come every clock cycle) to a single output port. I also need to input the desired waveform beforehand (preferrebly in the form 1001).

 

There are multiple ways to do this - I tried messing with the queue and spi functions but couldn't get them to work. 

 

Right now I'm using an one-dimensional bool array to get the input. I then pop the first element off the array and write it to my DAQmx (this is essentially a queue). I put this in a loop such that it would run until the array is empty but for some reason it just pops the first element. It isn't moving to the others ...

 

This is my first time with labview so explanations are greatly appreciated.

 

 

I've attached a picture of what I have so far.... It's important to note that I'm eventually going to input 32 bit binary strings so that's why my block diagram is a little funny. Also, Arrays 2 and 3 aren't doing anything special - they're indicators.

Capture.JPG

 

 

0 Kudos
Message 1 of 3
(2,821 Views)
Solution
Accepted by topic author goozeman

goozeman wrote:

Right now I'm using an one-dimensional bool array to get the input. I then pop the first element off the array and write it to my DAQmx (this is essentially a queue). I put this in a loop such that it would run until the array is empty but for some reason it just pops the first element. It isn't moving to the others ...


Of course not.  You are not updating the array.  Even then, I think what you really want to do here is use a FOR loop so that you can autoindex on the array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,806 Views)

I actually realised that shortly after posting. Thank you anyway!

0 Kudos
Message 3 of 3
(2,769 Views)