LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you access the compile date of a LabVIEW generated executable?

For quality assurance purposes it is necessary during the operation of a LabVIEW program I am writing, for the user to record the compile time and date of the particular software executable they are using. This is not the same as the time and date stamp assigned to the file by the operating system as it can be changed by transferring files etc. Is there a way to access this information by:

- Inserting it into the program as a constant on a compile or
- Accessing it from the compiled executable?

For example, having a string constant in the program itself is fine but it requires the programmer to change it every time the program is compiled. Do I need to point out what happens during a debu
gging session?--the constant doesn't get changed... why bother. Right now the string constant (accessible through the user menus) probably has a date from three months ago. Is there any way to automate this process?

Taken from elsewhere on NI.COM--this comment seems to indicate the compile time and date are recorded in the executable:

"When you create an executable, LabVIEW takes into consideration different parameters such as time, date, name of the executable, and so on. The file size of the executable depends on this information. Thus, when you create two executables out of the same VI one after the other, at the very least, the time information is different, and may cause the file size to vary. "
0 Kudos
Message 1 of 2
(2,767 Views)
Hi,

What I do is this. The pogram uses an ini file. Almost every program I make
uses an ini file anyway. The program checks if it is an exe or a vi. If it
is a vi, it writes it's revision number to the ini file. If it is an exe,
the ini file is not changed.

The exe can read the revision number from the ini file (the vi can also read
it, of course).

This way, each time the program is edited (it's most likely to run at least
once, for testing), the revision is updated.

This functionality can all be captured in a single vi, all that has to be
done is put this vi in the diagram, on a position where it is always called.

Regards,

Wiebe.



"ummagumma" wrote in message
news:5065000000080000000F710000-1042324653000@exchange.ni.com...
> For quality assurance purposes it is necessary during the operation of
> a LabVIEW program I am writing, for the user to record the compile
> time and date of the particular software executable they are using.
> This is not the same as the time and date stamp assigned to the file
> by the operating system as it can be changed by transferring files
> etc. Is there a way to access this information by:
>
> - Inserting it into the program as a constant on a compile or
> - Accessing it from the compiled executable?
>
> For example, having a string constant in the program itself is fine
> but it requires the programmer to change it every time the program is
> compiled. Do I need to point out what happens during a debugging
> session?--the constant doesn't get changed... why bother. Right now
> the string constant (accessible through the user menus) probably has a
> date from three months ago. Is there any way to automate this
> process?
>
> Taken from elsewhere on NI.COM--this comment seems to indicate the
> compile time and date are recorded in the executable:
>
> "When you create an executable, LabVIEW takes into consideration
> different parameters such as time, date, name of the executable, and
> so on. The file size of the executable depends on this information.
> Thus, when you create two executables out of the same VI one after the
> other, at the very least, the time information is different, and may
> cause the file size to vary. "
Message 2 of 2
(2,767 Views)