LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Override On/Off valve in while loop

Solved!
Go to solution

How are doing the initialization part at DAQmx start ?share the code with all modules included or the image of your program

0 Kudos
Message 21 of 38
(939 Views)

That beyond me im afraid.

i have only ever DAQ Assisstant to run mutliple lines, or single line inputs to DAQmx so i dont know how to initialize this VI.

 

0 Kudos
Message 22 of 38
(935 Views)

Have modified aeastet's VI.  Try this program and let us if you get any error 

0 Kudos
Message 23 of 38
(930 Views)

Yes i tried that earlier by merging some of your VI with that one.

I still get an error. (attached) I had to re-write the VI in 8.5 but i presume its the same. (i also changed the line in to the correct link)

Download All
0 Kudos
Message 24 of 38
(925 Views)

Ok here you are doing wrong, see the comment in the VI which I modified, Input lines should be like this,

 

cDAQ1Mod1/port0/line0,cDAQ1Mod1/port0/line1,cDAQ1Mod1/port0/line2,cDAQ1Mod1/port0/line3,

cDAQ1Mod1/port0/line4,cDAQ1Mod1/port0/line5,cDAQ1Mod1/port0/line6,cDAQ1Mod1/port0/line7

 

The attached VI has only one line but the selection is "one channel for all lines" .

 

So select all the lines in DAQmx create channel VI, and let us know if you get any error in the create channel VI itself.

 

 

 

0 Kudos
Message 25 of 38
(923 Views)

I tried a few different things but still get the error.

I also now can't seem to get the DAQmx write to work with a test task. I get the same -200524 error.

 

However if i open up Measurement & Automation explorer and run the same task from there its works perfectly!

 

 

Download All
0 Kudos
Message 26 of 38
(918 Views)

Oh Brother Smiley Surprised, NI 9472 is 8 channel DO, my bad man, in the input also include "cDAQ1Mod1/port0/line7"

 

so your new input should be "cDAQ1Mod1/port0/line0 to cDAQ1Mod1/port0/line7" , I had written this in previous response, the error code just says you aren't using all the inputs but you are trying to write to many,

 

Click here to know more about the error,

0 Kudos
Message 27 of 38
(911 Views)

Haha, i cant seem to get the number of channels in the task to match the number of channels in the data.

 

For the 'lines in' i have selected line 0 - 7: cDAQ1Mod1/port0/line0:7

For the 'ine grouping' i have selected 'one channel for each line'

 

the error i get is:

200524

Number of Channels in Task: 8
Number of Channels in Data: 9

 

If i use line 0 - 6, i get the error:

200524

Number of Channels in Task: 7
Number of Channels in Data: 9

 

If i use lines 0 - 8, i get the error:

200170

because channel 8 doesnt exist

 

 

If i change the 'line grouping' to 'one channel for all lines' then i get the error:

 

Number of Channels in Task: 1
Number of Channels in Data: 9

0 Kudos
Message 28 of 38
(903 Views)

ha ha interesting isn't it Smiley HappySmiley Very Happy the below selection is not ok

 

 

For the 'lines in' i have selected line 0 - 7: cDAQ1Mod1/port0/line0:7

For the 'ine grouping' i have selected 'one channel for each line'

 

 

Attached is the same VI with simple modification and I bet this should work for you, have comments where changes has been made and where you need to make changes.

 

Let me know,

0 Kudos
Message 29 of 38
(899 Views)

Its working! Smiley Very Happy

 

Thank you so much for your help, both of you!

0 Kudos
Message 30 of 38
(891 Views)