Innovative Integration
 
Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
X3-SD, snap example code, Elapsed Time is always 0.0

 
Post new topic   Reply to topic    II Support Forum Index -> X3-SD
View previous topic :: View next topic  
Author Message
pitaro



Joined: 04 Jun 2010
Posts: 12

PostPosted: Mon Jun 14, 2010 11:53 am    Post subject: X3-SD, snap example code, Elapsed Time is always 0.0 Reply with quote

When performing data collections, the elapsed time is always displayed as 0.0 seconds. Is this meant to be the elapsed time of a single data collection, or is it perhaps the elapsed time of some message traffic?
Back to top
View user's profile Send private message
jhenderson
Site Admin


Joined: 07 Mar 2006
Posts: 2267
Location: So. Cal. USA

PostPosted: Mon Jun 14, 2010 2:08 pm    Post subject: Reply with quote

To which "elapsed-time" are you referring? The initial input trigger always occurs at time=0, since the internal counter used by the alert mechanism is reset to zero at stream start. The timestamp rollover alert fires when this counter rolls from the max 32-bit value to zero.
Back to top
View user's profile Send private message Visit poster's website
pitaro



Joined: 04 Jun 2010
Posts: 12

PostPosted: Tue Jun 15, 2010 8:19 am    Post subject: Reply with quote

Status messages are displayed in the "Event Log" on the bottom pane of the snap UI. Snap is set for a single channel collection at 100,000 Hz sample rate and 100,000 samples length. When the collection is started, the following status messages are displayed in the Event Log.
    Analog I/O started
    Stream Mode started
    Actual sampling rate: 99.9184 KHz

When the collection is finished, the following status messages are displayed in the Event Log.
    Analog I/O Stopped
    Stream Mode Stopped automatically
    Elapsed (S): 0.000

My question was regarding the last entry in the Event Log. What is "Elapsed" meant to represent? If it is the collection length in seconds, I would expect it to read 1.000, give or take depending on the number of samples actually collected and the actual sample rate.
Back to top
View user's profile Send private message
jhenderson
Site Admin


Joined: 07 Mar 2006
Posts: 2267
Location: So. Cal. USA

PostPosted: Tue Jun 15, 2010 8:47 am    Post subject: Reply with quote

This appears to be a bug. It appears that the Innovative::Stopwatch object Clock is not started properly. To fix this, add the following line to following the call to Stream.Start within the StartStreaming method:

Code:
Clock.Start();
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    II Support Forum Index -> X3-SD (GMT - 8 Hours)
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

© Copyright 2006-2012 Innovative Integration
Powered by phpBB © 2001, 2002 phpBB Group
Based on iCGstation v1.0 Template By Ray © 2003, 2004 iOptional