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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Stamp problem while writing data into the excel file

Hii, All
 
              I am taking the data from the DAQ card of the TOPSCCC with the 8 ms of scanrate for each channel and there are total 16 no of Analog channels in the Card, now i am acquiring the data from the card, time stamping it and writing it into the excel file, which is tab delimited, now the problem is, the data which are in the excel file have the same timestamp for 4 to 5 continuous records, instead we want each data with the different and continuous time stamp with same difference of time stamp between two records, mean if it is difference of 8 ms then it should be the 8 ms for all, but here it is taking the differnce of 16 ms for two samples and giving same time stamp for four to five records and that shouldn't happen, here i am attaching my vi, drivers for the cards and Excel file with the data, can you please give me any suggestion how to do it?
  
       Please help me i require this suggestion as early as possible, i am requiring it urgently.
 
Thanks in Advance,
Nishant
Download All
0 Kudos
Message 1 of 13
(3,236 Views)
Hello Nishant,

the Timestamp in LabView has a limited resolution due to the operating system (probably Windows ?!). Just look in the forum for this topic: 'timestamp resolution'

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(3,224 Views)

Hi,

I think It should be better create the time array as dt ramp (you know the time interval and the number of samples acquired).

 Anyway I attached another "solution" to your problem.

regards

CLD - Labview Certified Developer
0 Kudos
Message 3 of 13
(3,224 Views)
Dear Antea06,
 
        Thanks for the prompt reply, but i could not run your vi, and it is not giving me anything and i couldnt get what it is doing so that i can modify my vi that way, can you please explain me the flow of your vi, so that i can analyse the file and can use it, another thing is ,as you wrote, yes i know the sampling rate and samples acquired, it has the scanrate of 120000 for total 16 no of channels and in one secong, mean 120000/60/16=125 samples/channel/second, so as i can create the time stamp, but i dont know how to do it? can you please help me to make it ready and post it? i require it urgently, infact as early as possible, please do it for me.
 
Thanks,
Nishant
0 Kudos
Message 4 of 13
(3,220 Views)

Hiii, Antea

         Actually this will give the timestamp in 8ms difference in to the starting reference, but also tell me that what should i do if i want it in the Real time format, because i have to stamp in the file with the real time difference.

Thanks,

Nishant

0 Kudos
Message 5 of 13
(3,211 Views)
Hello Nishant,

you (probably) get your samples in an array. So you create a new array with element=index*0.008+start.
0.008 represents 8ms (=125Hz) and start is an optional start time to get a 'full' timestamp.
(Use a for loop to create an array filled with integers, multiply this array with 0.008 and add start time...)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(3,210 Views)

Hiii, GredW

       Thanks for the reply, but will you mind if i ask you to post me the vi that you are trying to say, because , could you please do this favour to me, it is my personal request.

Thanks,

Nishant

0 Kudos
Message 7 of 13
(3,207 Views)
Hello Nishant,

that's what I meant:

Message Edited by GerdW on 05-16-2006 10:32 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(3,204 Views)

Hiii, GredW

       Thanks for the reply man, but i am still not getting what you are trying to say? can you please explain me again? please!!!

Thanks,

Nishant

0 Kudos
Message 9 of 13
(3,198 Views)
Hello Nishant,

as Antea06 told you: this will create a (linear) dt-ramp for your samples. For each sample you get a timestamp...
Input for my example is 'number of samples' and 'start-time' and you get an array of timestamps with 8ms distance. Now you can combine the array of timestamps with the array of samples to give you xy-pairs of (timestamp, sample)!
That's what you need: an accurate timestamp for each sample...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(3,192 Views)