04-09-2010 02:11 AM
I'm thinking of using DAQmxSetCOPulseIdleState(..., DAQmx_Val_Low) for 0% duty cycle, and DAQmx_Val_High for 100%.
The attribute is only settable when the task is not running (btw: any way to get from DAQmx whether a task is running or not? Since it's never 'done' when using DAQmx_Val_ContSamps timing). So when 0% or 100% is needed the task is stopped and I set the idle state.
The problem is, my PCI-6013E doesn't care. If I stop the counter output task, the output always goes to 0V (and then 5V after DAQmxResetDevice).
So, does this work with newer cards only - and if, which ones?
04-15-2010 08:20 AM
Hi,
why exactly do you want to set th Idle State?
E, M and S-Series cards do not support setting the Idle State while the task is running.
Solution: Simply set the Idle State before you start your task.
Hope this helps,
04-16-2010 02:46 AM
Why? 100% duty cycle = task stopped, idle state high; 0% = task stopped, idle state low. I assumed it's supposed to work this way.
I know that I have to stop the task, there's an error if I do it while the task is running.
And you can't set it in advance, that is before you start a task, because one doesn't know, if the next needed duty cycle is 0% or 100% or x%...
04-20-2010 04:10 AM - edited 04-20-2010 04:11 AM
Hi,
I don't understand how you came to the conclusion 0 or 100% duty cycle would stop the counter output task?
Idle State is the behaviour of your card if a task is stopped but not cleared (see this). Depending on your application you might need to set your power-on states. We do have cards that support this feature, unforunately the PCI-6013E does not (check E-Series manual, p. 4-9). Please contact our sales department for help selecting the right card for your application.
If you need some additional information on the DAQmx programming concepts, please refer to this or the DAQmx help (Start»All Programs»National Instruments»NI-DAQ»NI-DAQmx Help.)
Unless you provide further information what exactly you need to get done I cannot provide more support to you.
Best Regards,
04-21-2010 03:19 AM
Thanks for your answer. I see now, that I wrote pretty unclear. I hope this is better:
I know that 0% or 100% duty cycle don't stop the task. Setting these values result in an error and the task keeps running with the previous setting. So I thought that I can do 0% or 100% by stopping the task and setting the idle state to either low or high.
There was no error but the PCI-6013E didn't 'care' about the settings. I wondered whether my assumption was wrong what the idle state is supposed to do, or that the E-Series just couldn't do different idle states. Thus my post.
You're saying the idle state feature is only supported on some cards, right?
04-21-2010 04:04 AM
Hi,
here are your answers:
I hope this makes it clear for you.
Best Regards,