LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Type Conversion to Write to a File

The problem I’m running into is data type conversion problem. The data that is being put into the waveform graph is an array of clusters. (see below)

-27.png  <== I just want to save that to a file!

I’m trying to use a “Write to Measurement File” VI which takes a dynamic input called “Signals.” I get an error message if I wire the Waveform Graph input directly to the “Signals” input. Every way that I try converting the data gives an error as well. Any suggestions?

  

-26.png
(The while loop is really the only thing I've added to the example VI.)

 

0 Kudos
Message 1 of 3
(3,007 Views)


BenG. wrote:

The problem I’m running into is data type conversion problem. The data that is being put into the waveform graph is an array of clusters. (see below)

I’m trying to use a “Write to Measurement File” VI which takes a dynamic input called “Signals.” I get an error message if I wire the Waveform Graph input directly to the “Signals” input. Every way that I try converting the data gives an error as well. Any suggestions?

Two, off the top of my head:

  • Write out your data using your own write file VI.
  • Convert the data you get from NI-Scope to a waveform datatype, since the Write to Measurement File Express VI can handle that. 
0 Kudos
Message 2 of 3
(2,983 Views)

I took your second suggestion. The original data was an array (size 4) of clusters. I used the "Index Array" block to break the array out into its elements. Each of the four elements is a cluster, so I used the "Unbundle" block to separate the cluster out into its parts. Then I used the "build waveform" block to convert those pieces into a waveform. Then I used "build array" to to combine the four waveforms. I wired the resulting array of waveforms to my graph. (Sorry I don't have the block diagram right now, the VI isn't on this computer.)

 

Thanks for your suggestions!

 

0 Kudos
Message 3 of 3
(2,934 Views)