LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong Timestamps with "Write To Measurement File"-VI

Solved!
Go to solution

Hi,

 

I am trying to create an Excel file with the "Write To Measurement File"-VI to show the timestamps from the operating System of the Computer and some measurements. I configured the Start Time to "Now" when the measurements are converted to Dynamic Data and also in the configuration of the "Set Dynamic Data Attributes". Timestamp is also configured for the Dynamic Data Attributes.

 

The Problem is that, the "Write To Measurement File"-VI just saves the timestamp from the moment when I configured the Start Time.

 

I attached my program in LabVIEW.

Please, can you help me to find what is wrong with my program?

Thanks.

 

PS: I saw already the link https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MhsSAE&l=de-DE, but it didn't help me.

Download All
0 Kudos
Message 1 of 8
(3,184 Views)
Solution
Accepted by topic author Ruano

Hi Ruano,

 


@Ruano wrote:

The Problem is that, the "Write To Measurement File"-VI just saves the timestamp from the moment when I configured the Start Time.

Please, can you help me to find what is wrong with my program?


The problem is the use of ExpressVIs and their bluish DDT wires…

Why don't you use a simple WriteDelimitedSpreadsheetFile to create some formatted text? Very simple and fool-proof!

Example:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(3,168 Views)

Hi GerdW,

 

thanks for your help. But I don't understand the Problem.

 

Why is the use of ExpressVIs and the bluish DDT wires the Problem?

 

I used your proposal and it works, but it is not exactly what I need. If the ExpressVIs and the DDT wires can't be used for my purpose, I will take your proposal for the base of my development

0 Kudos
Message 3 of 8
(3,147 Views)

Hi Ruano,

 


@Ruano wrote:

Why is the use of ExpressVIs and the bluish DDT wires the Problem?

I used your proposal and it works, but it is not exactly what I need.


ExpressVIs and DDT wires hide a lot of stuff from the programmer, and sometimes do a lot of unneeded stuff. It's usually better when the programmer is in full control of its software…

 

Can you explain this "not exactly what I need"? What do you need and what did you get so far?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 8
(3,141 Views)

@Ruano wrote:

 

Why is the use of ExpressVIs and the bluish DDT wires the Problem?

 


IMHO: Because Express VI's were basically written for those two hour LabVIEW Seminars sales pitches. So they could show managers and other non-programmer decision makers how fast you can "just throw something together", but as you are finding they are not really that useful for a "real world application".

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 8
(3,131 Views)

Hi GerdW,

 

what I need is the creation of an Excel file. In the first line (Header) "Time" and the names of the measurements have to appear.

I attached an Excel file as example. Actually the file was made with my program and I am really close to get my goal, but for the Problem of the time.

In the example file, there are some measurements. But in the final Version of my program it will be much more measurements and using the ExpressVI and the DDT wires was the easiest way to get this Excel file.

Because I saw this link  https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MhsSAE&l=de-DE, I thought I just configured something wrong and there is an easy solution…..

 

…. but if there is no easy solution (That's why I want to know, why the Problem is in the ExpressVIs), I will have to change my program and use your proposal.

By the way, how could I transform the Spreadsheet File to an Excel file? Do you have an advice?

 

Thanks for your help!

0 Kudos
Message 6 of 8
(3,124 Views)

Hi Ruano,

 


@Ruano wrote:

what I need is the creation of an Excel file. In the first line (Header) "Time" and the names of the measurements have to appear.


Use WriteSpreadsheetFile once to write the header rows as array of strings - before the measurement loop.

Then use WriteSpreadsheetFile to write your data rows - inside the measurement loop…

 


@Ruano wrote:

By the way, how could I transform the Spreadsheet File to an Excel file? Do you have an advice?


The nice thing about Excel is: it also understands to read CSV files! Simply use the file suffix ".csv" for your spreadsheet files…

Best regards,
GerdW


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

Hi GerdW,

 

I suppose the customer will accept a text file with tab separated values. It is really simple to open it with Excel and the values are shown in the correct Format.

 

I will change my program with your proposal. Thank you very much!

0 Kudos
Message 8 of 8
(3,070 Views)