LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial reading encoding

Is there a general way to encode the serial reading into 5 ASCII characters? I have a serial sensor, and the reading from RS232 is not same as the reading on the LCD with the sensor.

I only know the reading is encoded into 5 ASCII characters. Is this a gernal way? How did I decode it?

Thanks
0 Kudos
Message 1 of 3
(2,875 Views)
I generally approach this kind of challenge by putting all of the recieved data in an indicator that is configured for HEX. I may also add another set for normal text and one for slash codes.

If the device gives only interger values, then they may be straight binary. The hi and lo bytes may be swapped. The may be a sign bit, ther may not.

The data maybe formatted as text.

The data could be floating point, in which case you may want to try to typecast parts of the data to numeric. As stated previously, high and lo bytes can be swapped. hi and lo words can be swapped.

Do not forget BCD. Some protocols send it this way.

Seven bit encoding is also a possibility, but is rare, and old. Lets not even talk about 9-bit encoding (:<)).

What you want to do is try t
o corelate what you are recieving with what the LCD says. Its JUST a matter of recognzing one of the patterns.

I have done alot of these reverse engineering projects. They are fun and challenging. Take notes as you go, its easy to get confused and forget how you had part of it working. This task is not for the faint of heart.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,875 Views)
Hi,

If you send us the 5 ASCII characters, and what it is suppose to be, we
might be able to figure it out.

Regards,

Wiebe.

"connector" wrote in message
news:50650000000800000069720000-1042324653000@exchange.ni.com...
> Is there a general way to encode the serial reading into 5 ASCII
> characters? I have a serial sensor, and the reading from RS232 is not
> same as the reading on the LCD with the sensor.
>
> I only know the reading is encoded into 5 ASCII characters. Is this a
> gernal way? How did I decode it?
>
> Thanks
0 Kudos
Message 3 of 3
(2,875 Views)