キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Tick Count Giving Very High Result

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

0 件の賞賛
メッセージ1/8
5,232件の閲覧回数

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.

Elapsed.png

 

 

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 件の賞賛
メッセージ2/8
5,228件の閲覧回数

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.

Flasher.png

Bob Schor

0 件の賞賛
メッセージ3/8
5,215件の閲覧回数

I see an uninitialized shift register スマイリー ウインク

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 件の賞賛
メッセージ4/8
5,213件の閲覧回数

So do I.  So what (in this particular case)?

 

BS

0 件の賞賛
メッセージ5/8
5,205件の閲覧回数

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>   ---'


0 件の賞賛
メッセージ6/8
5,204件の閲覧回数

Of course -- flak accepted.  Find me at NI Week and I buy you a beer (or glass of wine).

 

BS

0 件の賞賛
メッセージ7/8
5,187件の閲覧回数
If I want to calculate timer I would suggest you to use get timer in milliseconds at different instances and find the difference of two which gives actual timer
----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 件の賞賛
メッセージ8/8
5,183件の閲覧回数