Sending info to an S7

bob.southall

Member
Join Date
Jan 2017
Location
Ely, UK
Posts
16
Hi all

Apologies if this has been covered, I am new to communication on PLC's, I can read and write basic ladder but haven't ventured any further than that thus far.

I have a project that I would like some advice on. I have a customer with an S7 343-1 lean net module installed on a strapping machine. This machine needs to use 2 characters of information generated by the customers stock system to tell my strapper what to do with the pallet of product.

I would like to send 2 characters (just 2) for the PLC to read and use as information for further processing. The program is already written for using the data, I am just unsure of what to advise the stock system manufacturer. They are going to write a program and want to send the information on TCP/IP.

I RJ45 of the 343-1 is used for profibus connection between the strapping machine and a shrink wrapping machine.

The questions I am posing then are as follows.

Can I use the other to setup a communication link to a PC? What is the best way to go about this? What information do I need to give the software developer? How do I setup the communication in TIA?

I have looked at a lot of posts and a lot of siemens help forums but a lot of it is quite involved and seems to be more complex than my requirements (perhaps I am just hoping my solution is simple?!).

Regards, Bob
 
I RJ45 of the 343-1 is used for profibus connection between the strapping machine and a shrink wrapping machine.
Maybe you mean Profinet, not Profibus ?
But that also cannot be right, since a 343-1 LEAN cannot be a Profinet IO Controller.
So I am guessing that there is some kind of standard ethernet connection (not a Profinet connection) between the two machines.
Either an S7 connection with the CP343-1 acting as server for the partner as client.
Or a Send/Recive connection. It is irrelevant for the connection to the PC though.

Anyway, if the above is correct, then you merely have to inform the PC developer the details of your PLC (IP address, rack=0, slot=2, and what addresses to access). It is then the PC developer who has to figure out how to send the data to your PLC. (edit: Maybe it will be other way around, since the CP343-1 is already setup for the connection to the other machine. In that case the PC developer has to adapt to the IP address of the CP343-1).
If the PC developer wants you to use specific an IP adresses, then that is what you set the CP343-1 up with in TIA (edit: If you dont have to keep the existing IP address).

If you want to drop the PC developer a hint, then suggest that his program becomes an OPC client. This is the most standardised and open-ended way of interfacing PCs to machinery.
In that case you need an OPC server on the PC for the OPC client to connect to. That could be Simatic Softnet IE LEAN.
 
Last edited:
HThey are going to write a program and want to send the information on TCP/IP.

What is the PLC communicating to?

There are two main options I see.

1) Jesper mentioned one of them, and that is to use S7 communications over ethernet. There are PC libraries out there (libnodave, snap7 both sound familiar but I haven't used either) that can read/write data in the PLC directly. You wouldn't need any code/configuration in the PLC, this would essentially be like an HMI connection. You would call the libraries in the PC code, and use their functions.

2) If you want to directly communicate TCPIP, then you would use AG_Send/AG_Recv in the 300. If the PLC is only receiving data, you would only need the AG_Recv. You would have to create a TCP connection in the Networks view, and put the details of the communications partner.
 
Thank you both for your help and advice.

I did mean profinet as this is what the manufacturer instructed me was being used. sorry if I have got that wrong.

The plc is receiving information from a pc that will provide the strapping and shrink wrapping information to the relevant plc. The plc that has the 343 connected controls the wrapping machine, the other plc is connected via the rj45 on the 343.

I only need 4 bits of information for each machine (0-9 dec)

It was going to be sent from a barcode scanner on profinet directly to the plc, however the stock software developer now wants to send the barcode information straight to his system and then send me the two characters on a good read.
 
I did mean profinet as this is what the manufacturer instructed me was being used. sorry if I have got that wrong.

I think the CP343-1 Lean card can be set up as an I-Device (intelligent IO device) over Profinet, so my guess is that the other PLC is set up as it's PN controller.

If that is the case, no blocks are necessary for communication between the two PLCs. You simply copy data into/out of the Transfer Area, which is a chunk of the IO memory reserved for the I-device communication. You would create the I-device on your end, and then export it as a GSDML file to give to the other programmer.

You only need to care about the memory areas defined as the Transfer Area on your end, and don't need to know his memory map. He doesn't need to know your memory map, only where the GSDML file is configured in his memory map.
 
Sorry, the plcs that are communicating are already in use.

I need to communicate with a pc that will send barcode information to the lean...

Regards, Bob
 
To setup a PC as an PN IO Controller is possible, but requires a PN capable ethernet card plus Simatic Net software. And the PC software then has to access the Simatic Net software, typically as an OPC client.
(edit: I would only go this way if there is a requirement for very fast data transfers).

Like I said before, it is not your problem. Someone has decided that the PC must send the data to your PLC. All you have to do is give the person who is going to undertake this the necessary information about the IP address and data addresses in your PLC.

And you could drop a hint about OPC. But if I were in your situation I would not start to suggest specific solutions. You will end up being responsible for if the PC side gets into trouble.
 
Jesper gives good advice. give the basic information and leave it at that.

I learnt many years ago, that being too helpful can lead to you owning a problem once everyone has gone home.
 

Similar Topics

Hello, This is my first time posting here, and I am also fairly fresh to the world of PLCs, but I would really like to learn more and get...
Replies
6
Views
3,584
I am trying to send AB PLC tag data using Crimson 3 on a Red Lion Data Station Plus and am having trouble. First, it appears to only allow string...
Replies
7
Views
6,953
I’m attempting to send a temperature from a SLC-5/02 to an EZiMarquee display. The vendor said to use a MSG instruction to send the data to the...
Replies
1
Views
81
Hi I need to send a null command down a comms port. But in the crimson software when i used /x00 it coming back "Cannot use null character is...
Replies
2
Views
420
I've been having some trouble figuring out how to get the ip address for the mail relay server, is it something that I need to create separately...
Replies
10
Views
909
Back
Top Bottom