01-15-2007 09:37 PM
01-16-2007 07:37 AM
1. Sounds odd -- can you post code? How exactly do you determine the # of ticks to be something in the 46-53 range? With clean signals, I've never seen counters behave erratically. I'd want to first make sure that the method used for verification is sound.
2. (I'm going by memory but am 90% of this answer.) In LabVIEW, you can specify falling edge sensitivity when you create the "count edges" virtual channel. You can also configure it via a DAQmx Channel property node.
-Kevin P.
01-17-2007 10:09 AM
Here is the code. I have the start icon in the next sequence.
I am checking the number by collecting the pulses and the output of the counter on two ADC channels (all tasks are synced to start at the same time). I can then look at the number of clock pulses, and see how many there were before the trigger went. IT seems to be variable, and I am not sure why.
Could you tell me which icon I need to select to change the pulse direction it counts? I have tried the ones, and could not find the correct one.
01-17-2007 10:14 AM
01-18-2007 09:32 AM - edited 01-18-2007 09:32 AM
Hello mheien,
The Counter Output (Ticks) will generate a pulse which is high/low for the specified number of timebase ticks. Using the example program, Gen Dig Pulse-Retriggerable.vi and modifying it to include a property node to specify a falling active edge should give you the results you are looking for. The property you need to set is a channel property under Counter Output>>General Properties>>Counter Timebase>>Active Edge, shown below. I used the timebase for the trigger as well.
Here is the result of a task I ran for an output high of 5 ticks and output low of 5 ticks. You can see the timebase in red and my output in white.
Hopefully this helps,
Jennifer O.
Applications Engineer
National Instruments
Message Edited by Jennifer O on 01-18-2007 09:33 AM
10-28-2020 07:30 PM
Hi Jennifer,
May I ask how did you generate the feed for the graph that shows your timebase and the output? I have to ask because there is no such an example named "Gen Dig Pulse" in my example finder. Also, would you please generate a code screenshot?
In my configuration of the DAQmx blocks, the only type that shows a trigger is its name string, well, you know, it's not a real trigger signal.
10-29-2020 05:20 AM
There are no DAQmx counter task functions that will produce the data needed to produce such a graph. Counter output tasks produce real world output signals but the DAQmx API does not produce any *data* representing those signals which could be sent to a graph or chart indicator. Counter input tasks produce data, but not the kind pictured. It'll give you something like edge counts or timing interval measurements (which are, at core, just a convenience wrapper around a particular kind of edge counting operation).
To see a scope-like display of the counter output *signal*, you would need to physically wire that output signal over to an input pin of your DAQ device and then create an input-oriented task to capture it. It's probably easiest to do this with an AI task. I'd further recommend an AI sample rate at least 20x your counter output frequency.
-Kevin P