10-25-2013 12:58 AM
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
10-25-2013 01:24 AM
Here when I send command 0,r:
10-25-2013 01:26 AM
10-25-2013 01:28 AM
or if I send where the DO probe is:
1,r
10-25-2013 06:31 AM
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
10-25-2013 09:17 AM
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.
10-25-2013 11:00 AM
uhm.... that means I will have to hit my head on understanding the C language ??
10-25-2013 11:26 AM
Ok, no C!
I'm having a quick learning session on line. For now I am in dense fog.
10-25-2013 06:55 PM
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
10-25-2013 07:07 PM
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.