From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-07-2016 10:55 AM
I am fairly new to labview and am having a problem with the Tick Count (MS) function. In my program that is attached the count comes out very high after just a few seconds. For example after about 5000 ms the count reads 87,000,000 ms. This is a pretty simple program that I am just trying to have turn on lights at set times and turn them off at set times. I have put a numeric indicator in the first case so that I can see the tick count on the front panel.
Any help would be greatly appreciated,
Kelsey
07-07-2016 10:58 AM - edited 07-07-2016 11:05 AM
The Tick Count is not a timer, it is a clock. It's giving you a tick cound in units of milliseconds between 0 and 2^32. You need to use it twice and subtract in order to time something.
Turning on and off lights at set times may be easier by using the Elapsed Time VI.
There is no loop in your VI, so I'm guessing you are using the Run Continuously button? You should look in to using a While loop along with Elapsed Time to do what you're trying to do.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-07-2016 11:07 AM
Look at this little VI, and before you try to run it, decide (for yourself) what it is going to do. Then give it a try. Welcome to LabVIEW's Timing Functions.
Bob Schor
07-07-2016 11:10 AM
I see an uninitialized shift register
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-07-2016 11:33 AM
So do I. So what (in this particular case)?
BS
07-07-2016 11:38 AM
In this case, it means your LED will start at an inconsistent state as you know. It doesn't really matter for the flashing function, but for demonstration purposes I like to remove inconsistencies so we don't get a new topic in a week when a shift register like this is causing a bug in someone's code. Core 1 and Core 2 courses also emphasize initialized shift registers because the CLD marks off for it (unless it's an FGV of course).
In the end, I was just giving you flak.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-07-2016 12:13 PM
Of course -- flak accepted. Find me at NI Week and I buy you a beer (or glass of wine).
BS
07-07-2016 12:16 PM