four sensors run on arduino

Hi friends, i need help related to my project.
i am using 3 or 4 sensors like level (ultrasonic sensor), temp (LM35) etc with my arduino mega, and creating HMI on labview,
i have a basic question and problem that how these data will be recived at labview separately??
which topic should i learn to get data of 3,4 sensors togather??
if some protocols then wich protocol??

Hi friends, i need help related to my project.
i am using 3 or 4 sensors like level (ultrasonic sensor), temp (LM35) etc with my arduino mega, and creating HMI on labview,
i have a basic question and problem that how these data will be recived at labview separately??
which topic should i learn to get data of 3,4 sensors togather??
if some protocols then wich protocol??

I'm pretty sure Labview can handle data in just about anyway you want to send it. Will you always send the same data? If so, then you just have your various sensor readings sent one after the other with a comma or some other delimiter in between each data point.

You could add some sort of beginning of message header so the Labview program knows where the start of a message is and you would likely use an end of message character (often a carriage return).

If the data won't always be the same or in the same order, you could add character(s) to identify the type of data.

So far, I've been assuming the data will be sent as ASCII characters. ASCII protocols are easy to use and most Arduino projects I've seen use some sort of ASCII based protocol to send or receive data but there are plenty of non-ASCII based protocols. Sending raw data has the advantage of not requiring as many bytes to be sent for the same amount of data. A non-ASCII protocol has the complication of not being able to use control characters. Modbus is one non-ASCII protocol (though there are ASCII versions of Modbus). Dynamixel servos like the AX-12A use a non-ASCII protocol.

If you're the only one using the protocol, you can use whatever is easiest.

Thank you so much.
as i am new in this arduino thing, will you please guide me with link that this topic i should go through; it would be very helpful :slight_smile:
and yes, the data is same.. acyually i am creating HMI on labview, and data recieving separately on labview is seems difficult for me..
as an example.... i want labview to show me different display for level and temp (both at same time)

http://forum.arduino.cc/index.php?topic=83008.0
is it the solution of my problrm??

umerchamp:
LabView with multiple sensors - Interfacing w/ Software on the Computer - Arduino Forum
is it the solution of my problrm??

That's one example of sending data. It basically comes down to what's easiest to use in Labview.

I've used programs created in Labview but I haven't written Labview programs myself. I don't know what a HMI is.

You're welcome to send me a link to a forum post in a PM but I would rather answer technical questions in the forum where others can correct me or offer better solutions. Also answers given in the forum can help other people with similar questions.

HMI is Human machine interface/ human monitoring interface

umerchamp:
LabView with multiple sensors - Interfacing w/ Software on the Computer - Arduino Forum
is it the solution of my problrm??

Hi,
you can send the data as comma separated values from arduino:
23,54,23,56,256
Then on the LabView side you will read these values, parse the
corresponding data and show them on your HMI.
Some people are trying this solution here: http://forums.ni.com/t5/LabVIEW/How-to-read-Serial-Data-from-Arduino-using-labview-VISA/td-p/1497866/page/2

Or if you have Arduino Mega 2560 you can create the
HMI on your smartphone and your application will be standalone
and wouldn't need the computer: http://visiduino.io/sk/doc/app_layout/
and this one: http://visiduino.io/sk/blog/visiduino_app/
Lubo

moderator: merged threads

Friend i am working on my final year project, and i need to use 4 sensors in my project, all the results must be shown on some lcd+labview+ethernet... i am little bit confuse in how to write/handle code on arduino... please give me a link or guidance for this kind of code, what things i should focus, clock etc etc... THANKS :slight_smile:

MODERATOR: topics merged (again)

@umerchamp
Please keep one project in one thread.

Final year project. So what happened in the previous years.
Seems you're a lazy crossposter, trying to let us do the work.
You should be experimenting with the individual sensors before trying to combine all four.
Write some code, draw a diagram, so we can help you improve it.
Leo..