LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview + xbee read sensor, uncoding the hex string

Hey John 🙂

thanks for all the information, and yes you are correct about everything, took the last hours to recheck the last 2 bytes
As for the xbees, for now i'm only using 2, but the final project requires like 11 xbees so i will been the coordinator to be API to have organization, but i will only read one xbee at a time

or i must find a way to read the each one and manage to monotorize everything

 

for example, just speaking about temperature reading

if i have 2 or more xbees label as router AT, i know that each one sends a diferente string, but all will start with 7E, and have the 2 bytes indicating the lenght of the string, i think it will also there is a byte to identify the router that it comes from.

Thats why i wanted to learn how to extract information from the string, if i can extract temperature values (like i already manage to do thanks to you guys) then all i have to do is find the byte to identity the router, then associat his information to a termometer for example (thinking about 11 termometers displays)

but yes, your information is useful, you guys are really great with me, thanks again 🙂 you are saving my life

you also said "In your message, the carriage return and the new line are actually part of the message you are sending from the remote device and not the end of message delimiter" but no, from arduino (my device connected to the xbee router as MCU) is displaying only the values of temperature and a \n, nothing more. is that it?

 

 

 

 

0 Kudos
Message 21 of 28
(995 Views)

\n is the carriage return.

 

The 0x90 frame contains the 64 bit source address of the sender at bytes 4 to 12. In your case, 00 13 A2 00 40 A2 3A 63 is the serial number of the sending XBEE module.  This number is located on the sticker on the backside of module.  When you configure the module as a router, this is SL and SH.  These numbers are unique.  

 

You could also include the name of the sending XBEE station with the temperature as part of the message payload. You can also do this with multiple stations in the AT mode.

 

Do you have the XBEE product manual for your modules? All this is covered in the section on the API Operations.

 

Glad to help you.

 

JohnCS

 

 

 

Message 22 of 28
(988 Views)

Good Morning John!

8h47 in Portugal right now 😛

Yes i do have the manuals, i'll look into it today.
Yes i know the 0013A200 is the SH of my xbees (both of them) and 40A23A63 is the SL, funny part is my coordinator is 40A23A75 so only changes 2 numbers, and i didnt pay attention while looking to the string, cause i thought it was the destination xbee's adress and not the xbee where it comes from, so ya, its possible to split incoming information from various sources!

Again, learning everyday

 

I think today the material i order to build my indutive sensor will arrive, so i will spend the day working on my code in my MCU (arduino for now) to send temperature and those informations i told you guys about, RPM and movement stopped or not (S/N).

after that, if i find any issues, i'll post them here, in the hope i'll find a solution with you guys

 

you've been amazing 🙂

 

cheers to all!

0 Kudos
Message 23 of 28
(974 Views)

Greetins again everyone

 

Long time no see

 

I've managed to make readings with my temperature sensor and my proximity sensor

and right now the total value of the temperature readings are displayed in a thermometer, and i also can read the RPM values.

 

I had some problems with my computer, and basicly lost everything i had about my VIs, and i had to rebuilt it from nothing again.
Before this happen, i was manage to save my data into a .txt file

it would appear as:

Date                                                  Temperature           RPM

YYYY-MM-DD HH-MM-SS              XX.XX                        XX            (this line is the format of the display)
2014-06-25  11:01:16                    18.25                        86            (this line is an example of what was written)

the problem is, i no longer need to save into a .txt file, but instead i need to save my data into a excel file, just put it in collums from 10s in 10s for example, as long as the program is running

i've been trying with Write to Spreadsheet but i think i got some errors
can you guys help me out?

i know there is already a lot of posts regarding saving into excel (i've been searching for some solutions and tried some, but still nothing working)
my solution was to get a timevalue or timestamp, then save it into an array, with the other 2 readings but still not working

 

i'll send you guys what i have, its just a sketch

 

0 Kudos
Message 24 of 28
(919 Views)

Write out your data inside your read loop. One line for each time you read.

Omar
0 Kudos
Message 25 of 28
(909 Views)

Thank you Omar

one last question
The changes you made in this last VI, are intented for excel file?

i mean, if put the path to open and write to a excel file .xls, will it write it down?

 

Also, if i understood it correctly, it saves the data read and the time

how can i put the first line of each collum to be always " Date | Time | RPM " (like a label) or its not possible?

if not, its ok

 

Once again

Many thanks you're a life savior

0 Kudos
Message 26 of 28
(900 Views)

@Raknugar wrote:

Thank you Omar

one last question
The changes you made in this last VI, are intented for excel file?

i mean, if put the path to open and write to a excel file .xls, will it write it down?


I just followed your lead with the example that you posted. The write to spread VI that you were using, creates a general spread sheet CSV (Comma Delimited) that is still a TEXT file that will work for just about all spread sheet programs not just for Microsoft Excel. If you wish to write into an excel .xls file you can do it using the Report Generation tool kit.

 

I find a CSV file work just fine for me.

 


 

Also, if i understood it correctly, it saves the data read and the time

how can i put the first line of each column to be always " Date | Time | RPM " (like a label) or its not possible?

if not, its ok

 

Once again

Many thanks you're a life savior


Write the line "Date,Time,Rpm" (commas between) before the while loop right after you open the file.

Change the open VI to "create" only so your header will be at the very top. Assuming you are not going to append to an existing file. 

 

You can then open the .csv with Excel or inport it.

Omar
0 Kudos
Message 27 of 28
(859 Views)

Greetings Everyone again

First of all, sorry for any grammatical errors of English, its been a long time
I like to apolygize beforehand for reopening this old post, the project was set on hold for many months and now we need to continue.
Last time you guys spoke with me, you helped a lot, i also manage to rearrange many other simple VIs with your help and knowledge.
But i have a problem now
Just to remember you, in my previous problem, i wanted to read and filter the information value of my temperature sensor and proximity sensor (that i managed to do). This information came encoded in Hex, including the adress of the xbees i use to transmit information via wireless.
this is just an example of the encoded information:

7E00 1D91 0013 A200 40A2 3A63 DF3D E8E8 0011 C105 0132 312E 3331 2030 3030 0D0A BA

 

the adress of the xbee is divided in 2 part adress, being the first part 0013 A200 (equal to mostly every xbee device on the planet) and the 2nd part (40A2 3A63), this is what i wish to filter.
I will be using at least 12 xbees, and i would like to create a case function option to selected the readings from that xbee. For example, for this one, if it matches on the case function, inside i would do the temperature and proximity sensors readings.

I having trouble to filter this information, and linked to a case function cause the string comes encoded in normal mode. i can only see this adress when i use the hex display, but one thing is display information, the other is actually get to use this information to do what i intent. 

 

can anyone help me on this?

 

Best regards

 

Daniel C.

Download All
0 Kudos
Message 28 of 28
(761 Views)