S7-1500 CM541 Serial RS232 ASCII help


Thread Starter


Hi All,

I have worked with Modbus communication before, but this is my first time with Serial ASCII. I am not sure how to process it. I was wondering if someone could show it with an example.

I have S7-1400 with 2 CM541 basic comm module. They each talk to a scale device which send out the following ASCII message via RS232.

STX is start of the message,
POL is + or -,
DATA is Six char showing wt in real value,
SP is space,
lbs is unit,
ST is status.

I know that I have to setup the start of message as STX and end of message as CR and LF (4th and 5th end char) in the hardware config. I was trying to use Receive_P2P function block. But i am not sure what should be buffer data type be.

a) should it be an array of 20 char or so with buffer pointing to P#DB1.DBX0.0 Byte 20?

or b) string of length 22 with pointer pointing to the 3rd element of the string?

I just want to display the weight i.e POL and DATA in HMI.

How should i proceed?
I would appreciate all the help.

Thank you.