Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling a channel

The harware I am using is PXI-4461.  I am writing my application in Microsoft Visual Studio 2005 using DAQmx functions.  I have one task that contains both ouput pins.  I want to be able to run buth pin or be able to run either pin by it self.  Basically I want to disable one of the pins,  but I want to do this all with out creating a new task and rewriting the data to the pin.  Is there an easy way to do this or is there a trick I can do with the triggers to prevent one of the channels from running.
0 Kudos
Message 1 of 4
(6,580 Views)

Hey Eagle01,

 

There's no way to control which channels are active or not active once a task begins.  Since you're not wanting to have to reload the task each time either, you can't programatically control which channels the task use or don't use.  I would suggest approaching a post-processing method, taking an array out and only grabbing the data important to you once it's established.  Your best way though would be to use a state machine architecture that will perform or load the channels you want or don't want to work and then read.  Let me know if you have any more questions.

 

Thanks,

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 2 of 4
(6,553 Views)
I don't want to change the task while it is running a want to change it before I start it.  The function that writes out the data(DAQmxWriteAnalogF64) takes50 Milli-seconds to return.  I want to try to get this wait time only in init and not have to have it every time I run.
0 Kudos
Message 3 of 4
(6,550 Views)
Once a task has been initialized there is not a way to enable or disable individual channels or pins without stopping, modifying, and restarting the task or changing to a seperate task.  If you're looking at a way to not slow down your program's acquisition, you'll need to do the post processing method I previously mentioned.
David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 4 of 4
(6,547 Views)