04-26-2017 10:52 AM
Hi,
I am trying to simulate an edge counter using the Simulated USB-6008 in MAX16. I can configure a task "CountEdges" that uses the physical channel DAQ1/ctr0, with PFI0 as the input channel, all on the simulated USB-6008. But unlike the analog input channels I also have configured in a different task, with return values (a sine wave), I get only a 0 (zero) when I run the task in MAX. Am I doing something wrong, missing something, or does the simulation not provide anything other that zero?
Usually I have hardware to try my code against, this time ...
Thanks,
Solved! Go to Solution.
04-26-2017 12:04 PM
FYI, I see the same here, also MAX 16. That particular device seems to have pretty limited counter capabilities.
A quick attempt with a shipping example gave me an error suggesting that only Falling Edge counting is supported, though it gave me that error regardless of which polarity I configured as the active edge. Gotta run now, will check back in later.
-Kevin P
04-26-2017 12:09 PM - edited 04-26-2017 12:10 PM
Falling edge is what the original programmer has setup in his program. I was hoping that the simulation would give me something other than just 0 (zero).
What "shipping example" are you referring to? If in LabVIEW, what version (we are at 2015 here at the moment)
04-26-2017 02:27 PM
It's called "Counter - Count Edges.vi", at least it is in LV 2016. It needed a tweak to get rid of the error -- I needed to wire the 'Active Edge' directly into "DAQmx Create Channel.vi" b/c the default value there would have been rising. After this, no more error but still no counting.
I tried with a couple other simulated devices (6602, 6363) with the same result. No error, no counts. Also true under MAX test panels.
Looks like all the simulated device lets you do is confirm valid config settings. I'm kinda surprised, given that simulated DI simply increments the bit pattern on a port whenever it's read. I'd have expected a simulated edge counter to simply increment count with every read or something like that.
-Kevin P
04-26-2017 02:30 PM
That was what I was hoping for as well. Don't need a sophisticated simulation, but 0 doesn't help at all. Thanks for checking it out on your end as well.