LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulate USB-6008 counter

Hi,

   I am trying to simulate an edge counter using the Simulated USB-6008 in LabVIEW. 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 or LabVIEW. 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 10
(3,507 Views)

In my experience, a sine wave is all you'll ever get from simulated devices.  Leaves a lot to be desired, doesn't it?  Smiley Frustrated

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 10
(3,495 Views)

Yeah, kind of hoping that the counter would at least give me random numbers or an increasing/decreasing count (like a 1/2 wave sine).

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 10
(3,492 Views)

Technically, a simulated counter wouldn't give a random number.  It should give you a square waveform with the ability to increase/decrease the frequency.  It would be your responsibility to count the edges.  I've implemented my own very simple simulation VI that is opened up during initialization, if a device is not detected. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 10
(3,484 Views)

Well since MAX gave me the option to create a edge counter task against the simulated USB-6008 I had hopes that it would act similarly to the analog inputs in the same simulated 6008, and return a number other than 0.

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 10
(3,480 Views)

Are you using Square Waveform on the Waveform Generation Palette to simulate?

0 Kudos
Message 6 of 10
(3,428 Views)

Simulated counters are definitely more limited than simulated analog and digital... Post on ni.com/ideas and maybe the feature will be improved in the future!

Message 7 of 10
(3,426 Views)

That simulated counter at least give you confidence that the dev setting are valid.  That is something.  Values would be nice but don't hold your breath.  


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 10
(3,421 Views)

No, I have not build my own simulation of the counter portion, was hoping that since I could configure a task in MAX for the counter portion of the 6008, like I have for the analog parts, that it would give me a value other than 0. Confirming the device settings isn't helpful, I know this device works, at least in the real world, but it would be nice to work on the code when I can't hook up a real USB-6008 and provide the real world hardware that it is trying to count.

Putnam
Certified LabVIEW Developer

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


LabVIEW Champion



0 Kudos
Message 9 of 10
(3,416 Views)

Well, today you cannot do that with a simulated counter task.  You need simulated counts from another source.  Sorry, I didn't write the code though so blame Chris C.


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 10
(3,412 Views)