From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

errorin code

i am trying a basic program to copy data to excel file. i have written the code. i can write only one data to one column. i want to write multiple data to multiple columns. its showing error.

 

i have attached my code

 

kindly help me to add multiple data to multiple columns.

Thanks.

0 Kudos
Message 1 of 2
(767 Views)

@SSG0484 wrote:

i am trying a basic program to copy data to excel file. i have written the code. i can write only one data to one column. i want to write multiple data to multiple columns. its showing error.


Please describe what you mean by "copy data to (an) Excel file".  

  1. What do you mean by "data"?  Are these single numbers, arrays, Strings, or what?
  2. Your VI shows you using the function "Sine Waveform", whose output, called "signal out", is a LabVIEW Waveform.  Do you know what that is, and how to use them?
  3. You plot the Waveform, extract several values (DC, RMS, Amplitude, etc.), then build a 1D Array containing RMS and Amplitude.  So far, so good ...
  4. You then wire this 1D array into the Convert to Dynamic Data Type (or "To DDT").  But you are not wiring "Dynamic Data" into this function, so the output will be meaningless.
  5. Finally, you use a Write to Measurement File that expects a signal, not a simple 1D array of two numbers, an RMS and an Amplitude.  It works, however, and gives you an Excel file containing the (more-or-less useless) data that you asked it to write.

Look at Step 2, above.  Do you see the word "signal"?  Can you find the wire in your Block Diagram that carries this signal?  Can you see (and can you recognize by looking at the wire) what kind of data it carries?  Try wiring that to the input of your Write to Measurement File, and see if the resulting Excel file seems to show you a "signal".

 

Bob Schor

0 Kudos
Message 2 of 2
(714 Views)