LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing Array in a Unique Manner

Solved!
Go to solution

Hi All,

 

I'm new on this and have tried for several hours how to do the following "simple" thing without any success. I'm using a cDAQ 9171 with a NI 9263 analog output module.

 

My Problem: I need to start the following program when Start button is pushed. Please, in order of priority I'm giving you what I have to do.

 

1. Analog output from an array that haves fixed values. Let it be 5 ; 4 ; 3 ; 2 ; 3 ; 4 . So I need to stay 1min in each value and then repeat the whole array for  10 times more.

 

I Tried with the attached project, but it only generated a 1V signal, even when the appended array was changing...I don't know what happened.

 

2. I wanted to create automatically the array i mentioned before. But it gave me so much headache that i left it.

 

Thanks in advance for your help.

 

 

 

 

0 Kudos
Message 1 of 4
(2,923 Views)
Solution
Accepted by topic author iapetus2001

Dataflow.

 

No data gets written to the DAQ Write until your For Loops complete.  That is because the write is outside of the For Loop.

 

I would recommend you turn on Highlight Execution and watch our your VI runs in slow motion.

 

Then I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

Message 2 of 4
(2,912 Views)

Thanks! it worked almost like I thought...hehe but due to this matter was urgent, then I used it as it was.

 

Thanks! review attached project.

0 Kudos
Message 3 of 4
(2,876 Views)

Take advantage of auto-indexing tunnels to break out the data in your array.  And if you use 1 channel 1 sample rather than N channels 1 sample, you won't need to take that scalar value and build it back into an array.

Message 4 of 4
(2,867 Views)