Siemens S7 - RS485 ASCII

DLMUK

Member
Join Date
Jun 2013
Location
Southampton
Posts
311
Hi

If I wanted to put a pure RS485 ASCII string into an S7 PLC (not something I have done before) and then pick out a section of this string, how would you go about doing it?

I assume if I had a 300 I would add a CP340 (my baud rate is 19.2k so should be fine) and then added the Port config and receive data blocks to my project then this would encapsulate the received data into a tag in the associated DB. But how would I then pick out bits of data from the tag with the entire data string in?

Thanks
 
Are the bits allways in a fixed place in the data area?

If yes, it is very simple; give the DB a symbolic name, and define the contents also with symbolic names.

Use the bit in the code like this:

A "dbRecvData".TheBitIAmCuriousOn
= WhateverBit


If you use it as an interlock, you should have some kind of validity check. Like a timeout since last received data pack.

Kalle
 

Similar Topics

Hi all, I've hit a bit of a brick wall and need some help. I'm currently trying to get a Siemens S7-1200 PLC to talk to an Eaton DE1 Drive I'm...
Replies
8
Views
3,694
HI All, does anyone know if you have to change a cp 341 rs232 and use a cp341 rs485, what changes have to be made to get it to...
Replies
0
Views
1,348
I currently have a RS485 full-duplex bus system with slaves running at 230k4 baud. I'm looking to connect my Siemens S7-315 2PN/DP with this bus...
Replies
9
Views
3,131
I have a siemens tp170a hmi and tried just for fun, to use modicon modbus driver settings and communicate with a regin roomcontroler. I use the...
Replies
2
Views
2,116
Hi, I had RS485 ASCII string going into a CP340 @ 9600baud rate. This was working fine. I had to change my baud rate to 19200 so I got ripped...
Replies
4
Views
2,524
Back
Top Bottom