Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems changing state in DAQmxTaskControl

I've created a DOChan within a task programatically using DAQmx functions exported from nicaiu.dll and DAQmxTaskControl always fails with the error "Action Request is Invalid."

Please can anyone tell me how do you sucessfully validate a task?

It fails with the same error when trying to change to any other state, eg commit reserve etc.

Note, the task runs okay and I get the correct output if I omit the explicit change of state.
0 Kudos
Message 1 of 3
(3,369 Views)
Daniel,
You should be able to call DAQmxTaskControl(DAQmx_Val_Task_Verify) to verify your task.
If thats what you are doing, and it isn't working could you please post a small snippet that reproduces the problem ?
Thanks!
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team
0 Kudos
Message 2 of 3
(3,360 Views)
Nandan,

Again thanks for your help. DAQmxTaskControl works fine in C / C++, and I don't have time to fully investigate what I was doing wrong from VBA. When I get a chance I'll investigate further, and for your interest post a reply.

Everything is working well now - I'm pleased with the NI stuff, thanks!

Daniel
0 Kudos
Message 3 of 3
(3,329 Views)