# Help with RS-232 serial message from scale

**URL:** <https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040>\
**Category:** General\
**Created:** [31 January 2025 20:08 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040 "2025-01-31T20:08:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [31 January 2025 20:08 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/1 "2025-01-31T20:08:30Z")

</div>

I have changed brands of a weigh scale with RS-232 output that is used in a program. I notice that the string length alternates between 18 and 19 characters (there seems to be a leading . present in the 19-character message). My settings are:  
`baud=9600,parity=n,data=8,stop=1`  
I tried changing parity to even and odd but that did not help.  
Any suggestions as to why the string length changes from 18 to 19 characters and what I can adjust to correct this?

here is a video captured using another program (value on scale is 15.80 lbs)  
 ![output](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/c/3cb786b0b05b275049309deb0acdc1154b270f76.gif)

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [31 January 2025 20:52 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/2 "2025-01-31T20:52:50Z")

</div>

Maybe the extra char means something like stable weight?

Can you the brand and type of the scale and preferable a manual with protocol description.

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [1 February 2025 02:45 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/3 "2025-02-01T02:45:43Z")

</div>

[Here](https://www.ricelake.com/media/jxee105c/m_166668_sct20_ntep_enus_revc.pdf) is the manual. The extra character does not seem to indicate stable weight. From p. 57:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a54f7047c1bc2691e3df364e05e7342856da8156.png)

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [1 February 2025 06:53 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/4 "2025-02-01T06:53:56Z")

</div>

If so, can't you just take the message and split it on the '&' char? Use a change node w some JSONATA code or a funtion node w javascript

(JSONATA code in a Change node: $split(payload, '&')[1] )

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 February 2025 09:48 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/5 "2025-02-01T09:48:50Z")

</div>

Or possibly even better, use the feature of the serial node 'Optionally wait for start character' to tell it to wait for `&` before accepting data.

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [1 February 2025 11:56 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/6 "2025-02-01T11:56:53Z")

</div>

Thanks for the suggestions. Inspecting the output in hexadecimal shows that the leading . character is actually 00 in hexadecimal which is the NULL Character, whereas the hexadecimal representation of the . character (period or full stop) is 2E.  
 ![animated_output_2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/9/a99f8c36cbb3842958917d6b01761fdd39718be3.gif)

So now the question becomes why is there a leading NULL character, and the manual mentions nothing of that.

I can indeed do as @Colin or @krambriw suggested and handle it that way. My feeling was that there could / should be a technical reason why I could not get a steady 18-character message repeatedly, but maybe there is some setting deep in the scale that I am not aware of and I’m hunting a ghost.

I'll have some more time on Monday to explore the scale settings and I may come across something useful.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [1 February 2025 13:36 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/7 "2025-02-01T13:36:34Z")

</div>

0x00 if often the end terminator in a low level C type buffer or string... so I suspect what is happening is that the scale is actually sending it on the end of the line of text - but as you are (probably) splitting on the carriage return character - that is then left in the (Node-RED) buffer until the next CR - so appear on the front of the next report. So yes I would just "wait for" the & char and not worry about it....

Though you could depending if you only wanted one of those weights just "wait for" N then split on L , or "wait for" L and split on \ .

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 May 2025 13:37 UTC](https://discourse.nodered.org/t/help-with-rs-232-serial-message-from-scale/95040/8 "2025-05-02T13:37:02Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
