LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving data of a ultrasonic sensor using LabVIEW

Hello all! I have a ultrasonic sensor connected to a mega board (with LiFA BaSE) and this is connected with LabVIEW I've  done all processing in .vi.. How could save the distances? I've tried with some arrays and get time functions  but my project doesn't works..  The other solution that I implemented was using write spreadsheet but in these case only save the first data and that monent the arduino board loses the communications .. Thank you for your answer..

0 Kudos
Message 1 of 6
(4,631 Views)

If your Write to Spreadsheet setup was overwritting, you simply need to change it to appending.  If that doesn't fix it, attach your VI(s) that you've tried.

0 Kudos
Message 2 of 6
(3,749 Views)

One fine point in saving data, that it is often overlooked is ha fact that (in however format the data is saved) one must consider how the save data is going to be used. In another word, before you settle on what form o save- ask your self ho is it going to be use.

Little planning ahead pays habdsomeley later

Barddya

0 Kudos
Message 3 of 6
(3,749 Views)

Thank you for your answers.. This first picture is about a "control of on/off of two valves using Labview and can see data and indicators state using data Dashboard of LabVIEW.. this system works fine so in labview and tablet.

control.jpg

My group colleague send me this following .vi, We need to acquire data from distance and volume (distancia y volumen respectively) in order to view in a web page..

data.jpg

tabla.jpg

when I put this part in the first .vi, the ultrasonic sensor doesn´t work and the Tx, RX leds of arduino board stop of lightning.. Reading through forums I found that this configuration couldn't work because will be form a bottleneck and the "tabla de control" only shows the first data acquisition and it`s replied in the following rows.  ..

0 Kudos
Message 4 of 6
(3,749 Views)

Can you please attach the actual VI's to your post?

One fundamental flaw you have is that you branch the Arduino Resource wire.  You can't do this.  There must be one single continuous wire (For each device, there should be only one Init.vi and only one Close.vi).

Regarding saving data, there is no data saving going on in that second VI that you posted a picture of.  How are you going to access the data for your webpage?  Are you going to read it from a file on your webserver (or other means of access from a webserver) or are you going to display the front panel in a web-based VI or are you wanting to show it via the LabVIEW Data Dashboard?

0 Kudos
Message 5 of 6
(3,749 Views)

You probably going to have race condition (it appears that there are two while loops running  at the same time without proper connections)

you may see some part of the code running and some will never get the chance to run, and if so, datat will not correspond to correct timing. Go over the data flow

One suggestion would be to use error wire to force correct data flow

Regards,

Barddya

0 Kudos
Message 6 of 6
(3,749 Views)