Labview serial communication


I’m working on a labview project wich pretty much works. Only thing is that I need more characters send to a certain block witch was supposed to be done in my sketch but i don’t see why it would be the sketch.

I need 8 bytes of data at my serial PC port from the arduino but with labview probe possibillitys I can see I get max 6. Because all characters are combined in a string as “4” “.” “5” “6” “LF” “/n”.

I need one more decimal number. But I’m missing why it’s not capable of sending more than 6 bytes since variable “temp” is a float. Changing it to double didn’t work either.

Could someone help me?

sketch and VI are attached

LabVIEW_Write_Read.ino (849 Bytes)

          float temp = (x*5/1024);
          Serial.println(temp, HEX);

Why are you printing the temperature in hex?

sketch and VI are attached

Well, one of them, anyway.

Just trying some things. No particular reason.

Serial.println() defaults to displaying two places after the decimal point with floating point numbers. To output additional characters you need to indicate the number of places.

If x is a float, then use the following to display six characters after the decimal.

  Serial.println(x, 6);

Thanks that did it