×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 17053153, Entry date: 05/10/2004
(0)
Rate

Connecting a Windows-based panel to an IM308C (SIMATIC S5) via PROFIBUS DP

  • Entry
  • Associated product(s)

QUESTION:
How do I configure a connection between the IM308C (SIMATIC S5) and a Windows-based panel via PROFIBUS DP?

ANSWER:
This entry describes the connection of a Windows-based panel (here TP170B) via PROFIBUS DP to the SIMATIC S5 with an IM308C.

Description of the configuration of the IM308C and the TP170B in COM PROFIBUS

  • Start "COM" PROFIBUS via "Start > Programs > Siemens COM PROFIBUS ".
  • Add an IM308C as DP Master to the PROFIBUS DP segment.



Fig. 1: IM308C in PROFIBUS DP segment

  • Add the panel - here an TP170B - as DP Slave on the PROFIBUS DP.

Note:
If the relevant device is not available for selection in COM PROFIBUS, copy the GSD files from the path "DRIVE:/ Siemens/ProTool/PLCProg/Gsd" into the folder "DRIVE:/ Siemens/Cpbvx.x/gsd. Use the menu command "Import GSD files" to read the files into COM PROFIBUS.



Fig. 2: TP170B in PROFIBUS DP segment

  • Double-click the PROFIBUS stations to change the PROFIBUS address of the IM308C and the TP170B.



Fig. 3: Changing the PROFIBUS addresses

  • Then open the Properties of the TP170B with a double-click.
  • Via the "Configuration" button you make the I/O address settings for communication with the IM308C.
  • Click on "Module...". In our example we have selected the smallest possible configuration with 32-byte inputs and 22-byte outputs (Class B tiny). Close the dialog with "Apply" and "Close".



Fig. 4: Properties of the TP170B

  • The module configuration is applied automatically.
  • Add the input and output areas required for communication. In doing so you can define the initial addresses (e.g. P128 for input and output areas) and then have the end of the address area calculated automatically by clicking the Autoaddress button.

Warning:
For a connection with a Windows-based panel the input and output areas can be defined starting from the address P128. Please make sure that the initial addresses of the input and output areas are always identical. If you are not working with autoaddressing, then the address areas of a Windows-based panel must follow one after the other without a space in-between.

Fig. 5: Defining I/O areas for communication ( 12 KB )  

  • Close the dialogs with "OK".
  • You can change the bus parameters of the PROFIBUS DP via the menu "Configure > Set bus parameters...". In our example we have used the "PROFIBUS DP" bus profile and a baud rate of 1500 kBaud.



Fig. 6: Setting bus parameters

Description of the S5 program

You need function blocks for communication between the operator panel and the SIMATIC S5. These blocks depend on the CPU type used. The required blocks are to be found in the ProTool installation path under "DRIVE:> Siemens > ProTool > PLC Prog > SIMATIC S5 > Deu >". Copy these blocks into your STEP 5 project.

In our example we have used an S5-135U. You have to use both function blocks FB158 and FB159 for this CPU.

  • Create OB1.
  • In OB1 call the communication block FB158 absolutely. FB158 has three parameters.
    • "PERA" stands for the I/O initial address (see Fig. 5).
    • "BLEN" stands for the block length and is 0 in our example, because Class B tiny is being used.
    • For "CADB" you must specify a DB. FB158 then uses this as main memory. The first 11 words of the DB are needed for buffering data. The user can use the DB from the twelfth word.



Fig. 7: Calling the communication block FB 158

  • Apply the settings with "F7".
    Warning:

    FB159 is to be transferred only into the PLC and must not be called by the user.
  • Create DB100 with sufficient length.
  • Settings in the ProTool project
    • Open your ProTool project.
    • In the left half of the window you select "Controller" and double-click the controller displayed in the right half of the window.
    • The Properties dialog opens for settings assigning the parameters of the PLC connection.
    • Select "SIMATIC S5 DP" as controller protocol.
    • Press the "Parameters…" button.
    • Enter the OP Address (PROFIBUS address of the panel).
    • For "Baud rate" you select the data transfer rate you set in COM PROFIBUS (here "1500").
    • Specify "Class B tiny" for "Block length".



Fig. 8: ProTool controller connection

Note:
More information on the PROFIBUS DP connection of a Windows-based panel to SIMATIC S5 is available in the communication manual "SIMATIC HMI Communication for Windows-based Systems Part 1", in the "PROFIBUS DP Connection to SIMATIC S5" chapter in Entry ID: 1405528.


Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit