LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time/data string missing after building application

I built an application that reads serial data from a pressure gauge and then displays the data.  The VI also lets you choose if you want to write the data to a file.  The VI works fine on my PC, but after I used Application Builder and installed it on another PC, I loose my date/time string.  Here is a sample below:
 
My PC
12/11/2006 1:49:50 PM,14.01,3.01
 
Data from Application Builder version
14.01,3.01
 
I lost my date/time string and a carriage return/line feed.  Any ideas?  I am using LabVIEW 8.2.  Did I forget to add something to my "installer" build spec?
 
Thanks
 
 
0 Kudos
Message 1 of 11
(2,766 Views)
Hello,

Welcome to the forums!

Does the executable behave this way on the same computer that you built it on?  I can't think of anything that would strip a timestamp and leave everything else intact.  I suggest building a debuggable executable, for which you can find information in the LabVIEW Help.  This will let you probe the execution of your application at the point where the timestamp should be inserted - I suspect that doing this will show you pretty clearly what's happening.  I assume the problem is in writing the data to the file, so verifying that the timestamp is generated and appended to the string being written should be all you need.  If I can be of any assistance, let me know!
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 2 of 11
(2,741 Views)
This is not that strange,
the time-stamp to string defaultly uses the OS standard formatting. These are set in the regional settings of windows, together with the decimal sign (comma or period). Look there to see what it is set to.
If you are parsing the time string later, use a time stamp formatter.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 11
(2,737 Views)
MattP & TonP
 
The executable does the same thing on my PC.  I looked at the time stamp icon and selected UTC true and false, but no change was observed.  TonP is that what you were talking about? 
Here is a copy of my VI. 
 
Thanks
 
 
 
 
 
 
0 Kudos
Message 4 of 11
(2,726 Views)
Hello Modelshop,

NEVER EVER POST AN AUTO-RUN VI ON THE NET

That said, the formatting you see in the file comes from the OS (see attachment)
That is done by using the %c formatting option (default in LV)
What you should do is create a custom formatting in the form you like, see here


This should give you an explanation what happens.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 5 of 11
(2,712 Views)

SORRY!!!!!

I will give it a try.  Any idea why my carriage return/line feed was also lost?  I can understand the time stamp, but why also the CrLf?

Thanks

0 Kudos
Message 6 of 11
(2,701 Views)
Another thing to try. Wire "Get date/time in Seconds" to the timestamp input of "Format date/time String" I always give that VI a timestamp and I've never had a problem with an executable dropping it. Maybe the format VI has a problem getting a timestamp by itself in a built application.
0 Kudos
Message 7 of 11
(2,694 Views)
Hi Marc,

I think you just got lucky, because the problem showed a correct timestamp, but in the wrong formatting. It is explicitely stated in the string from timestamp help that certain formatters are localized (%c, %x, %X, %z, and %Z).
Moreover the CRLF can be part of the timestamp (it can contain any other string)

Ton

Message Edited by TonP on 12-14-2006 05:02 PM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 11
(2,690 Views)
Oh, I see why it always worked for me. I never used %c. I format it myself, or use "Get Date/Time String" which gives you a date and time that you can concatenate with a space in between to achieve the same result.
0 Kudos
Message 9 of 11
(2,681 Views)
I was able to get my program to work after using the suggestion from Marc A.  I tried different format specifiers for the "date/time string", but did not have any success.  I have never had this problem until I tried to build an executable file.  Thank you everyone for your input and ideas.  Happy Holidays!!
0 Kudos
Message 10 of 11
(2,673 Views)