Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6008 simulated timer in MAX

Solved!
Go to solution

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,

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 1 of 5
(2,738 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 5
(2,715 Views)

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)

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 5
(2,713 Views)
Solution
Accepted by topic author LV_Pro

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 5
(2,700 Views)

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.  

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 5
(2,698 Views)