05-09-2013 04:07 AM
hi guys,
i am using x series NI-USB 6341. i've created a block diagram as below.i provided a 5V DC voltage to channel 1 and 3V dc voltage to channel 2 in one task.the problem is, i failed to obtain the same voltage reading as provided at the input terminal after i seperated the channels from that task by using arrays..can somebody explain what did i lack of or maybe something wrong with my block diagram.i also already attached the VI.thank you.
Solved! Go to Solution.
05-09-2013 09:19 AM
Move your initialization code outside of the loop. You don't need to keep reinitializing the task. You should setup the task once before the loop and close the task once after the loop. You can then only perform the read inside of the loop.
05-09-2013 10:57 AM
Hello syedanas,
You can find the implementation of crossrulz statements below. Also you do not need to create an array to feed n channels into the DAQmx Create Virtual Channel you can simply drop down the control/constant and specify both of the channels.
Best Regards,
Izzy O.
Applications Engineer
National Instruments
05-09-2013 11:35 AM
thanks for helping.but,do you see somthing wrong with my arrays?i did not quite understands about it.i want to separate the two voltage input from the read.vi to form channel 1 and channel 2 voltage.did i got i wrong?please help.
regards,
anas
05-09-2013 12:08 PM
HI Izzy O,
this one obviously can be understand by me.but, i do not need to concatecenate the two physical channel during the initialization to obtain two different input from two analog input pin do i?
05-09-2013 04:05 PM
@syedanas wrote:
thanks for helping.but,do you see somthing wrong with my arrays?i did not quite understands about it.i want to separate the two voltage input from the read.vi to form channel 1 and channel 2 voltage.did i got i wrong?please help.
regards,anas
Just use the Index Array. Each channel will use a row in the 2D array. The code shown already does this.