Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

change frequency of the counter task

Hi,

I create a counter task in MAX (continuous), then loaded it. StartTask -> it is running OK.

 

Now, I want to change the frequency using DAQmxSetCOPulseFreq(task, "Dev2/ctr0", rate)

 

I receive Error "Specified property is not supported by the device or is not applicable to the task. Error -200452 (fffcf0fc)"

 

What could be wrong ?

Boris

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

Hi Boris, 

 

What DAQ device are you using for this task? What other DAQ devices do you have on your system? To what rate are you trying to set the frequency of the counter?

 

I want to learn more about the issue you are facing, but in the mean time the follow KnowledgeBase aritcles on error -200452 may be helpful. 

 

KnowledgeBase 1

KnowledgeBase 2

 

Take a look through them and let me know if they were helpful. 

 

 

Best Regards,

Thomas B.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(5,966 Views)

Hi Thomas, thank you for reply.

Ive followed an advise in different thread to recreate counter task and thus change it frequency, and it worked.

 

Just in case we will arrive to some other way to do it, these are the details:

 

ni-6289 x-series board, NIDAQmx 9.7, Win 7

 

three tasks are created DO, AO and CO clock used as sample clock for the above. The clock is ctr0.

 

The issue was with the attempt to reprogram the clock frequency

Boris

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

Hi Boris, 

 

I am glad to hear that you got it working. I originally misread that you were importing the task from MAX. The fact that it wouldn't let you change the frequency is expected. Creating a separate task in your development environment in order to be able to change the frequency is probably the best solution. 

 

Take care. 

Best Regards,

Thomas B.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(5,938 Views)