LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Experimental aquaponics with Arduino and multiple sensors

Hi Nathan_B,

yes, the debugging was the first thing Idid yesterday. All ok, I am able to see one by one the different probes.

- than I have followed the instructions on Atlas Scientific pdf file and prepared a Serial Multiplexer.

- and downloaded the sketch for Arduino Mega on https://www.atlas-scientific.com/_files/code/Arduino-mega-serial-port-connectorssample-code.pdf

after some test all went ok, I can send the different commands (0,r; 1,r; 2,r; 3,r) to read the different inputs from the probes.

What I have noticed is that the PH probes are sending 1 reading per command at the time(0,r gives me a reading of 5.7) and the DO is always sending data every 0.5 sec (1,r gives me a continius reading of 3.2, 3.2, 3.2, 3.2...)

I don't know if this is going to effect the programming in LabView.......

Now,

if I understand correctly I will have to make a loop in LabView that changes PIN 2 and 3 for HIGH to LOW with a desired delay and ready the data on Serial 3??

Now, how do I read the serial 3 on Arduino Mega PIN 14-15??

thanks for your help

Andrea

0 Kudos
Message 31 of 52
(1,713 Views)

Here when I send command 0,r:

0 Kudos
Message 32 of 52
(1,713 Views)

Fullscreen capture 10252013 11653 PM.bmp.jpg

Fullscreen capture 10252013 11659 PM.bmp.jpg

0 Kudos
Message 33 of 52
(1,713 Views)

or if I send where the DO probe is:

1,r

Fullscreen capture 10252013 11710 PM.bmp.jpg

Fullscreen capture 10252013 11721 PM.bmp.jpg

0 Kudos
Message 34 of 52
(1,713 Views)

ok, now I got all right and I can display the actual data that I want in a single line, no more in a continuos way......

The code on worked better on the Arduino 'Serial Monitor' than on 'Termite'!

Now, How can I read the 'string' of data on my Serial3 port on Arduino Mega? there is a simple way to see what the 'Serial Port Connector from Atlas Scientific is sending to pin 14 of the Arduino?

I am trying with the 'VISA Configure Serial Port' But little luck for now. There is a tutorial I can download and practice on?

Regards

Andrea

0 Kudos
Message 35 of 52
(1,713 Views)

Are you planning on using LIFA?  If yes, then you don't need to mess with any serial stuff.  You just need to integrate your sensors into LIFA.

0 Kudos
Message 36 of 52
(1,713 Views)

uhm.... that means I will have to hit my head on understanding the C language ??

0 Kudos
Message 37 of 52
(1,713 Views)

Ok, no C!

I'm having a quick learning session on line. For now I am in dense fog.

0 Kudos
Message 38 of 52
(1,713 Views)

Hello Andrea,

Transferring data from a sensor with a serial interface to Labview is a 2 step process.  Step one you need a function that runs on an Arduino Mega that reads and temporarily stores the sensor data in Ardjuno's memory.  Step two upload the data to Labview. 

Step One

The function that reads the sensor data can be similar to the function you have been using in your testing.  This approach does not use LIFA.   Or you could add a custom function to LIFA to read the sensor data.

Step two

Using a non-LIFA approach you would use an Ardjuino loop to read to read each sensor and the last command in the loop would use print or println commands to upload the data to Labview.   Or if you use LIFA it may look like reading the sensor data and uploading the the sensor data to Labview is combine into one step.  But here is really two steps.  One read the sensor data and two put the data in packets and upload the packets to Labview.

I don't of any low cost method to monitor the sensor data at an ATMega serial port.   However Portmon is a very nice program for monitoring the data sent through the Virtual COM port Labview/LIFA uses. See:

<http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx>

hrh1818

0 Kudos
Message 39 of 52
(1,713 Views)

If you post the code (working for single value readings) then I could try to come up a custom firmware and LabVIEW VI to help you get started with using LIFA for your project.

0 Kudos
Message 40 of 52
(1,713 Views)