LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Highlighted

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.4channel_save.PNGcsv saving attempt

 

 

0 Kudos
Message 1 of 5
(523 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
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 5
(518 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
(506 Views)

Hi mb,

 

yes...

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 4 of 5
(496 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.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Message 5 of 5
(472 Views)