07-23-2007 10:54 AM
07-23-2007 11:26 AM
07-23-2007 11:51 AM
I'm sure there are legitimate reasons that NI created the dynamic data type but the use of it can really cause some problems. Your program is one example. You are doing a comparison of an array of data (the result of the DAQ Assistant reading N channels) and the result of that comparison is wired to your Mask and Limit Testing. All you are passing to the Mask and Limit Testing is a single Boolean or maybe an array of Booleans. You then wire the dynamic data to the Write to Spreadsheet File. The Write to Spreadsheet File function is designed to only write a 1D or 2D array of DBLs. The Write to Measurement File is the correct function to use with dynamic data. If you were to convert the dynamic data out of the DAQ Assistant to a waveform data type (the actual type of data being returned) with a Convert from Dynamic Data function, you would not get the automatic conversion that the dynamic data type provides and see some broken wires.
I have not run your VI but if you continue to get an error after making the above changes, could you try to determine where the error is occuring?
07-23-2007 12:53 PM
07-23-2007 01:10 PM
I don't have the hardware but I can run the VI in simulation mode and cannot reproduce the error. Do you get the error consistently?
As far as the date/time, the start date and time are written to the header. If this is unacceptable, you could try one of the other high level file write functions such as Export Waveforms to Spreadsheet File, you could modify the Write to Measurement File (right click and select Open Front Panel), or you could go back to the way you were doing but clean up the data types. In order to write date/time with the Write to Spreadsheet File, you would need to modify that as in LabVIEW 8.0, the function does not write strings. There are instructions to do so on the block diagram.
p.s. Spend a little time and clean up your diagram. The convention is that data flows from left to right. Your DAQ Assistant should be over on the left side and the data should move to the Mask and Limit Testing (which is still used incorrectly) and the case structure. You have the wires going backwards.