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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting -201300 on DAQmx_Read_ChannelsToRead

Solved!
Go to solution

MAX version 14.5.0f0

DAQmx version 14.2

 

Hi, I'm stating to look at the logging feature.

 

I created a Task in MAX with 4 channels on a simulated USB-6255 device.

Set the Logging mode to Log and Read

Then in my 100% fully functional C++ code to run the Task.

It uses the DAQmx_Read_ChannelsToRead method.

Then I get the error -201300 DAQmxErrorAttributeNotSupportedWhenLogging

Why?

 

-cpede

0 Kudos
Message 1 of 5
(4,311 Views)
Solution
Accepted by topic author cpede

OK, it seems that you cannot change the number of channels AFTER you have configured the logging?

 

-cpede

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

Hi cpede,

 

Once you have set up the channel and the task you can't change the parameters of as task that is running. Would it be possible for you to create multioke tasks and switch between them depending on what you which one you need. 

 

Kind Regards,
Lucas
Applications Engineer
National Instruments
0 Kudos
Message 3 of 5
(4,216 Views)

This is not a problem for me, I just wanted to understand what was happening.

 

I created a task in MAX including the logging, then I loaded and changed the task programmatic using the DAQmx_Read_ChannelsToRead method.

 

-cpede

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

Hi cpede,

 

Once that task had been created you won't be able to modify it at run time. So this is expected behaviour. 

Kind Regards,
Lucas
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(4,212 Views)