From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tick Count Express VI outputs '0' on FPGA target running with Simulated I/O

Solved!
Go to solution

When I set my target to "Execute VI on Development Computer with Simulated I/O", the Tick Count VIs all output '0 every time they execute. How can I get them to output a progressive count (in the "ticks" instance) or a proper timestamp (in the "ms" instance)?

0 Kudos
Message 1 of 7
(3,363 Views)

Hi David_Staab,

 

What value do you expect from the Tick Count Express VI and can you share a code snippet or the code that shows that the Tick Count Express VI only outputs 0?

 

Also, what version of LabVIEW are you using?

 

Starting with LabVIEW 2013, the Tick Count Express VI uses simulated time rather than real time, when executing your FPGA VI on a development computer with simulated I/O. You can find more information about this in the Version 2013 Features and Changes (FPGA Module) help documentation.

 

Regards,

Tunde S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,301 Views)

I'm using LV 2013 SP1.

 

You want an example VI? Put the "Tick Count" VI in a While loop and connect an indicator to its output. You'll see '0' on every iteration when you run it under simulation.

 

The value I expect is a progressive count (in the "ticks" instance) or progressively incrementing "simulated time" (in the "ms" instance), both with rollover.

0 Kudos
Message 3 of 7
(3,292 Views)

I used LabVIEW 2013 SP1 and I was unable to reproduce this issue on my end. The screenshot below shows my result.

 

tick count.PNG

 

As shown on the Front Panel, the output from the Tick Count Express VI was not 0 on every iteration of the loop.

 

To make sure we are comparing the same code, can you reproduce this issue with the Tick Count shipping example?  You can find this shipping example in the Toolkits and Modules>>FPGA>>CompactRIO>>Fundamentals>>Clocks and Timing>>Tick Count section in the LabVIEW Example Finder.  

 

Regards,

Tunde S.
Applications Engineer
National Instruments
Message 4 of 7
(3,259 Views)

Oh. Change the While Loop to an SCTL. Sorry.

0 Kudos
Message 5 of 7
(3,247 Views)

I'm unable to reproduce this issue with the Tick Count Express VI in the a Single-Cycle Timed Loop. The screenshot below shows the result, on my end.

 

tick_sctl.PNG

 

Would it be possible for you to share the code that reproduces this issue on your end?

 

Regards,

Tunde S.
Applications Engineer
National Instruments
Message 6 of 7
(3,234 Views)
Solution
Accepted by topic author David_Staab

Actually it does work as expected. I apologize. When in [ms] mode it ran so slowly that my test VIs looked like they were failing and I didn't notice the value incrmenting when I probed it. I changed the test to use the [ms] instance when running on the FPGA and the [ticks] instance when running with Simulated I/O. This looks like it gives 1 tick every "simulated millisecond" when simulating, and my tests work fine now.

 

Thank you for the help. Sorry again for the false report.

0 Kudos
Message 7 of 7
(3,197 Views)