9/28/2021 5:21 PM | |
Joined: 9/27/2006 Last visit: 6/1/2024 Posts: 12259 Rating: (2670) |
Hello oluwasedago; The setup of a DP/DP coupler is all a question of hardware configuration, so there is nothing special about using it with TIA Portal. But there are a few things you must ensure if you want to make this work: - What are the special features of input/output addressing with the DP/DP coupler? https://support.industry.siemens.com/cs/ww/en/view/22327981 First, the DP/DP coupler is designed as a 2-sided slave allowing I/O exchanges between 2 Profibus-DP masters. (it has 2 different Profibus interfaces, one connected to each master's Profbus network). Is the module you are using for the Beckhoff PLC a Profibus-DP master? Second, a DP/DP coupler exchanges data from input and output addresses, not from DB memory. You must copy the DB registers that you want to send to the Beckhoff PLC to the outout (%Q) addresses of the Siemens PLC (from the DB) and write the input (%I) addreses received from the Beckhoff PLC to the DB regsters of the Siemens PLC in your user program. Third, the I/O of the DP/DP coupler configuration in the Siemens PLC must match, line per line, the Beckhoff configuration , in size and datatype, except that input and output data must be reversed, See the screenshot below, showind an example configuration in 2 masters. Whatever is input to the Siemens PLC becomes output to the Beckhoff PLC, whatever is output from the Siemens CPU becomes input to the Beckhoff master. Lastly: Siemens makes a distinction on Profibus data that is consisent over unit, and consistent over total. Consistent over total is the equialent of a telegram, the data, no matter how many bytes long, is transfered all together. I do not recommend this for the Beckhoff CPU, simply confgure the DP/DP coupler data as consistent over unit (or without consustency) and transfer the I/Os to the Beckhoff registers as you need them. Hope this helps, Daniel Chartier |
Last edited by: dchartier at: 09/28/2021 17:26:00 |
|
9/28/2021 6:19 PM | |
Joined: 3/30/2015 Last visit: 3/7/2024 Posts: 70 Rating: (1) |
Hello dchartier, Thank you very much for this explanation. You have cleared a lot of doubts from my mind and I understand better now. I decided to test my program on the S71500 with a S7300 using same config and if everything works fine, I can move over to configuring the Beckhoff. So, now I am working with the S71500 TIA V16 connected to a S7300 Step 7 V5.6. I have been able to configure the system as it should be and there is NO SF error with respect to the Hardware config. In fact, I can send bits of data from one PLC to the other. However, I do not know how to move these data from DP coupler input or output to the DB. Could you please give me an instruction to use? I tried the DPWR_DAT and DPRD_DAT over the consistent areas, and no data transmission even when there is no error on the S71500 side but error exists on the S7300 side. Do you suggest that I should not use the Input and Output consistent types in the hardware config when connecting to the Beckhoff? I did not understand this part. I used DP input and outputs as bytes, how can I map DB to these areas or vice versa? Thank you very much
Attachmentsupport.zip (510 Downloads) |
9/29/2021 10:54 AM | |
Joined: 3/30/2015 Last visit: 3/7/2024 Posts: 70 Rating: (1) |
Good morning dchartier and thank you very much for this explanation. If i understand your explanation, I should use IBx and QBx to address inputs and outputs respectively since i have used Bytes, if I had used Word, then it would be IWx or QWx...? Also, your explanation talks about the data which were not consistent, how can I address the consistent ones? The goal for me is to move each single data from every part of the PLC to a single DB and then move the DB as a whole to the DP coupler for the other PLC to access it. You should have a better idea when you look at my DB structure perhaps. I will proceed now as you have advised and inform you of nay progress later. Could you show me how to program the BLK_MOV and does it work for the consistent part? I can also do away with the consistent bytes if it makes everything easier. Thank you once again. I have attached the structure.
Attachmentsetup.zip (479 Downloads) |
9/29/2021 11:27 PM | |
Joined: 9/27/2006 Last visit: 6/1/2024 Posts: 12259 Rating: (2670) |
Hello Oluwasedago; A variable of datatype REAL occupies 4 bytes (32 bits) and is formatted based on IEEE 754: look in the S7 online help or https://en.wikipedia.org/wiki/Single-precision_floating-point_format So your S7 address should be QDxxx, the D indicating a 4 byte value, or IDxxx, or DByy.DBDxxx. And you must format that address as a REAL (right click on the I or Q address to open the symbol table, mark it as REAL). Try it... Hope this helps, |
Last edited by: dchartier at: 09/29/2021 23:29:15 |
|
This contribution was helpful to1 thankful Users |
9/30/2021 9:24 AM | |
Joined: 3/30/2015 Last visit: 3/7/2024 Posts: 70 Rating: (1) |
Hello Daniel, Thank you very much! Now, I can view the real data as well as the Boolean data. I think I will delete the "Consistent" input and output configs and work only with the Non consistent ones, since I have a working platform now and do not really know how that would work on the Beckhoff side and do not know how to make them work on the Siemens side. I will probably just increase the Inout and Output bytes to be able to get more bytes for the real values transfer. I am very grateful for your time and help. Regards, David
|
10/4/2021 3:00 PM | |
Joined: 3/30/2015 Last visit: 3/7/2024 Posts: 70 Rating: (1) |
TIA V16 update 4, S71500 and Beckhoff Twincat 2.9 Hello, Please I have gone ahead to set up communication on the Beckhoff part and so far all hardware communication setup is perfectly fine. We have decided to use 2 X 64Bytes Inputs and outputs and 1 Byte Input and Output for Communication Check. 1 Byte Output_1: Communication Output Checks from Siemens (Address 10) 1 Byte Input_1: Communication Input check from Beckhoff (Address 13) We access bits from these and so far all is fine. For the Data Area, we plan to transfer various data in sections over: 64 Bytes Input_1: Data From Beckhoff_1 (Address 20..83) 64 Bytes Input_2: Data From Beckhoff_2 (Address 84..147) Here, we have sent some data from the beckhoff, but I cannot access it directly on the Siemens. Even when I check the direct address of IB, ID or IW, I get some strange data. I know the data is thee, but I do not know how to address to access it. I noticed while setting up my DB that the REAL data type tries to take 5 bytes instead of 4 bytes. When I drag the columns from ID20, the next one shows as ID25. I manually constructed the DB to have 4 bytes spacing. Please, could you help inform me of how to get these data with the right addressing? I have attached the set up and the data view from the beckhoff and also what I see in the Watch Table on TIA.
Attachment2.zip (385 Downloads) |
10/4/2021 9:13 PM | |
Joined: 9/27/2006 Last visit: 6/1/2024 Posts: 12259 Rating: (2670) |
Hello oluwasego; Here is a description of the SWAP nstruction in Step v16. You are right, the input can be eiher a Word ofr a DWord, it does not accepyt a REAL. https://support.industry.siemens.com/cs/ww/en/view/109773506/101023978763 BUT: User A_Dent had a similar issue as yours, with a Beckhoff PLC exchanging Real variables with a S7 PLC. Here you will find his description of the SWAP instruction in this case: Hope this helps, |
10/7/2021 3:16 PM | |
Joined: 3/30/2015 Last visit: 3/7/2024 Posts: 70 Rating: (1) |
Hello Daniel, THANK YOU VERY MUCH! I have been able to get the SWAP function right. I used a combination of the SWAP and the SLICING methods. 1- I created an FB for the slicing "Edian Conversion" 2- I created tags of MB with datatypes as Bytes. Then I moved the Input bytes from the DP inputs to this MBs. I also created an MD area output as DWORD tags. Since the SWAP function inly takes DWORD or WORD 3- I then used the MBs as input to my FB and the output as the MD. 4- I passed this MD (Dword) as input to the SWAP function and the output to the Conversion. The CONV is used to convert the DWORD to REAL in my DB. The SWAP function does the main job here! My solution is shown in the image for those who might need it. Thanks you once again. References: (1) https://support.industry.siemens.com/tf/ww/en/posts/issue-handling-real-inputs/213129/?page=0&pageSize=10 ( 2) https://support.industry.siemens.com/tf/ww/en/posts/swap-of-word-inside-real/123668
|
Follow us on