S7-1200 with sew movidrive b profinet communication

JEANST

Member
Join Date
Jun 2015
Location
PARIS
Posts
68
Hello i have to set up a profinet communication between a siemens S7-1200 and a inverter, sew movidrive B equiped with the option card DFE32B. I use for this TIA portal V13 SP1.
Is somebody have some documentation or sample program which could help me to implement this communication ??

Thank you
 
Did you check if example blocks from sew for profibus comms would work (they have ones for classict step7 atleast, rewriting them for tia does not take much time). I would expect the data to be same in profibus & profinet.
 
Hello
thanks for your reply
yes i saw this Step7 example with SFC14/SFC15 by reading the DFE32B documentation. Maybe i will finally do this way. But i also checked on the Siemens support and found samples on profinet communication between two S7-1200 using the TCON/TSEND_C/TRCV_C blocks and i Wonder if something "up to date" :) would not exist to communicate.
I also contact sew support and they don't have any portal examples.

thanks again
 
TCON/TSEND/TRCV are indeed communication jobs, but there are different communication jobs.
TCON/TSEND/TRCV are used if you want to send/recv data every few seconds, or once a minute, or once a day. They are NOT used in cyclic IO-communication like profinet-IO.

-Make sure you have the GSD for the DFE32B installed.
-Add the Movidrive as a device in Portal's Network View. They are found in: Other field devices > PROFINET IO > Drives > SEW > SEW > DFE/DFS
-Your newly created SEW device has 03 Data words as default setup. Change this depending on the needs of the SEW program by double clicking on the SEW, deleting the 03 data words and selecting a new one from the right pane.
-Click and drag from the profinet port of the CPU to the profinet port of the newly created SEW-device.
NOTE: if you want to change the amount of data words used by the SEW after you've made the connection, Portal has the tendency to crash. :D

The connection between CPU and SEW has just been set-up. Default IO used is 256-261. This means you can address it in the program as %QB256 - %QB261 and %IB256 - %IB261. This can be changed if you want to.

Now it's time to get the SEW documentation, since the SEW decides what these words are used for. And this depends greatly on which program is being used in the SEW.
For most SEW applications the following is true:
%IW256: Statusword (depends on the SEW application used)
%IW258: Motor speed readout
%IW260: Motor position
%QW256: Controlword (depends on the SEW application used)
%QW258: Motor speed setpoint
%QW260: Target prosition

If you are using standard SEW built in applications, then you can just configure them and in the end, start the simulator to see which bits are used for what in the Status-/Controlwords.

The following us valid for SEW Application: Bus Positioning
Create a DB within your Portal program, name it "Drives" for example.
Create a struct called "SEW_RECV". (you can use any other name tbh)
Within this struct create:
- "Status" of type BYTE (this will display the value of the 7-segment display on the drive, 0,5,6,A,C, etc)
- 8 line of type BOOL (these are the status from the drive like motor turning, fault, limitswitch, etc)
Give these bools valid names depending on your SEW application
- "CurrentSpeed" as Int
- "CurrentPosition" as Int


Create a struct in the same DB called "SEW_SEND". (or any other valid name)
Within this struct create:
- 16 lines of BOOL. These are the various commands the drive needs to work. Such as Controller inhibit, start, stop, rapid stop, CW, CCW, jog+, jog-, reference run, etc
Give valid names depending on SEW Application
- "SpeedSetpoint" as Int
- "PositionSetpoint" as Int


At the start of your program, use SFC14 to read the data.
- LADDER is the 03 data words from the Drive configuration, Portal allows you to search for it, unlike Step 7. :D
- RET_VAL is the status of the SFC, use this to determine a no-read of the values and act accordingly.
- RECORD is the record/struct where the data should be placed after reading it. In the example given above, it should containt: "Drives".SEW_RECV

After the code for the drive, or at the end of your program, use SFC15 to write the data.
- LADDER is the same as SFC14
- RET_VAL has the same function
- RECORD should be: "Drives".SEW_SEND


As for coding, it's rather simple
Code:
// Controller inhibit
code...
code...
code...
= "Drives".SEW_SEND.Controller_Inhib

// Positioning
L "Some number"
T "Drives".SEW_SEND.PositionSetpoint

etc
etc
etc


The problem is however, if you are using custom built IPOS programs.
 
Hello
I really thank you to took some time to answer with much détails
ok
finally it's not so different from setting up a profibus connection
in step7
i was a little bit confused with the TSEND/TRCV etc.. wich as you said is more
adapted to some "event" communication

I already done with the hardware configuration and follow your instructions
for the software with SFC14/SFC15 and the portal strange behaviors too :)

thanks again

jerome
 

Similar Topics

Hi Folks. Has anyone used an SEW EI7C encoder with an S71200 PLC? If yes, how is it done? I use this same encoder in EI76 mode with a...
Replies
0
Views
247
commentaire communiqué siemens s7-1200 avec vfd delta ? (cablage et sur tia portal )
Replies
0
Views
27
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
97
Hi. I’m trying to upload program from existing PLC S7-1200. Create new project in TIA v15.1 then upload. After upload successfully, go online but...
Replies
5
Views
147
Hi all, I am trying to do Modbus communications via the CB1241 RS485 Communication Board on a Siemens S71200 PLC. I am using a 1215C CPU. After...
Replies
6
Views
183
Back
Top Bottom