S7-1500 CM541 Serial RS232 ASCII help

surajchem

Member
Join Date
Apr 2012
Location
houston
Posts
16
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 POL DATA SP lbs ST CR+LF"
where 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 Recieve_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 lenght 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.
 

Similar Topics

Hi all Trying to remotely connect to a TIA Portal PLC. I can ping it without a problem but can't get my software to connect. I've opened port...
Replies
8
Views
280
Been fighting all morning with a stubborn HMI. It just won´t connect with the plc. attaching from settings. Have i missed anything? Both plc and...
Replies
5
Views
234
Hi there, Maybe I am overthinking this issue, but here is what I have going on. I have a program running for a water valve on a DI system. We...
Replies
4
Views
429
Hello, I am programming in S7-1500, V17. I have some blocks from a drive manufacturer that are not compiling and giving me an error "Invalid...
Replies
2
Views
273
I have set up comms between an S7-1512SP-1 PN plc programmed with TIA v17 and an S7-314C programmed with Simatic S7 using GET and PUT blocks in...
Replies
4
Views
520
Back
Top Bottom