Hello,
Is there a way to have a counter output a logical high for n input pulses and a low for the rest of the time? I am running into problems implementing this simple task due to idle-state behavior of CreatePulseChannelTicks and CreateCountEdgesChannel.
The output of the counter is used to gate the device that generates the pulses that are being count. As long as the gate is 'low', no pulses are generated. I run in the following problem:
- When I configure a counter with CreateCountEdgesChannel and use ExportSignals.ExportHardwareSignal to export the 'CounterOutputEvent', the initial state of the output is low. However, I need it to be high to start pulse generation.
- When I configure a counter as a one-shot pulse generator, I have to configure an idle state, delay-, high- and low-count. I tried two combinations:
- idle state low, delay 0, in high the pulse count I want, and low-count very high. However, despite the 'delay=0', the initial output state is low. Thus, my device does not start generating pulses.
- ide state high, delay set to the number of pulses I want, and low- and high-count very high. This does generate the desired gate signal. However, when I stop the counter task, the gate is set 'high' and my device again starts generating pulses. This is undesirable.
Is there a way to set the IdleState when using CreateCountEdgesChannel? Is there a way to have daqmx to ignore the initial delay and immediately start with the counter output in the inverted IdleState?
Thanks,
Maarten van Kampen