12-06-2012 12:19 PM
Hello,
I want to create a while loop that iterates EXACTLY every 1ms. Any ideas?
Thanks
12-06-2012 12:22 PM - edited 12-06-2012 12:22 PM
Use LabVIEW real time, or even LabVIEW on an FPGA which can run loops at 40MHz.
You can use a timed loop in Windows but that timing cannot be used reliably because Windows is not deterministic.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
12-06-2012 01:55 PM
What do you want to do at exactly 1ms? There may be a workaround without RT.
12-07-2012 09:37 PM
I want to count pulses for 1ms, then reset the counter and then count again pulses for 1ms etc.
12-07-2012 09:50 PM
I take it this is in relation to the other thread you started for which you haven't received an answer?
12-08-2012 03:20 AM - edited 12-08-2012 03:20 AM
Hi Evangelos,
why do you want to reset the counter? Using a shift register and taking differences (by subtraction) is much more easier...
Also:
- Using your USB6009 on plain Windows isn't the right environment for "extremely precise" timing (as said before).
12-09-2012 04:47 PM
@Evangelos wrote:
I want to count pulses for 1ms, then reset the counter and then count again pulses for 1ms etc.
Here's a community example that shows how to do this using hardware timing: Use Counter to Create a Clock for a Buffered Edge Counting Task
However, it won't work with a USB-6009 because it requires a device that supports multiple counters and buffered edge counting (e.g. TIO, X Series, cDAQ, M Series).
Brad