LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Channels for this program?

Hi,

I have built the following VI and was wondering if there was any way it could be modified to use multiple (at least 2 but preferably 4-6) channels. I was trying to maybe make the same thing repeated 4 times wo the user could do what is being done now on 4 seperate channels. I'm not sure I can do that the way I'm doing it now as it become very slow. Thanks for any suggestions.
Intern NSWCCD Carderock.
0 Kudos
Message 1 of 15
(3,605 Views)
use channel syntax like

0 channel 0
0,1,2 channels 0,1,2
0:2 channels 0 thru 2 (same as above)

0:6 channels 0 thru 6

0:6,7 channels 0 thru6, and 7

0:7 channels 0 thru 7
etc
0 Kudos
Message 2 of 15
(3,601 Views)
Thanks for the reply, but I understand that part. I guess I should have been clearer. My question really is once I get those multiple channels read in from AI Read block, is there any way to unbundle the different channels that were input and plot them on seperate graphs? Thanks.
Intern NSWCCD Carderock.
0 Kudos
Message 3 of 15
(3,599 Views)
just use the index array function

Index 0 would be data of first channel in the list
Index 1 would be data of second channel in the list
Index 2 would be data of 3rd channel in the list
etc....
0 Kudos
Message 4 of 15
(3,594 Views)
Hmm, that doesnt seem to be working as everything that comes out is channel 0 (ie if I have channels 0,1,0 all three will output 0, or if I have 1,1,0 all three will output 0. I reattached the version I have now and have no idea why this is happening. Thanks for any help.
Intern NSWCCD Carderock.
0 Kudos
Message 5 of 15
(3,582 Views)
The way you are indexing it is fine.

However, do you get an error message ?
why do you want to scan channels twice (I am not sure if this works, never used it like that before)

<< if I have channels 0,1,0 all three will output 0, or if I have 1,1,0 all three will output 0. >>
instead of using 0,1,0 just use 0,1 or 0:1 and see if it works
Note also for some old daq cards, channels is decending order is not allowed)
0 Kudos
Message 6 of 15
(3,575 Views)
I don't get any error messages, but I don't understand what you mean by "scan channels twice" (I'm new to labview, this is my 3rd day using it). Thanks a lot for all your help it is much appreciated.
Intern NSWCCD Carderock.
0 Kudos
Message 7 of 15
(3,568 Views)
You probably cannot go in descending order, use 0:1 to get channels 0 and 1, your indexing is fine and should work.

here are a couple of tips to make your vi run faster.

Put the AI config and AI start outside the loop so that you are not reconfiguring them each time the loop runs, also use the open, write, close file vi's manually. put the open outside the loop at the beginning (like you already have), then write to it during each loop iteration and then put the close outside the loop. this way you are not opening, writing and closing the same file every time the loop iterates.And what he means by scanning channels twice is going from 0 to 1 and back to 0 in the same scan, scans are done going from 0 to however many channels your bord has. if you put in lets say 0:9 the scan will scan channels 0-9 in ascending order then repeat.

just giving some input

Message Edited by jhoskins on 05-31-2005 11:56 AM




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 8 of 15
(3,569 Views)
Could you post the version of labview you are using and the DAQ Board model #. This will help us help you.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 9 of 15
(3,466 Views)
Here you go:

LabView 7.1

DAQ CARD- 6036E


Thanks.
Intern NSWCCD Carderock.
0 Kudos
Message 10 of 15
(3,462 Views)