LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CML - time stamp in TDMS log file

Hello all,

 

I'm having some issues with the logging VI in the Continuous monitoring and logging sample project.

 

The system time stamp is logged at a higher frequency than the actual data that that is logged.

You can see that the "Untitled-DT string" has 25 samples while the other ones, only one. The second print screen has the "a lot of time" printed and not a lot of data.

DPetrutiu_1-1578649482146.png DPetrutiu_2-1578649587635.png

 

 

DPetrutiu_3-1578649768979.pngThe third printscreen is the addapted Log Data.VI from the CML sample project..

If I add a Wait(ms) then I can't log the rest of the data.

 

If you've encountered this before, can you suggest me how to fix this?

 

Thanks,

Dragos

 

 

 

 

 

 

 

0 Kudos
Message 1 of 8
(3,019 Views)

Hi Dragos,

 

your "Untitled" string has a length of 25 (where does that come from?) while all other items only have a length of 1: this corresponds to your 2nd screenshot showing the data table.

 

On the blockdiagram: what's the point of the inner while loop?

Best regards,
GerdW


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

Hi Gerd,

 

Thanks for the reply,

The "untitled string" is the time stamp string that's logged with the Write TDMS. yes, they correspond to each other from the two print screens.

With the while loop i'm planning to get new timestamp string for every new measurement.

 

Dragos

0 Kudos
Message 3 of 8
(2,972 Views)

Hi Dragos,

 


@DPetrutiu wrote:

With the while loop i'm planning to get new timestamp string for every new measurement.


But as the loop only iterates once (per call of the case structure) it is pointless (or "Rube-Goldberg")!

 

As that timestamp string array written to your TDMS file contains only one element: where does that "length=25" entry come from?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(2,965 Views)

Hi Gerd,

I've removed the while loop, from the case structure and tried it again.

The  "length=25" comes from the how much time I let the program run.

If i leave it longer, the length of  string array increases, and same as the other values.

 

If I'm running the same code, in the unaltered CML sample project, I get it running well (timestamp and all).

The thing is, that currently I'm modifying a code written to log hardware data.

I've tried time sequences also to "slow down" the writing of the time stamp to the TDMS file. No success on that either.

0 Kudos
Message 5 of 8
(2,960 Views)

Hi Dragos,

 


@DPetrutiu wrote:

The  "length=25" comes from the how much time I let the program run.

If i leave it longer, the length of  string array increases, and same as the other values.

The array (as seen in the image above) will always contains just one single element!

The number of items in the TDMS file might get larger…

 

Why don't you wire group labels to those TDMS functions?

Why don't you attach your whole project (as ZIP)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(2,949 Views)

Hi Gerd,

 

Really appreciate your help. I'm attaching the .zip with the whole project.

Just changed the Log File.VI to this:

DPetrutiu_0-1578659479272.png

Will deploy it on the PC that contains hardware and try it out. Let you know if it works.

 

Thanks,

Dragos

0 Kudos
Message 7 of 8
(2,947 Views)

Hi Gerd,

 

The last changed modified the TDMS file, with the timestamp at the start of the log file. Unfortunately, same as before, there was more time logged than samples.

DPetrutiu_1-1578660811213.pngDPetrutiu_2-1578660933105.png

 

The DT_string is 74 now, which means I left the program running longer, around 3-4min.

With the while loop there, and a Wait(ms) block at 60000ms = 1min I got the following:

DPetrutiu_0-1578660737407.png

 

Thanks,

Dragos

0 Kudos
Message 8 of 8
(2,941 Views)