KasperV79

PN PLC 2 PLC multiple DB's

7 posts in this topic

Hi. Guys.

Im really strugling with the communication  between two PLC's in TIA.

So we have a project with 9 PLC (1516-3 PN). We have lots of communication between many of the PLC's.

PUT/GET is not an option for us. So i have tried with Tsend and Tsend_C. The problem is that we really need to send more than one DB back and forth.

 

So my question is:

How to set up a two way communication between two PLC's (not in same projct = unspecified PLC)  AND send multiple DB's across.

I've tried to follow this:

https://support.industry.siemens.com/cs/mdm/91696622?c=60823311755&dl=en&lc=de-WW

But cannot see how the DB's can be sendt to individually recieve blocls, and cannot get it to work :(

Edited by KasperV79

Share this post


Link to post
Share on other sites

I didn't study the link in detail, but it looks like the difference between TSEND and TSEND_C is that the _C instruction includes the TCON functionality to create a connection while the TSEND instruction does not. The TSEND_C instruction can exist on its own but TSEND needs either a TCON or TSEND_C instruction to precede it. The link explains that but doesn't provide a lot of details otherwise.

If the TSEND/TSEND_C instructions can only send one DB at a time, can you combine the DBs you want to send into one? In other words, create a new DB with a structure that contains the DBs you want to send. I know you can (used to be able to...) declare a STRUCT inside a DB where the STRUCT's datatype is another DB. Maybe try that and have the FC/FB that calls the TSEND/TSEND_C instructions use Block Moves to copy the DBs you want to send into the new DB, then send it. Does that make sense? Alternatively, it looks like you can use multiple TSEND/TSEND_C instructions, each sending one DB at a time, until you've sent all of the DBs you need to send.

Caveat: I'm at a new employer who doesn't use Siemens equipment, so I no longer have access to PLCs, TIA Portal, or Simatic Manager to tinker and test. The only time I've set up a data exchange between these PLCs, I used a Red Lion HMI as a gateway device. I've seen it done before over Profibus (a LONG time ago) but never set it up myself.

Share this post


Link to post
Share on other sites

Thanks for your input.

It’s correct about the Tsend and the and Tsend_C (_C is the compact and includes the connection)

my problem is to understand how I can send more than one DB since there’s no destination adresse for the receiving block. Only in the connection part where I can define the receiving port number. So maybe the only solution to send multiple DB are to create multiple Connections.

 

we would try to avoid structuring all in one DB since it would impact our structure. But it could end up with it.  

Share this post


Link to post
Share on other sites

Your existing structure shouldn't be affected; you would just add an intermediate step. Create a "holding" DB in both PLCs with the same structure that contains all of the DBs you want to send. Right before you send the DBs, you copy your local DBs to the "holding" DB, then send the "holding" DB. On the receiving end, you tell it to write the data to the local "holding" DB, then you copy it over to your local DBs.

Or, create multiple connections. Based on my experience with Siemens processors, I have a feeling that combining them into a holding DB may be easier to follow later, but I could be wrong. Like I said, I've never done this. I don't know how big a deal it would be to have a bunch of BLKMOV FBs running versus having a connection for each DB.

Share this post


Link to post
Share on other sites

That's right. I just made a quick Move block function "POKE_BLK" and merged the different unit data to this DB. But Wold still like to know how the "right" way is o send multiple DB's over a single connection.

Share this post


Link to post
Share on other sites

The "right" way may depend on who you're talking to...

There may not be a way to send multiple DBs with a single connection. Have you tried Siemens tech support? At least in North America, they're pretty easy (and free) to contact. They haven't always been the most helpful, but they're available.

Share this post


Link to post
Share on other sites

 

 

Edited by jrw

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now