Tick Count behavior | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Tick Count behavior
March 17, 2015
5:46 pm
Avatar
Ashtar
New Member
Members
Forum Posts: 2
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

I have a VI that uses the output of the Tick Count VI as part of my logic. I kept getting an intermittent error in logic and narrowed down to what it seems to be an erroneous behavior of the Tick Count VI that sometimes unexpectedly outputs zero. Is there a reported bug on that primitive?

March 17, 2015
9:26 pm
Avatar
filipealtoe
Admin
Forum Posts: 98
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Hi Ashtar;

Nice job narrowing down the issue. Can you give me more specifics of when you see the error occur?

Cheers
Filipe

March 17, 2015
9:31 pm
Avatar
Ashtar
New Member
Members
Forum Posts: 2
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

It seems that every time I disconnect my Arduino from the USB port, the first time it runs, I see the erroneous behavior.

March 17, 2015
9:52 pm
Avatar
filipealtoe
Admin
Forum Posts: 98
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Ah, ok. In fact, what you are seeing is actually expected behavior. The Arduino targets don’t have an internal RTC (real time clock). What that means is that, every time the Arduino is power cycled (by disconnecting it from the USB port) the internal tick count maintained by its internal counter is zero’d. That is why the first time you run the program after it was disconnected from the USB you see the output of the Tick Count return zero. To avoid this from happening, you will need to prevent the Arduino from power cycling; by either connecting an external power supply or battery pack to it if you need to constantly disconnect it from your USB port.

Cheers
Filipe

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
4
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356