From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

C# DAQMX Dynamicly change task AI channels

Hello,

 

I would like to ask if is somehow possible to dynamicly change/add or remove) in code list of analog input channels in same task without dispose task?

 

 

 

Regards!

 

 

0 Kudos
Message 1 of 4
(5,289 Views)

Hi,

 

It is possible to change them in LabVIEW  

Dynamically Change the Lines in a DAQmx Analog Input Task Using an Event Structure   https://decibel.ni.com/content/docs/DOC-7103

 

Thereferore it should be possible in C too.

 

Regards,

0 Kudos
Message 2 of 4
(5,261 Views)

Hello,

 

thanks for reply.

 

If I understand correctly you need to clear-dispose task and then create new task. This takes quite some time.

 

Isn't it possible to create task than START, acquire signal, STOP, UNRESERVE and then reconfigure channels in task(remove old, add new)?

 

Regards!

 

 

0 Kudos
Message 3 of 4
(5,248 Views)

Hi,

 

Unfortunately not.


In order to change physical channels DAQmxCreateTask(), DAQmxStopTask() and DAQmxClearTask() has to be used.

 

Regards,

 

Andrej Korošec,

AE NI EE

0 Kudos
Message 4 of 4
(5,228 Views)