07-20-2021 01:53 PM
@David99999 wrote:And no, I did that manually in my post to make it easier to read. Here is what it looks like when I copy and paste directly from the string indicator:
{"Max Amps":1.1405940000000042113e-06,"Discharged Whs":0,"Charged Whs":0,"Avg Discharge Amps":1.2718751156039192901e-07,"Discharged Total Watts":0,"Charged Total Watts":0,"Battery Voltage":62}\r\n
The display style is set to normal. So you are actually sending a literal "\r\n". On your constant where you are adding the end of line, right-click and choose Visible Items->Display Style. You will see a little 'n' appear on the left side of the constant. Click that and choose '\ codes'. Your string will now show "\\r\\n". Remove the extra '\'s in there to make it "\r\n" and you will now have the proper Carriage Return and Line Feed.
Once you fix that, you will not need to remove the end of line on the receive end as the Unflatten From JSON will work with it. But if you really want to, just use the Trim Whitespace function to remove it.
You might also want to bump up the number of characters to read to something like 500 since you are sending somewhat close to 250 characters already (194) and any change to the cluster could bump that count up quite a bit (25 for a floating point value).
07-20-2021 02:30 PM
YESSSSS. I could kiss you right now. It's a good thing you chimed in because I started going down another rabbit hole with the bytes to read terminals.
Thank you! I most definitely never would have figured that out.