01-04-2017 05:36 PM
Hello
I am a newbie , and in my project ( a temperature datalog wireless using arduino and xbee- I don't use lifa interface, just get the packet via Labview standard serial VI).
A weird thing happens when the temperature gets the 127 C...the labview freezes...I f the temperature become high, just after 128 it's work again, if is going down , just in 124C is ok again
this is the way that i send the packet
int32_t l;
int16_t j;
payload[1] = ( ((l >> 24) & 0x000000FF));
payload[2] = ( ((l >> 16) & 0x000000FF));
payload[3] = ( ((l >> 😎 & 0x000000FF));
payload[4] = ( ((l >> 0) & 0x000000FF));
payload[5] = (j >> 😎 & 0x00FF;
payload[6] = j >> 0 & 0x00FF;
where l = temperatur from thermocouple ( *100)
and j is the ambient temperature(*100)
in Labview I use join the numbers and convert l to sgl and j to int16.( /100 to get the decimals)
I believe is some wrong way that I'm putting the bits in the packet...or the conversion in labview.
I really search a lot in internet, and saw some guys with this problem with the magical 127 number!!!!!
If somebody could get me a idea what is it...I really appreciate?
( excuse my bad English..I'm from Brazil)
thanks
Solved! Go to Solution.
01-28-2017 11:40 AM
01-29-2017 08:19 PM - edited 01-29-2017 08:20 PM
hello
thanks for reply.
I 've solved this strange problem ( I think!!1...)...I've changed the mode of xbee to API to API 2.
Now I can get these numers ( specific whwn a array with 124...until 127 ans the number 17 and 19).
Seems the my VI was ok..the problem was the xbee configuration.
But ( always has a but....hahaha)..now when a Xbee send a array of bytes with the number 10 in one of the uint8, the packet comes break...
I have 13 bytes in my packet, if one of then is the number 10, is like a terminal signal...after the number 10 no more bytes...only zeros...and , obvious, stop my vi...
Go to google see about xbee problems.....
thanks again
01-29-2017 11:25 PM
The number 10 (0x0A) is the new line charater (aka \n or line feed/LF) in ASCII. This is the default termination character for VISA for serial connections. If you do not want to use a terminator you should disable it (there is a boolean input to the Configure Serial Port VI for disabling it or changing it to something else).
If you do choose to use a termination character, you need to make sure that your data will never include that character.
01-30-2017 04:41 AM
hello
Thanks . I believe is that, because I left the terminal ativected in Visa...I'll try that,
thanks again