I have a Victron MPPT 150|35 SmartSolar charge controller and can successfully read the RS232 string in to a CR1000X datalogger via the CPI RS232 port.
I'm just wondering how best to parse the string, as the last character (Checksum value) changes regularly.
The string is 19 lines consisting of a Field Name and assocaited Field Value (field name and value are separated by a Tab).
Please see a complete string below captured via Putty. The string is output from the solar controller at 1Hz with no blank line after the Checksum.
Thanks very much for your help in advance!
PID 0xA058 FW 150 SER# HQ19358CA84 V 12340 I 0 VPV 20 PPV 0 CS 0 MPPT 0 OR 0x00000001 ERR 0 LOAD ON H19 0 H20 0 H21 0 H22 0 H23 0 HSDS 0 Checksum a
Have a look at the "SerialInRecord" instruction. This allows you to have a two character start word and separate two character end word, to find the string in-between.
So, your two character start word could be characters could be "PI" (PID sring) and end string word "um". As long as these sets of characters are not foundelsewhere in the outputs from the sensor, this should capture everythig between these characers in to a string variable.
With a bit of experimentation and trial/error, you should get what you need.
Thanks veyr much for the information - most appreicated.
I'll try as you suggest.