Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use the internal clock w/ crank angle degree (CAD) recording in labview 5

Courtney,

 

I do have LabVIEW 2010, but our group only has old DAQ boards like AT-MIO-16E-2 on an old PC.  Since there is no budget for me to get a latest DAQ device, I have to stay with the old ones for all my tests.  Thanks for the help.

 

Bobby

0 Kudos
Message 11 of 18
(3,241 Views)

Hey bobbylee,

 

Can you post a screenshot of what you have so far in your VI (or list the VI you're using to do the write)? 

 

Best,

 

 

0 Kudos
Message 12 of 18
(3,236 Views)

Please see the attached files.  This VI was made maybe 10 years ago, and I am not familiar with all the icons honestly.  Nevertheless, the screenshots are the data-saving part.

 

Thanks.

Download All
0 Kudos
Message 13 of 18
(3,229 Views)

Hey bobbylee,

 

I'm wondering if it would be possible to use something similar to what I had sent you earlier (with the time stamps) but only take a time measure of say every fourth sample (this would reduce the rate of time stamping from 4000 samples/sec down to 1000 samples/sec) and then extrapolate the other three time points afterwards in software to get a time estimate for all points. Would something like this fit into your application? What kind of accuracy are you looking at for time?

 

Best,

 

Courtney L.

Applications Engineering

National Instruments

0 Kudos
Message 14 of 18
(3,212 Views)

Hi Courtney,

 

Taking one time stamp every 4 singals might do the job, but I have tried to program the item you showed in my VI and failed to get the data out.  It seemed to be a connection problem since I saw broken lines after my try.  Is it possible for you to show me a simple example?  Thank you.

 

Bobby

0 Kudos
Message 15 of 18
(3,206 Views)

Hey Bobbylee,

 

Courtney is out of the office this week so I'll see if I can help you. Here are some screenshots of how you could extrapolate the time for all your readings. Windows isn't very exact as to when things happen so if you keep calling the Get Date/Time function once every second, there is no guarentee that it will happen every second exactly, it may happen 1.5 seconds later. 

 

In my example I get the timestamp value for when you start the task, then I decimate it into the individual values and readd it back to seconds. Then you can add the constant time difference for each sample to the value to get a time stamp on every value. My method only works for calling one sample at a time so you may need to rearrange things. Also it is using Greenwich time which may or may not be fine for you, to fix it all you would need to do was subtract your timezone off of the hours and then check if the # is negative. 

 

Hope this helps. 

Kyle Hartley
Senior Embedded Software Engineer

Download All
0 Kudos
Message 16 of 18
(3,190 Views)

Hi Kyle,

 

Thanks a lot!  I will try to learn from the pics, and hopefully it will serve my need.  Any time zone is fine since I only need one for reference.

 

Bobby

0 Kudos
Message 17 of 18
(3,186 Views)

Bobby,

 

Hopefully you can find all the functions if you can't find one or don't know the name I can add them to another post. I just went to look up all the vi's I used and I figured out another way of doing the same this with less string manipulation. Check it out if you want. I got most of the first screenshots from reading this KB https://decibel.ni.com/content/docs/DOC-19298. I just found the Seconds to Date/Time which does all the parsing for you.

Kyle Hartley
Senior Embedded Software Engineer

0 Kudos
Message 18 of 18
(3,168 Views)