LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner help: export a multichannel Arduino analogue input to a single csv

Hello all. This is my first forum post! As a newcomer to LabVIEW, I'm really impressed by its functionality.

 

I'd like assistance with teh following apparatus I'm using:

  • I have a four sensors that each output an analogue voltage.
  • These input to the "analog in" pins of an Arduino Uno
  • The waveform chart & grpah on my front panel both display as expected

The problem is: how can I take the array accumulated to produce the (correct) waveform graph to a csv file?

I want this format csv file:

Time,Voltage1,Volatge2,Voltage3,Voltage3,Voltage4

06/03/2018 17:50....,2.089,2.3,3.435,1.5898

...... etc etc

 

BUT I only get:

Time,Voltage1,

06/03/2018 17:50,2.435

06/03/2018 17:51,2.222

........etc.........

 

I have tried with the waveform datatype, but can only get this to work for a single voltage channel. I've atatced screenshots of the block diagrams to assist. Many thanks in advance.csv saving attemptcsv saving attempt

 

 

0 Kudos
Message 1 of 5
(2,482 Views)

Hi mb,

 

you write to the Y input four times: this way you overwrite the same data three times...

 

You should create 4 waveforms instead! (Create an array of waveforms.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,477 Views)
You should create 4 waveforms instead! (Create an array of waveforms.)

Thanks a that. Please elaborate on the array part: do I then createna single array from these 4 waveforms?

0 Kudos
Message 3 of 5
(2,465 Views)

Hi mb,

 

yes...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,455 Views)

Don't write the waveform data directly to a file.

 

Build an array with X,Y1,Y2,Y3,Y4  as the columns and use "Write Delimited Spreadsheet.vi" to write the array to a file.

========================
=== Engineer Ambiguously ===
========================
Message 5 of 5
(2,431 Views)