07-15-2010 07:24 PM - edited 07-15-2010 07:28 PM
Hi,
For the USB 6525, is it possible to control the input and output independently of the same device in different part of the VI? If yes, how would the code looks like? (Appreciate a diagram or example in LV7.1)
For example, one loop probes the input, and another loop controls the output independently based on some conditions. The loop that reads the input is using change detection, so the task once started, doesn't stop until the application ends. With this condition, is it possible to start another task to control the output ports? Or this there some workaround?
Appreciate any info/advise.
Thanks.
Rgds
07-16-2010 12:38 PM
Input and output cannot be in the same task anyway.
Therefore, you must program them independently.
07-17-2010 03:05 AM
07-18-2010 07:42 PM
Hi KateB,
Thanks for your reply.
For the USB-6525, the input and output is different port.
Do you have any sample diagram or LV7.1 code for a basic configuration? or perhaps some links? I couldn't find any example for what I'm trying to do.
From what I'm aware, the same device cannot be in different task in the same VI. Is it true?
If that is the case, How do I program the VI to create 1 task for the input and another task for the control of the output if the I/P & O/P cannot be in the same task?
Rgds
07-18-2010 10:19 PM
I don't understand the problem. You could have an input task on Dev1/port0 and an output task on Dev1/port1.
07-18-2010 10:26 PM - edited 07-18-2010 10:27 PM
Meaning if I have 1 device, USB 6525, I can configure a task A for dev1/port0, and task B for dev1/port1, and run the 2 task simultaneously in the same VI?
Can I also configure task A for dev1/port0/line1, task B for dev1/port0/line2 etc.. and run them simultaneously? Anyone can confirm?
Maybe I have read wrongly somewhere that says that the same device can only be called once in a VI.
I also tried running 2 tasks simultaneously from the same device but only 1 task will run. Emailed the NI support but until now no reply from them.. so have to depend on the forum for any assistance/advise.
07-18-2010 10:36 PM
You are not using the same hardware when you specify port0 and port1 or port0/line1 and port0/line1.
07-18-2010 10:43 PM
1. Couple of examples available in Help>>Find Examples>>Hardware Inout and Output>>DAQmx>>Digital Generation, Digital Measurements. Just merge them together for simultaneous input and output.
2. For the same type of task (input or output), you must put them in the same task for one device.
07-18-2010 10:57 PM
@Dennis Knutson wrote:
You are not using the same hardware when you specify port0 and port1 or port0/line1 and port0/line1.
Oh.. So dev1/port0/line1 and dev1/port0/line2 is not the same hardware and there can be separate task for each?
I just tested and it seems to work independently... Thanks!! Somehow.. the manual/application note/help never seems to mention this..