How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

Embed Size (px)

Citation preview

  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    1/10

    show the entry list

    S7-200 S7-200 Cables / Memory Cards / Accessories -- Setting up and parameterizinghardware -- Connecting and wiring modules

    How is the assignment of the MPI/DP interface defined?

    How do you synchronize the real-time clock of an S7-200 with a GPS receiver?

    How do you clear communications errors with SIMATIC S7-200 in Freeport mode?

    How do you connect a TD-200 to the S7-200 interface and use the PC/PPI cable at the sametime?

    How is the assignment of the MPI/DP interface defined?

    Display part number

    DiscriptionThe MPI/DP interface is assigned as follows:

    Fig. 1: Connector assignment

    Pinno.: Code Meaning Input /output

    1 NC Pin 1 is not connected -

    2 M24EXT

    M24 EXT return line (GND) of the 24V power supply.

    The current load from an external user connected between P24EXT and M24 EXT must not exceed a maximum of 150mA.

    Output

    3 LTG_B Signal line B Input /output

    4 RTS_AS RTS_AS, control signal for Receive data flow. The signal is "1"

    active when the directly connected AS sends.

    Input

    5 M5 EXT M5 EXT return line (GND) of the 5V power supply. The currentload from an external consumer connected between P5EXT andM5EXT must not be greater than 90 mA.

    Output

    6 P5 EXT P5 EXT power supply (+5 V) of the 5V power supply. The currentload from an external consumer connected between P5EXT andM5EXT must not be greater than 90 mA.

    Output

    7 P24 EXT P24 EXT power supply (+24 V) of the 24V power supply. The Output

    Page 1 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    2/10

    Table 1: Assignment of the MPI/DP interface

    Pins 2 and 7 (P24 EXT, M24 EXT) are only assigned for the 300 series and 400 series CPUs and forthe RS 485 Repeater for PROFIBUS.

    current load from an external user connected between P24 EXTand M24 EXT must not exceed a maximum of 150mA.

    8 LTG_A Signal line A Input /output

    9 RTS_PG RTS output signal of the module. The signal is "1" when thePG/PLC sends.

    Output

    Shield Connector housing

    How do you synchronize the real-time clock of an S7-200 with a GPS receiver?

    Display part number

    DescriptionWith the block in the library, you can use a GPS receiver to read out the time stamp and date of GPS

    messages. You can use this data to compensate the time drift of the real-time clock (RTC) of your S7-200.In the attached sample PLC application, the minutes and seconds of the real-time clock aresynchronized with the time stamp of the GPS message. Restricting time synchronization to minutesand seconds has the following advantages:

    l It can be applied worldwide, independently of time zones.l It can be applied independently of summer/winter time.

    Time synchronization is done between xx.20 and xx.40 after the synchronization command.

    Fig. 01

    CommunicationThe GPS receiver receives GPS messages in compliance with the NMEA standard and sends theseas ASCII character strings to the S7-200 basic module. The time stamp and date are read out of themin each case. The S7-200 uses the freely programmable communication mode (Freeport) via theRS485 connection ( Port '0' or Port '1') for communication with the GPS receiver. The library uses theRMC protocol of those available in the NMEA standard.

    Page 2 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    3/10

    Transfer formatThe transfer format used for GPS messages in compliance with the NMEA standard requires thefollowing interface parameters:

    l 4800 baudl 8 data bitsl No parityl 1 stop bit

    The resulting interface parameter to be entered at the "GPS_NMEA_TIME_UTC" block is 2#1101(see description under "Library: Read out time stamp and date").

    RequirementsThe library and the sample PLC application can be used

    l With a GPS receiver with serial interface that supports the NMEA standard and which isconnected to the S7-200 basic module via an RS232 PC/PPI cable.

    l With an RS232 PC/PPI cable

    Library: Read out time stamp and date

    The library contains the "GPS_NMEA_TIME_UTC" block for reading out the year, month, day, hour,minute and second in UTC (Universal Time Coordinated).

    No. Remarks

    1 Use the GPS receiverConnect the GPS receiver to the RS485 connection of your S7-200 basic module via an RS232PC/PPI cable. Set the DIP switches of the PC/PPI cable as in Fig. 02.

    Fig. 02

    Additional informationThe RS485 connection does not provide any power supply for your GPS receiver.

    2 Add libraryStore the attached "gps_time_read_port0.zip" or "gps_time_read_port1.zip" file on yourcomputer. Unpack the file and add the library to your configuration software STEP 7 Micro/WIN.

    Additional informationInstructions for adding libraries are available in Entry ID 16689345.

    3 Add GPS blockFrom the "GPS_TIME_READ_PORT0" or GPS_TIME_READ_PORT1" library you drag-and-drop the "GPS_NMEA_TIME_UTC" block into a cyclically called network.

    Page 3 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    4/10

    Fig. 03

    Assign an unused memory area to the library.

    Additional information

    l Approx. 950 bytes are need in the CPU's program memory.l The library occupies 214 bytes in the CPU's variable memory.l The required interrupt "GPS_NMEA_RC" and the subprogram

    "GPS_NMEA_INIT_PORT0" or "GPS_NMEA_INIT_PORT1" are inserted automaticallyin your project.

    l Information on assigning memory area for libraries is available in Entry ID 16689345.

    4 Connect the GPS blockAssign the contacts of the block. The variables used in Fig. 04 are examples. Via the"Freeport_Config" contact you configure the freely programmable communication. Theparameter "2#1101" results for the NMEA transfer format used (see "Transfer format").

    Fig. 04

    Additional informationAdditional information on configuring the freely programmable communication is available in theS7-200 manual, section 7.5 "Creating user-defined protocols in the freely-programmablecommunication".

    5 Use the GPS blockYou start the GPS evaluation with a positive edge at the 'Start' input. You can tell how well theevaluation is from the contacts 'DONE', 'ABORTED' and 'GPS_status'.

    The table lists the contacts of the block and tips for usage.

    Page 4 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    5/10

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    6/10

    Table 02

    PasswordThe password for the library is "1234" (without the quotation marks).

    Download

    Fig. 06

    The sample application cyclically reads the time stamp of the GPS message received. Theminutes and seconds are synchronized automatically in the time window between xx.20 andxx.40. The table lists the contacts of the block and t ips for usage.

    Additional informationChange the value of variable VW802 to '1000' to have synchronization tested at any time. Atthe end of each test, reset the variable to the value '100'.

    Contact name Datatype Contacttype Remarks

    EN BOOL Input SM0.0

    START BOOL Input Positive edge starts the synchronization

    CANCEL BOOL Input Abortion of the synchronization

    DONE BOOL Output Completion of the synchronization

    BUSY BOOL Output Synchronization active

    ABORTED BOOL Output Synchronization aborted

    GPS_rcvd_warning BOOL Output GPS reception defective

    sync_not_in_window BOOL Output Time of synchronization not in time window

    Description Download

    Library for reading out the GPS time via Port '0'

    gps_time_read_port0.zip ( 3 KB )

    Library for reading out the GPS time via Port '1'

    gps_time_read_port1.zip ( 5 KB )

    Sample application for synchronizing the RTC via Port '0'

    gps_time_sync_port0.zip ( 9 KB )

    Sample application for synchronizing the RTC via Port '1'

    Page 6 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    7/10

    Keywords:Mouse, Navigation, Synchronization

    gps_time_sync_port1.zip ( 9 KB )

    How do you clear communications errors with SIMATIC S7-200 in Freeport mode?

    Display part number

    Instructions:Communication errors in Freeport mode (e.g. missing or corrupted characters) can have differentcauses.

    1. Bus termination2. Processing speed of the S7-200 CPU3. Send priority of the RS-232/PPI Multi-Master cable

    1. Bus terminationMake sure there is a correct bus termination on the CPU. You can do this, for example, by plugging a

    PROFIBUS connector with activated terminator and PC socket between the CPU and the PC/PPIcable.

    2. Processing speed of the S7-200 CPUThe processing speed of the CPUs as from firmware version V2.0 might also mean that inbidirectional communication the block calls RCV and XMT are processed faster than the RS-232/PPIMulti-Master cable used can switch between Send and Receive mode.

    l Set a higher baud rate with DIP switches 1, 2, 3. The duration of the switching proceduredepends on the baud rate set.

    l Delay the time between the calls if necessary in the program by enabling the blocks alternatelyvia interrupt control, for instance.

    Example of enabling blocks via interrupt controlAfter receiving data at Port "0", the RCV process triggers the interrupt event "23". For this, youimplement an interrupt routine and link activation of the XMT block with it. Accordingly, the XMT blockreports via the interrupt event "9" when the Send procedure has been completed. A sample programfor an interrupt in Freeport mode is available in Entry ID 30839030, under "3. Freeport".

    Note:Table 7-11 "Turnaround Time and Settings" for the baud rates is available in the S7-200 manual inEntry ID 1109582.Information on the cable is available in Entry ID 16532946.

    3. Send priority of the RS-232/PPI Multi-Master cableAs soon as data is sent to the S7-200, the Multi-Master cable switches to Send mode and transmits

    the data. This is done regardless of the data transfer currently taking place. If the cable happens to bereceiving data from the S7-200 at that moment, that data transfer is interrupted. The data is lost andthe interruption of the procedure is not reported to the S7-200.Bearing this in mind, you can implement error-free bidirectional communication via a polling or timeslice procedure.

    l Polling: Stations send their data only when polled by the S7-200.l Time slice: Each station has a separate time corridor available for sending data one after the

    other. This can be synchronized by a pulse signal at an appropriate frequency from the S7-200.

    Page 7 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    8/10

    Note:

    l Information on the PPI cable is also available in the manual, chapter 7 "Configuring the RS-232/PPI Multi-Master Cable for Remote Operation", in Entry ID 1109582.

    l The RCV function requires an initial condition and an at end condition. Notes on this are alsoavailable in the manual, chapter "Transmit and Receive Instructions (Freeport)".

    l In RUN mode you cannot access the CPU via the port that you are using for the Freeportmode.

    Keywords:RS485, Freeport, Mode,

    How do you connect a TD-200 to the S7-200 interface and use the PC/PPI cable at the same time?

    Display part number

    Instructions:If you want to connect your S7-200 to a TD-200 and the PC at the same time, then the configurationmust look like this:

    Fig. 01

    Fig. 01 shows the configuration and positions of the DIP switches for an S7-22X, TD200 and a PCwith MicroWin 4.x.

    You need an adapter to connect the TD-200. A PROFIBUS with two connectors (including PCconnection socket) assumes this function. You connect one side of the cable to the S7-200. You thenplug the PC/PPI cable to this connector side. You connect the other side of the PROFIBUS cable toyour TD-200. Switch on the terminator on both connectors.

    You need the following components for this configuration:

    Table 1: Components required

    Please note that the PC/PPI cable has to be plugged directly into the PG interface of the PROFIBUSconnector. Only in this connection setup is the PC/PPI cable supplied with the necessary power fromthe CPU.

    Component Comments MLFB

    Power supply unit forTD-200

    230V/24VDC 6ES7 705-0AA00-1AA0

    115V/24VDC 6ES7 705-0AA00-1BA0

    or you use the 24V DC sensor power supply from the CPU

    PROFIBUS cable Minimum ordering quantity: 1m 6XV1 830-0EH10

    2 x PROFIBUS connector with PG connection socket 6ES7 972-0BB12-0XA0

    Page 8 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    9/10

    The power supply for the TD-200 must be separate, because the power supply cannot be via thePROFIBUS cable. Here, you can use the DC sensor power supply of the SIMATIC S7-200 or thepower supply unit for the TD-200. To connect the power supply on the TD-200 please use theconnector supplied or the cable supplied for the TD-200 power supply.

    Adjusting the PPI Multi master mode:Start STEP 7 Micro/WIN V3 and open the communication window. Open the properties dialog for thePC/PPI cable and activate the multi-master mode under the "PPI" register. Set "USB" as connection

    in the PG/PC interface, in the properties of the PC/PPI cable, when using the S7-200 USB/PPI Mulitmaster cable.

    Fig. 02

    Important:The DIP switch configuration, which needs to be executed at the cable, is dependant on the installedversion of STEP 7 - Micro/Win when using the S7-200 RS-232/ PPI Mulit master cable (6ES7 901-3CB30-0XA0). More information can be found under entry-ID: 16532946. The installation of STEP 7 -Micro/Win V3.2 + SP 4 is necessary, if the S7-200 USB/PPI Multi master cable (6ES7 901-3DB30-0XA0) is used.

    Note:The PPI Multi-master mode for the PC/PPI cable can only be selected for the Windows 95, 98, ME,Windows 2000 and Windows XP operating systems. STEP 7 - Micro/WIN is released for Windows XPfrom version V3.2 + SP3.

    If problems arise with the communications, then please check in the Control Panel the settings for theCOM port used (the "FIFO" option must be activated) and the size of the receive buffer (must be setthe smallest possible value). More information on the COM port settings is available in EntryID:14015814.

    Keywords:Connection configuration, Communication, Interface options

    Entry ID:23451070 Date:2010-03-29

    I regard this article.... as helpful as not helpful

    Copy link Suggestion for the entry Send to a friend

    Print

    Siemens AG 2010 - Corporate Information - Privacy Policy - Terms of Use

    Page 9 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automation...

    02.09.2010http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510 ...

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510
  • 8/2/2019 How is the Assignment of the MPI DP Interface Defined Www.otomasyonegitimi.com

    10/10

    Page 10 of 10Siemens - Industry Automation and Drive Technologies - Service& Support - Automati...

    02 09 2010http://support automation siemens com/WW/llisapi dll/23451070?func=ll&objId=234510

    http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510http://support.automation.siemens.com/WW/llisapi.dll/23451070?func=ll&objId=234510