08-14-2014 07:10 AM
alex99202 wrote:
Sorry I dont know how to compile the whole project and upload that so some of the other sub VIs called on will be missing mainly the averaging ones.
Just zip up your entire project and post the zip file. No compiling needed.
Now, as far as your code, try to avoid the use of local variables and property nodes just to set a flag. Use a shift register instead. You can initialize the shift register to TRUE and set it to FALSE after you write your header data. You can also set it back to TRUE when you decide to change files.
You can get a waveform data type from the DAQ Assistant. The waveform data type includes a timestamp for when the data was actually taken. Use that for your queue data instead of the cluster.
08-14-2014 08:07 AM - edited 08-14-2014 08:08 AM
Instead of all that dance with booleans, locals, and value properties, you should simply write the header if the file size is zero.
Overall, you are doing many things way too complicated. For example why do you output a cluster from the "Save Cluster" subVI if you are converting it to an array a nanosecond later? Just output an array! The entire subVI could could look as follows and would take 5% of the time to wire up from scratch.

08-21-2014 09:41 AM
Hey crossrulz
Sorry for the late reply,
I understand the need to limit the use of local variables i was just the only way I could think to get this code to work correctly with writing the header data.
To do this using a **bleep** would i literally wire a true to the register outside of the consumer loop then wire a false to i inside and have it has a seperate case?
Also would there be a recommended way to tidy up my use of shift registers as im feeling they ae a bit out of control?
As a side note I am now experiencing an issue where data that is saved as multiple arrays in one cluster wont unbundle more than once showing ful names?;
The data cluster which contains 3 arrays - 1 thermocouple array 1 pressue array and 1 RTD array will unbundle into
Thermocouples
Pressures
RTDs but when i use an array to cluster and try and unbundle by name again Labview cuts of the names?
08-21-2014 09:43 AM
Altenbach
Write header if file size is zero sounds like a great idea! how would I go about checking the file size with code?
The Save Cluster edits you propose seem far easier than the way I was doing it and dreduces the code complexity its just my inexperience coding that didnt lead me to this solution,
Thanks
Alex
08-21-2014 11:12 AM
alex99202 wrote:Write header if file size is zero sounds like a great idea! how would I go about checking the file size with code?