03-21-2020 01:50 PM
Hey Everyone,
I am wondering why my column labels for the attached Vi are not showing up. Anyone have any tips/recommendations?
Solved! Go to Solution.
03-21-2020 02:14 PM - edited 03-21-2020 02:38 PM
Serious bugs:
03-21-2020 02:19 PM
03-21-2020 02:27 PM
03-22-2020 12:03 PM
Thank you so much. Just wiring the Append to File? = True solved it.
03-22-2020 12:15 PM - edited 03-22-2020 12:19 PM
@jisoccer wrote:
Thank you so much. Just wiring the Append to File? = True solved it.
NO! It does NOT solve the glaring race condition!!!
It might work now most of the time by accident, but on a different computer, different day, different LabVIEW version, or even on the same computer after some minor unrelated code changes, it could decide to write the data first and the header second, leaving you with a file with only the headers.
There is currently no data dependency that would enforce writing the headers first and the data second.
If you only change to "append=T", your code is still not safe!
The simplest way in the current code to solve the race condition would be to wire the error out of "file close" to the "error in" of "write delimited spreadsheet". Now the execution order is enforced. Dataflow!
03-23-2020 10:49 AM
@altenbach
Isn't this slightly leaner?
/Y
03-23-2020 12:32 PM
@Yamaeda wrote:Isn't this slightly leaner?
In this case yes, but in the more general case the two write operations are typically separate, Often the writing of the headers occurs once on init (or before the loop) and data is appended with every iteration later.