LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interface tinyOS with labview

Has anyone have experiences with interfacing hardware that use operating system of TinyOS with Labview? I am programming a transceiver using TinyOS to send out serial data to be read in Labview. Everytime I send out a serial package, it always include some opening and closing characters that I thought are 3 bytes each. However, during testing, it seems like sometimes it sent out more than 3 opening characters, and it creates a problem with labview because I program labview to expect only 3 every time.
I can't decide whether to pursue a solution on the labview side or the other programming language. Any suggestion? Thanks,
0 Kudos
Message 1 of 5
(3,453 Views)
Can you search your string for your actual data? If you can add a marker before or after the data you are interested in and search for it's location within the string, you can not worry about always having 3 start bytes.

Sheldon
Technical geek, engineer, research scientist, biodegradable...
0 Kudos
Message 2 of 5
(3,430 Views)
Hi Student,

Are you working on the wireless ambient air sensor project, using the Atmel microcontroller?

I seem to recall something about the open / close characters and the serial port. This was a couple of years ago.
If memory serves me right (which is not always the case 😉 ) I think it had to do with special characters such as \s, \n, \r.

If that is the case, for instance when you read the serial port, you may want to display the "\" codes. You do this by right-clicking the display window and select "display \".. However, I seem to recall that the serial data is actually in Hex, and special characters ( like \O and \C ) were used.

Again from memory... The message was something like \O 0xAA \S, where \O for open, 0xAA a message in HEX, and \S end of message. (not accurate message used for example, only)

What do you see when looking at the received data from the serial port?

As for using LabView, it is a wonderful idea. You are probably a few steps away from success.

-JLV-
Message 3 of 5
(3,420 Views)
Take a look at this link.

It is a discussion on serial communication with a microcontroller. Long to read, but filled with knowledge.

Happy Reading

🙂

JLV
Message 4 of 5
(3,404 Views)
Mr. JoeLabView
Sorry I didn't reply sooner. I have been busy with other projects. Thanks for your input. But actually I am not working on the ambient air sensor project. I am working with a classmate on a project that involves force sensors. The TinyOS that I am talking about is like an operating system in C style language developed by Berkley University. We are using an intergrated device by Crossbow that contains a microprocessor and radio.

Data received from the radio is transfered to the serial port in packages. The first few bytes are opening characters that I am not sure where they come from but varies every time. The next few bytes are ID, token, group ID, etc.. and sensor data.

Someone suggests to search for a marker, but I think the problem is that I am not sure exactly what the openning and closing characters are. What if they match the marker byte and the program will think that it is the beginning of sensor data when it is not.

Hopefully, we'll figure out if there's a way to program the openning characters from tiny OS side so it won't be such a problem in Labview.

Thanks everyone for your input.
0 Kudos
Message 5 of 5
(3,379 Views)