02-24-2020 03:52 AM
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.
Solved! Go to Solution.
02-24-2020 04:56 AM - edited 02-24-2020 04:58 AM
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:
02-24-2020 08:15 AM
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
02-24-2020 08:36 AM
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?
02-24-2020 09:25 AM - edited 02-24-2020 09:25 AM
@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".
02-24-2020 09:44 AM - edited 02-24-2020 09:50 AM
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!
02-24-2020 10:18 AM
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…
02-25-2020 04:13 AM
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!