LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Problem with the number 127

Solved!
Go to solution
Highlighted

Problem with the number 127

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 >> 8) & 0x000000FF));
payload[4] = ( ((l >> 0) & 0x000000FF));
payload[5] = (j >> 8) & 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

 

0 Kudos
Message 1 of 5
(796 Views)

Re: Problem with the number 127

What do you mean by "LabVIEW freezes"? Using the join primitive won't freeze LabVIEW. You'd probably need to post your VI because it won't be possible to figure out your problem without it (and more information about what "freezing" means).
0 Kudos
Message 2 of 5
(715 Views)

Re: Problem with the number 127

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

 

0 Kudos
Message 3 of 5
(708 Views)
Solution
Accepted by topic author RavensFan
02-03-2017 07:37 AM

Re: Problem with the number 127

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.

0 Kudos
Message 4 of 5
(703 Views)

Re: Problem with the number 127

hello 

Thanks . I believe is that, because I left the terminal ativected in Visa...I'll try that,

 

thanks again

 

 

0 Kudos
Message 5 of 5
(699 Views)