• No results found

SIMATIC - 003-FAQs for S7-1200

N/A
N/A
Protected

Academic year: 2021

Share "SIMATIC - 003-FAQs for S7-1200"

Copied!
148
0
0

Loading.... (view fulltext now)

Full text

(1)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

1

2009 to 2011

( [email protected] , v1.0-01/2012 )

FAQ´s for

SIEMENS – S7-1200

(2)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

2

(folha em branco)

(3)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

3

FAQ´s 2009 to 2011

- How do you establish MODBUS-RTU communication with STEP 7 Basic V10.5 for the SIMATIC S7-1200 ?

- How can you prevent data loss of runtime-generated parameters when updating your S7-1200 PLC program ?

- How can you share runtime-generated between several S7-1200 PLCs with a KTP Basic Panel ?

- How do you synchronize the time and date of an HMI Basic Panel with an S7- - PLC using the "Job mailbox" area pointer ?

- How can you manage block execution errors detected by the S7-1200 PLC ? - How can you deal with time errors detected by the S7-1200 CPU ?

- How is numerical integration programmed in STEP 7 Basic V10.5 ?

- How can you access an S7-1200 PLC by PC-Access and what is to be considered?

- How can you establish a connection between an S7-1200 PLC and SIMATIC NET OPC ? - How can you erase the IP address and set your S7-1200 PLC back to factory settings , using

the SIMATIC MC memory card (2MB or 24MB) ?

- How can you change the IP address of an S7-1200 PLC without STEP 7 Basic ?

- How can you download to a network of several S7-1200 PLCs with the same IP address ? - How you reset the IP address of your S7-1200 PLC using STEP7 Basic software?

- How can you manage peripheral device errors detected by the S7-1200 PLC ?

- How can you use an analog current output with wire break diagnostics on your S7-1200 PLC ?

- How can you use analog 0-20mA signal modules and signal boards with 4-20mA signals ? - How do you synchronize the time of the HMI Basic Panel with S7-1200 PLC ?

- How do you access S7-1200 tags with a panel or RT configured with WinCC flexible 2008 SP2 ?

- With which devices can the S7-1200 communicate via the PN connection ?

- How do you compensate for the string mismatch caused by the RCV_PTP and SEND_PTP blocks ?

- How can you reduce memory usage with Multi instancing ?

- How many high-speed counters (HSC´s) are provided by SIMATIC S7-1200 PLC? - How do you connect a sensor to the analog signal modules of the SIMATIC S7-1200 ? - How can you back up parameters before loading a new control program ?

- How can you determine the coordinates of your S7-1200 PLC with a standard GPS receiver ? - How can you establish a connection between an S7-1200 PLC and SIMATIC NET OPC ? - How do you implement a weekly timer for the SIMATIC S7-1200 in STEP 7 V11 ?

- With which devices can the S7-1200 comminicate via the integrated PROFINET interface and which protocols support the S7-1200 ?

- How can you access tags of the S7-1200 with WinCC ?

- How can you change the IP address of an S7-1200 without using STEP 7 Basic ?

- What is the connection between subnet masks and IP addresses with regard to subnetting and supernetting (classless inter domain routing CIDR) ?

(4)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

4

(folha em branco)

(5)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

5

How do you establish MODBUS-RTU communication with STEP 7 Basic V10.5 for the SIMATIC S7-1200 ?

Description

The SIMATIC S7-1200 enables point-to-point communication using the communication modules CM 1241 RS485 and CM 1241 RS232.

You can add up to three communication modules to each S7-1200 controller.

Using the MODBUS library integrated in STEP 7 Basic V10.5 you can define each communication module as a MODBUS master or slave.

If you define the CM 1241 RS232 as MODBUS master, then there is a physical limitation that permits communication with one slave only.

If you define the CM 1241 RS485 as MODBUS master, then it is possible to communicate with up to 32 slaves one after the other.

We will take a sample project to describe the configuration procedure in STEP 7 Basic V10.5 for communication with multiple slaves using the CM 1241 RS485.

Instructions

We have taken the example of MODBUS communication between a master and a slave.

There is alternate writing to the holding register of the slave (function code 16) and reading from the holding register of the slave (function code 03).

Since the RS485 has a two-wire (half-duplex) interface, writing and reading must be conducted consecutively.

By the same principle, the address of the slave to be addressed can be changed between two actions (here writing and reading), thus making it possible to exchange data with multiple slaves.

Fig. 01

The CM 1241 RS485 communication modules are linked to each other using a PROFIBUS cable. You can continue with the PROFIBUS cable to connect up to 31 additional MODBUS slaves to the master.

The configuration is done in STEP 7 Basic V10.5 SP2. The program code is transferred to the controllers with the switch CSM 1277.

MB_COMM_LOAD

The configuration block MB_COMM_LOAD is required on both sides (master and slave) for MODBUS communication.

(6)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

6

Fig. 02

The MB_COMM_LOAD block is used to select the communication module, set the communication parameters and establish the connection with the master or slave parameters.

The MB_COMM_LOAD block must be called in the first program cycle (by activating the system marker M1.0 in the hardware settings or by a call in Startup OB 100).

After inserting the communication module in the hardware configuration you can select the symbolic name of the communication module at the PORT parameter.

The communication parameters BAUD (transmission rate) and PARITY (parity) must be identical for all nodes. The port configuration of the RS485 interface in the STEP 7 V10.5 device view is irrelevant here.

The instance data block of the master or slave block is transferred at the MB_DB parameter and thus defines the communication module (PORT parameter) as MODBUS master or slave.

MB_MASTER

You use the MB_MASTER block to define the communication module selected with the MB_COMM_LOAD configuration block as MODBUS master.

(7)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

7

Fig. 03

The MB_MASTER block is used to select the MODBUS slave to be addressed, select the function code (read/write, MODBUS start address and data length) and define the local data storage area.

The communication is triggered by the REQ parameter.

The MODBUS-RTU station address to be addressed is transferred at the MB_ADDR parameter.

The MODE parameter specifies the direction of transmission ("0" = read, "1" = write or additional diagnostics functions).

The MB_MASTER block must be called in the first program cycle (by activating the system marker M1.0 in the hardware settings or by a call in Startup OB 100).

The DATA_ADDR and DATA_LEN parameters are for setting the MODBUS start address and the data length (bits or words depending on the MODBUS start address selected).

The DATA_PTR parameter defines the local receive and send data storage areas of the master. DATA_PTR must refer to a global data block created with the "Symbolic access only" option disabled. When multiple elements are to be transferred (bits or words), the symbolic name of an array or struct that covers this data storage area (DATA_ADDR and DATA_PTR) must be transferred here.

MB_SLAVE

You use the MB_SLAVE block to define the communication module selected with the MB_COMM_LOAD configuration block as MODBUS slave.

(8)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

8

Fig. 04

The MB_SLAVE block is used to define the MODBUS-RTU station address and specify the local data storage area for the holding register data transfer.

The local MODBUS-RTU station address is transferred at the MB_ADDR parameter. The MODBUS master identifies the slave with this.

The MB_HOLD_REG parameter defines the local holding register data storage area of the slave. MB_HOLD_REG must refer to a global data block created with the "Symbolic access only" option disabled. When multiple registers (words) are to be transferred, the symbolic name of an array or struct that covers the specified data volume of the master (DATA_ADDR and DATA_PTR) must be transferred here. The first word of this array or struct corresponds to the MODBUS holding register start address 40001.

The parameters can be switched with the inputs and outputs of the blocks or by accessing the instance data block concerned.

Sample project

In the master project, the alternate writing to / reading from the holding register of the slave is done using a sequencer.

(9)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

9

Fig. 05

The MB_COMM_LOAD configuration block is called in the initialization step 0.

In Step 1 the MB_Master with the communication parameters for writing to the slave (MODE = 1) is called and executed (REQ = 1).

The transition to Step 2 is made by the positive (DONE) or negative (ERROR) confirmation from the MB_MASTER.

The transition resets the execution of the MB_MASTER (REQ = 0).

In Step 2 the communication parameters for reading from the slave (MODE = 0) are written using the MB_MASTER in the same instance data block as from Step 1 (MB_DB parameter of the MB_COMM_LOAD block).

Execution and transition are the same as in Step 1.

(10)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

10

Fig. 06

The MB_ADDR parameter (see Network 6) can therefore also be used to change the slave to be addressed per step, which permits data to be exchanged with up to 32 slaves.

Download

(11)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

11

alternate data transfer between a master and a slave.

Unpack the "MODBUS_RTU.zip" file and open the sample project "MODBUS_RTU.ap10" with STEP 7 Basic V10.5 (>= SP2).

The version of the firmware of the SIMATIC S7-1200 controllers used is V1.0.2.

Download the project folders ("Master" and "Slave") into the controllers.

You can track the data transfer in the monitoring table.

Modbus_RTU.zip

( 969 KB )

Note

More information about Modbus Library Operations is available in the SIMATIC S7 S7-1200 Programmable Controller System Manual (Entry ID: 36932465).

(12)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

12

(folha em branco)

(13)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

13

How can you prevent data loss of runtime-generated parameters when updating your S7-1200 PLC program ?

Description

You need to apply changes to your user program running on a S7-1200 PLC, but you do not want to loose your runtime-generated parameters. Buffer your runtime-generated parameters in the HMI "Runtime" recipe function of STEP 7 Basic and download your program changes to your S7-1200 PLC. To apply this feature, execute the following steps:

 Prepare your STEP 7 Basic HMI project to buffer your parameters. No changes to your PLC program are necessary.

 Buffer your parameters in the HMI "Runtime" recipe function of STEP 7 Basic.  Download your changed program to your S7-1200 PLC.

 Retrieve your parameters from the HMI "Runtime". Capacity of the recipe function:

 You can buffer up to 20 elements (tags) per recipe.  You can use up to a maximum of 5 recipes.

Each recipe allows you to buffer different sets of tags (total sum of tags: 5x20=100). Please find an example project in the attached file.

Fig. 01

Configuring the buffering feature in your project

In the following description, the HMI project of the attached STEP 7 Basic project is used.

(14)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

14

1. Prepare the projects

Follow these steps:

 Open your own project with STEP 7 Basic.

 Download, unzip, and open the attached STEP 7 Basic project " DataStore". This project is designed to match the following devices:

 S7-1200 PLC with CPU 1214 (6ES7 214-1BE30-0XB0)  KPT600PN Basic Panel (6AV6 647-0AD11-3AX0)

The panel type is not important as the HMI "Runtime" can simulate any configured type of KPT Basic Panels.

2. Copy the HMI device into your project

 Drag and Drop the "HMI_DataStore" HMI project from the attached "DataStore" STEP 7 Basic project into your own project.

 Drag and Drop the "DataStore" global data block from the "DataStore" project to your own project.

 Drag and Drop the "RuntimeParameters" global data block from the "DataStore" project to your own project.

 Compile the data blocks of "PLC_1".

The "RuntimeParameters" data block holds the parameter tags for the example project. It is used to demonstrate this feature. In your own project any data tag capable of holding numerals can be used.

Fig. 02 Important

 Compile the data blocks of "PLC_1".

 Make sure the used data tags are "retentive". Otherwise the restored data will not survive a PLC STOP or a power-cycle condition.

3. Delete the HMI tags Follow these steps:

(15)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

15

 Select all "HMI_connection_x" entries, and click "Delete" in the context menu.

Fig. 03 Note

Do not delete the "s_ipAddress" internal tag. 4. Configure the HMI Connection

Follow these steps:

 Browse for "Device&Networks" and click the "Connections" button. Select the "Connections" tab and delete the HMI connection of the "HMI_DataStore" panel by

clicking "Delete" in the context menu. Acknowledge the following dialog window.

Fig. 04  Connect the Ethernet ports of the "HMI_DataStore" panel and the "PLC_1" S7-1200

(16)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

16

Fig. 05 5. Configure the HMI area pointer

Follow these steps:

In the context menu of the "HMI_connection_2" select the "Go to Connections editor.." item (see Fig. 05).

In the "Area pointers" tab, check the Data record area pointer active, and assign the "aw_dataRecord" tag from the "DataStore" data block.

Check the "Job mailbox" area pointer, and assign the "aw_jobMailbox" tag from the "DataStore" data block.

Fig 06 6. Add the tags to recipe function

Follow these steps:

 Browse the "Project tree" for the "Recipes" item of the "HMI_dataStore" HMI device.  In the recipe, view select "Recipe 1"

(17)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

17

 Change to the "Elements" tab, and assign the tags you want to share with your other

S7-1200 PLCs to the elements of this recipe.

 The default setting for decimal places is zero. Increase the number of decimal places up to the resolution you need.

 Configure up to 20 elements per recipe. Note

Any invalid tag needs to be deleted or reassigned. Invalid tags are highlighted red.

Fig. 07 7. Configure the screen tags

 Browse the "Project tree" for the "Screens" folder of the "HMI_DataStore" device, and open the "root screen".

Assign the "aw_dataRecord[3]" word tag to the status output field.

Fig. 08  Assign the "HMI_connection_2" connection to the "Release" event of the Change IP

(18)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

18

Fig. 09

Table 01

Buffering and retrieving the parameters with HMI "Runtime"

No. Buffering and retrieving the parameters 1. Start the HMI "Runtime" of STEP 7 Basic

Follow these steps:

 Select the "HMI_DataStore" HMI device.  Click the "Start runtime" button.

(19)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

19

2. Buffer the parameters in the HMI

Follow these steps:

 On your HMI display select "Recipe_1" and click the "OPEN" button. The "Recipe_data_record_1" opens.

Fig.11

 Press the "PLC>>HMI" button to read the parameters from the S7-1200 PLC. The "Save as" window opens.

Fig. 12

 To save the data record number "1", enter the number "1" in the "Number" input field, and click the "OK" button.

Fig. 13

 Click the "Open" button to see the parameter values of this data record.

Fig. 14 Your parameters are now stored in Runtime.

Note

You can also archive / retrieve parameter element values. 3. Download your program

(20)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

20

Fig. 15

4. Restore the parameters to the PLC Follow these steps:

 On your HMI display select "Recipe_1" and click the "OPEN" button. The "Recipe_data_record_1" opens. See Fig. 11/12 for details.

 Press the "HMI>>PLC" button to write the parameters to your S7-1200 PLC.

Table 02

Adjusting the IP address

Change the IP address, that is configured in the HMI connection, if you want to access another S7-1200 PLC (for example, PLC_2). Each S7-1200 PLC has a unique IP address.

No. Adjust the IP address

1. If the IP address of the S7-1200 PLC in the project does not match the IP address of the actual S7-1200 PLC you are using, you must change the IP address configured in the HMI "Runtime" (for example, you run the same project on several S7-1200 PLCs).

Follow these steps:

 On your HMI "Runtime", enter the IP address of the S7-1200 PLC (for example, "192.168.0.1") in the input field.

 Click the "Change IP" button.

Fig. 16

(21)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

21

Requirements  S7-1200 PLC  Ethernet cable  PG / PC  STEP 7 Basic V10.5 S71200_DataStore.zi p ( 3134 KB )

(22)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

22

(folha em branco)

(23)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

23

How can you share runtime-generated between several S7-1200 PLCs with a KTP Basic Panel ?

Description

Your application consists of one master project which you want to run simultaneously on several PLCs. While commissioning the first PLC, miscellaneous specific parameters will be generated which shall be used for all other PLCs. Archive these parameters in your KTP Basic Panel, and retrieve them on your other PLCs, instead of commissioning every single PLC. The KTP Basic Panel allows for the archiving and retrieving of these parameters, while being connected to an S7-1200 PLC, using its retentive recipe function.

The recipe function of the KTP Basic Panel is used for this task. To use this "Parameter sharing" feature, follow these steps:

1. Integrate the recipe function into your HMI program, and link the parameter tags you want to archive / retrieve.

2. Download your master project to all of your PLCs.

3. Assign unique IP addresses to each of your PLCs.Youcan use either STEP 7 Basic or the "IP TOOL" which you will find in entry ID 41737436.

4. Download your HMI program to your KTP Basic Panel. 5. Connect your KTP Basic Panel to your first S7-1200 PLC.

6. In the configuration of the KTP Basic Panel, adjust the IP address (for example, 192.168.0.1) for communications with your first S7-1200 PLC.

7. Commission your first PLC, and generate specific runtime parameters. 8. Archive the commissioned parameters in your KTP Basic Panel. 9. Connect your KTP Basic Panel to your next S7-1200 PLC.

10. In the configuration of the KTP Basic Panel, adjust the IP address (for example, 192.168.0.2) for communications with your next S7-1200 PLC.

11. Retrieve your parameters from your KTP Basic Panel.

12. Repeat steps 9 through 11 until all your S7-1200 PLCs are updated.

To integrate this feature into your program, follow the steps described in the "Integrating the recipe function" section of this article.

An overview on the use of this feature can be found in the "Applying the parameter sharing feature" section of this article.

Fig. 01 Integrating the recipe function

(24)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

24

No. Integrating the recipe function

1. Prepare the projects Follow these steps:

 Open your own project with STEP 7 Basic.

 Download, unzip and open the attached STEP 7 Basic project " DataStore". This project is designed to match the following devices:

 S7-1200 PLC with CPU 1214 (6ES7 214-1BE30-0XB0)  KTP600PN Basic Panel (6AV6 647-0AD11-3AX0) 2. Copy the HMI device and the data blocks into your project

Follow these steps:

 Drag and Drop the "HMI_DataStore" HMI project from the "DataStore" project to your own project.

 Drag and Drop the "DataStore" global data block from the "DataStore" project to your own project.

 Drag and Drop the "RuntimeParameters" global data block from the "DataStore" project to your own project.

 Compile the data blocks of "PLC_1".

The "RuntimeParameters" data block holds the parameter tags for the example project. It is used to demonstrate this feature. In your own project any data tag capable of holding numerals can be used.

Fig. 02

Important

 Compile the data blocks of "PLC_1".

 Make sure the used data tags are "rententive". Otherwise the restored data will not survive a PLC STOP or a power-cycle condition.

3. Delete HMI tags Follow these steps:

(25)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

25

 Browse the "Project tree" for the "HMI tags" editor.

 Select all "HMI_connection_x" entries, and click "Delete" in the context menu.

Fig. 03 Note

Do not delete the "s_ipAddress" internal tag. 4. Configure HMI Connection

Follow these steps:

 Browse for "Device&Networks" and click the "Connections" button. Select the "Connections" tab, and delete the HMI connection of the "HMI_DataStore" panel by clicking "Delete" in the context menu. Acknowledge the following dialog w

Fig. 04

 Connect the Ethernet ports of the "HMI_DataStore" panel and the "PLC_1" S7-1200 PLC. A new HMI connection is established

(26)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

26

Fig. 05 5. Configure the HMI area pointer

Follow these steps:

 In the context menu of the "HMI_connection_2" select the "Go to Connections editor.." item (see Fig. 05).

 In the "Area pointers" tab, check the Data record area pointer active, and assign the "aw_dataRecord" tag from the "DataStore" data block.

 Check the "Job mailbox" area pointer, and assign the "aw_jobMailbox" tag from the "DataStore" data block.

(27)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

27

6. Add the tags to recipe function

Follow these steps:

 Browse the "Project tree" for the "Recipes" item of the "HMI_dataStore" HMI device.  In the recipe view, select "Recipe 1"

 Change to the "Elements" tab, and assign the tags you want to share with your other S7-1200 PLCs to the elements of this recipe.

Note

Any invalid tag needs to be deleted or to reassigned. Invalid tags are highlighted in red.

Fig. 07

Note

You can configure the tags stored in the HMI by adding new elements to the "Elements" view of the "Recipe_data_record_1".

 There are up to 5 recipes available for you to configure 5 different sets of tags.  One recipe holds up to 20 data records with 20 elements each. Therefore you can store

20 different setups in one recipe. 7. Configure the screen tags

Follow these steps:

 Browse the "Project tree" for the "Screens" folder of the "HMI_DataStore" device, and open the "root screen".

(28)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

28

Fig. 08

 Assign the "HMI_connection_2" connection to the "Release" event of the Change IP button.

Fig. 09

Table 01

Applying the "parameter sharing" feature

The following overview is based on the attached "DataStore" project.

(29)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

29

No. Applying the "parameter sharing" feature

1. Download your program to all of your PLCs Follow these steps:

 Select the "PLC_DataStore" S7-1200 PLC.

 Click the "Download to device" button and acknowledge the following dialog windows.

Fig. 10 2. Assign unique IP addresses

Assign unique IP addresses to all of your S7-1200 PLCs. You can use either STEP 7 Basic or the IP TOOL. Please find the IP TOOL in entry ID 41737436.

3. Download your HMI program to your HMI device Follow these steps:

 Select the "HMI_DataStore" HMI device.

 Click the "Download to device" button. See Fig. 10 for details. 

4. Change IP address

To address an S7-1200 PLC with your KTP Basic Panel, you need to use the IP address of the S7-1200 PLC in your HMI device:

 Connect your KTP Basic Panel to your S7-1200 PLC.

 On your KTP Basic Panel, enter the IP address of the S7-1200 PLC (for example, "192.168.0.1") in the input field.

(30)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

30

Fig. 11

5. Store parameters in HMI

Follow these steps:

 On your HMI display, select "Recipe_1", and click the "OPEN" button. The "Recipe_data_record_1" opens.

 Press the "PLC>>HMI" button to read the parameters from the S7-1200 PLC. The "Save as" window opens.

Fig. 12

 To save the data record number "1", enter the number "1" in the "Number" input field, and click the "OK" button.

Fig. 13

(31)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

31

Fig. 14

Your parameters are now stored in your panel. Note

It is also possible to archive / retrieve parameter elements. 6. Restore data in PLC

 On your HMI display, select "Recipe_1", and click the "OPEN" button. The "Recipe_data_record_1" opens. See Fig. 11/12 for details.

 Press the "HMI>>PLC" button to write the parameters to your S7-1200 PLC.

Table 02 Note

You can also use the "Runtime" feature of STEP 7 Basic instead of a KTP Basic Panel. Requirements  S7-1200 PLC  Ethernet cable  PG / PC  STEP 7 Basic V10.5  KTP600PN basic panel S71200_DataStore.zi p ( 3137 KB )

(32)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

32

(folha em branco)

(33)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

33

How do you synchronize the time and date of an HMI Basic Panel with an S7-1200 PLC using the "Job mailbox" area pointer ?

Description

To synchronize the time and date of your HMI Basic Panel to the local time of your S7-1200 PLC, perform the following steps:

 Set up a tag array for the area pointer to store the time and date information.  Enable and configure the "Job mailbox" area pointer.

 Enter the time and date information into the tag array.  Evaluate the "Job mailbox".

Synchronizing the time and date

The necessary steps to synchronize time and date via the "Job mailbox" area pointer are described in the table below.

No. Synchronizing the time and date 1. Set up a tag array for the area pointer

You use the area pointer to access a data area in the PLC, and this data area is saved in the PLC. Set up the data area as a tag array in a global data block or an instance data block. The

configuration of the tags in a data block is based upon the length of the area pointer you want to use. The unit for the length of an area pointer is a 16-bit word.

The "Job mailbox" area pointer requires an array of 4 elements.

1. Expand the view of the PLC in the "Project tree", and open the "Program blocks" folder. Double-click on "Add new block", click on "Data block (DB)" with "Global DB" as the type and click the "OK" button. The data block opens.

Fig. 01

2. Enter a tag name (for example "a_jobMailbox") in the "Name" column.

3. Select "Array [lo .. hi] of type" as the data type in the "Data type" column. Replace the "lo" and "hi" entries in the brackets with the low ("0") and high ("3") values for the dimensions of the array.

4. Replace the "type" designation with the "word" data type. The full data type for an array of 4 tags appears as follows: "Array [0 .. 3] of word".

Fig. 02 5. Select the PLC in the "Project tree" and click the "Compile" button in the tool bar. The

data block is compiled. Following compilation, the tag array is available for further use in the project.

(34)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

34

Fig. 03 Note

The data block must be compiled before the tag array is available for further use. 2. Configure the "Job mailbox" area pointer

To configure the "Job mailbox" area pointer, open the "Connections" editor and open the "Area pointer" tab.

1. Expand the view of the HMI device in the "Project tree" and double-click the "Connections" entry. The "Connections" editor opens.

Fig. 04

2. Open the "Area pointers" tab and enable the "Job mailbox" area pointer by checking the box in the "Active" column.

3. Click the navigation button in the "PLC tag" field; the object list opens. Navigate to the "Data_block_1"data block in the object list and select the "a_jobMailbox" tag in the right window.

(35)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

35

Fig. 05 3. Enter the parameters in the "Job_mailbox" tag array

The PLC can use the "Job mailbox" to transfer jobs to the HMI Basic Panel in order to trigger corresponding actions on the HMI device.

The HMI Basic Panel evaluates the "Job mailbox" if the first word of this job is unequal to zero. This means that the parameters must be entered in the "Job mailbox" first, followed by the job number. When the HMI Basic Panel accepts the "Job mailbox", the first word is set to 0 again. The execution of the "Job mailbox" is generally not completed at this point in time.

The first word of the "Job mailbox" contains the job number; this is "14" to set the time. The second word contains "Parameter 1".

The third word contains "Parameter 2". The fourth word contains "Parameter 3".

Fig. 06

Read the local time from the PLC

Fig. 07 Enter the parameters in the "Job mailbox" tag.

(36)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

36

Fig. 08

Note

The parameters are BCD-coded.

4. Evaluate the "Job_mailbox"

Enter the job number in the "Job mailbox" tag. This will start the evaluation of the "Job mailbox".

(37)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

37

Fig. 09

The "Job mailbox" is evaluated and the time of the HMI Basic Panel is set to the local time of the S7-1200 PLC.

5. Set the date of the HMI Basic Panel

The setting of the date is similar to the setting of the time.

To start the evaluation of the "Job_mailbox" the first word needs to be set to "15". Fig. 10 Table 01 Requirements  S7-1200 PLC  Ethernet cable  PG / PC  STEP 7 Basic V10.5

(38)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

38

(folha em branco)

(39)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

39

How can you manage block execution errors detected by the S7-1200 PLC ?

Description

By default, the CPU responds to a block execution error by logging an error in the diagnostics buffer and switching to STOP mode, as this is the predefined system response.

You can change this behavior by placing one or more "GetError" or "GetErrorID" instructions within the program block you want to monitor. In this case the CPU does not switch to STOP mode and does not log an error in the diagnostics buffer. Instead, this block is now set to manage errors within the block. The error information is reported in the output of the "GetError" or "GetErrorID" instruction. "GetError"

The "GetError" instruction indicates that a program block execution error has occurred and fills a predefined error data structure of the data type: "ErrorStruct" with detailed error information. The "GetError" instruction can also be used to forward an alarm about the error status to the calling block. To do this, the instruction must be positioned in the last network of the called block. "GetErrorID"

The "GetErrorID" instruction indicates that a program block execution error has occurred and reports the ID (identifier code) of the error. Please find a list of the error codes in the online help of STEP 7 Basic, search for the keyword "GetErrorID".

Note

No "GetError" or "GetErrorID" instruction is present when you create a new project. Evaluating a block execution error event with the "GetError" instruction

Information on the block execution event will be stored in a tag of the "ErrorStruct" system data type.

No. Evaluating a block execution error event with the "GetError" instruction 1 Add the "GetError" instruction

 Browse the instructions pane for "Extended instructions > Program control > GetError".  Drag and Drop a "GetError" instruction into the last network of the OB you want to

monitor.

 Click the "OK" button. Please see the figure below for details.

2 Reading out the "ERROR" output information of the "GetError" instruction You can store the local error information in a global tag as described below:

 Create a local "error_local" tag of the data type "ErrorStruct".  Store the value of the "Error" output in the local "error_local" tag.  Browse the instructions pane for "Instructions > Move > MOVE".

 Drag and Drop a "MOVE" instruction in the network, where your "GetError" instruction is located.

 Connect the ENO contact of the "GetError" instruction with the EN contact of the "MOVE" instruction.

 Create a global tag "gl_error" of the "ErrorStruct" data type in the "data_block" data block.

(40)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

40

Fig. 01

3 Evaluating the "ERROR" output information of the "GetError" instruction

Only tags of the "ErrorStruct" system data type can be specified at the ERROR output. The "ErrorStruct" system data type specifies the exact structure in which the information about the error is stored. Using additional instructions, you can evaluate this structure and program an appropriate response.

The "ErrorStruct" tag contains the following information:

 The type of block, in which the error occurred (for example ´"data_block".gl_error.block_type´)

 The number of the block in which the error occurred (for example: ´"data_block".gl_error.code_block_number´)

Please find a detailed overview in the figure below. A detailed list of the contents of the "ErrorStruct" data type can be found in the online help of STEP 7 Basic, search for the keyword "GetError".

(41)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

41

Fig. 02

Table 01

Error conditions indicated by the "ENO" enable output

The output "ENO" of the "GetError" or "GetErrorID" instruction is set only if the two following preconditions are met:

 The input EN is enabled.  Error information is present.

If one of these conditions does not apply, then the remaining program execution is not affected by the "GetError" instruction. If EN = TRUE and "GetError" or "GetErrorID" executes, then:

 ENO = TRUE indicates a code block execution error occurred and error data is present  ENO = FALSE indicates no code block execution error occurred

You can connect error reaction program logic to the "ENO" output which activates after an error occurs. If an error exists, then the output parameter stores the error data where your program has access to it. "GetError" and "GetErrorID" can be used to send error information from the currently executing block (called block) to a calling block. Place the instruction in the last network of the called block program to report the final execution status of the called block.

Online diagnostics with STEP 7 Basic

When you do not use an "GetError" instruction, and you have online access to your S7-1200 PLC with STEP 7 Basic, you can use the "Online & diagnostics" function:

 Go online to your S7-1200 PLC.

 Browse the "Project tree" for the entry "Online & diagnostics".

 Browse the navigation area of the "Online Access" window for the entry "Diagnostics buffer".  Select a program block execution error event from the "Events" table.

(42)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

42

number of the affected OB and the event ID of the error.

Fig. 03 Note

An "Incoming event" shows the beginning of an event. An "Outgoing event" shows the end of an event. Use case

If a directly addressed contact (for example "IW120:P") is not available, you can use the "GetError" instruction to achieve the following results:

 Prevent the CPU from going to STOP mode  Launch an error message

 Set up a substitute value on the missing contact Requirements

 S7-1200 PLC  Ethernet cable  PG / PC

(43)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

43

How can you deal with time errors detected by the S7-1200 CPU ?

Description

Time errors usually occur during commissioning of the S7-1200 PLC. Time errors can be triggered by any of the following conditions:

 Maximum cycle time exceeded  Called OB still being executed  Queue overflow

 Interrupt loss due to excessive interrupt load

All time error events trigger the execution of OB 80, if it exists. OB 80 includes startup information that helps you determine which event and OB generated the time error.

If OB 80 does not exist, then the CPU ignores the error, for when the maximum cycle time is exceeded.

Understanding time error events

No. Understanding time error events 1. "Maximum cycle time exceeded"

If the cyclic program exceeds the maximum cycle time, the reaction will be as follows: 1. When the cycle time exceeds the cycle monitoring time for the first time, there is an

attempt to start the "Time error interrupt" OB (OB 80).

If there is no "Time error interrupt" OB in the CPU, the CPU generates an error and continues to execute the user program.

2. If the event "maximum cycle time exceeded" happens twice within the same program cycle, without resetting the cycle timer, then the CPU turns to STOP, regardless of whether OB 80 exists.

You can prevent the CPU from turning to STOP by restarting the CPU cycle monitoring with the "RE_TRIGR" instruction.

The operating system monitors the execution time of the cyclic program for a configurable upper limit known as the "Maximum cycle time".

You find the "Maximum cycle time" in the properties of your S7-1200 PLC.  Browse the "Project tree" for your S7-1200 PLC.

 Double-click the "Device configuration" item.

 Select your S7-1200 PLC in the "Devices & Networks" view.  On the "Properties" tab, browse for the "Cycle time" entry.

(44)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

44

Fig. 01

2. "Called OB still being executed"

The called OB is currently being executed. This is possible for time-delay interrupt OBs and cyclic interrupt OBs.

3. "Queue overflow"

An overflow has occurred in an interrupt OB queue. There is a queue for each interrupt priority group. If an interrupt event occurs when the corresponding queue is full, a time error event is generated.

4. "Interrupt loss due to excessive interrupt load" An interrupt was lost due to the excessive interrupt load. Table 01

(45)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

45

The "RE_TRIGR" instruction

The "RE_TRIGR" instruction (Re-trigger cycle time monitoring) allows you to reset the timer that measures the cycle time. However, this instruction must be executed in a program cycle OB. The "RE_TRIGR" instruction is ignored if executed in other blocks (for example OB 80). If the maximum scan cycle time is exceeded twice within the same program cycle with no "RE_TRIGR" instruction executed, the CPU will switch to STOP immediately.

To insert a "RE_TRIGR" instruction:

 Browse the instructions pane for "Extended instructions" > "Program control" > "RE_TRIGR".  Drag and Drop this instruction into a network of a program cycle OB.

Fig. 02 Note

Use the "RE_TRIGR" instruction with care. Repeated executions of the "RE_TRIGR" instruction can create an endless loop or a very long scan. As a result of this endless loop, the cyclic program will never end, and the output process image will never be written. Therefore you will never receive a save state at the outputs.

Evaluating the time error event with the "Time error interrupt" OB

The operating system calls the "Time error interrupt" OB 80, if one of the previously mentioned events occurs.

No. Evaluate the time error event with the "Time error interrupt" OB 1. Add the "Time error interrupt" OB

 Browse the "Project tree" for the "Add new block" item.

 In the "Add new block" window, click the "Organization block" button.  Select the "Time error interrupt" OB from the list.

 Click the "OK" button. Note

(46)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

46

Fig. 03

2. Monitoring the start information of the "Time error interrupt" OB

 Double-click the "Time error interrupt" OB of your S7-1200 PLC in the "Project tree".  Browse the instructions pane for "Instructions" > "Move" >"Move".

 Drag and Drop a move instruction into a network of your "Time error interrupt" OB.  Move the value of the "fault_id" tag into a global tag (for example

""Data_block".by_fault_ID").

 Program the other tags you want to monitor in the same way. Please refer to the example in Fig. 04.

(47)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

47

Fig. 04

3. Evaluating the start information of the "Time error interrupt" OB The "Time error interrupt" OB has the following start information: "fault_id" (BYTE)

The "fault_id" identifies the type of error.  0x01: Maximum cycle time exceeded  0x02: Called OB still being executed  0x07: Queue overflow

 0x09: Interrupt loss due to excessive interrupt load "csg_OBnr "(OB-ANY)

Number of the OB being executed at the time of the error. "csg_prio" (UINT)

Priority of the OB being executed at the time of the error. Table 02 Requirements  S7-1200 PLC  Ethernet cable  PG / PC  STEP 7 Basic V10.5

(48)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

48

(folha em branco)

(49)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

49

How is numerical integration programmed in STEP 7 Basic V10.5 ?

Instructions

The integral is the mathematical calculation of the area under a given function curve. However, there is often no mathematical correlation in practice, but rather an analog value which varies over time. The integral calculation involes totaling the trapezoidal areas, spread between the last two function values and the time. This trapezoidal area is identical to the product of the average of the two process values and the time interval.

Fig. 01 Figure 01 illustrates the calculation of the integral of a trapezoidal area:

 Calculation: 0.5*(F(t1)+F(t0))*(t1-t0) + 0.5*(F(t2)+F(t1))*(t2-t1) + ...

Fig. 02

(50)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

50

Parameter Data type Memory area Description EN BOOL I, Q, M,

D, L Block enable input (must always be on) IN REAL M, D, L Value to be integrated

Enable BOOL I, Q, M, D, L

Enable input (calculation occurs only if it is TRUE; if it is FALSE, parameter OUT displays the last calculated value)

Reset BOOL I, Q, M,

D, L Reset input (if it is TRUE, parameter OUT will be reset) SMB BYTE M Location of the system memory byte (must be connected!) ENO BOOL Q, M, D,

L Enable output

OUT REAL M, D, L Integrated value (retentive)

Error BOOL Q, M, D, L

Error output (it is steady TRUE, if the system memory byte is disabled or not connected and it is TRUE for one cycle, if a power up occurs while the integration is enabled = sign for a power break down while integration)

Downloads

The downloads below contain the library and a sample program for calculating integrals. Copy the ZIP files into a separate folder, and unpack the files with the WinZip program.

Sample program: Integral calculation with STEP 7 Basic

The "Integral.zip" download contains the STEP 7 Basic program (FB602) program for calculating the integral. There is one example programmed in the STEP 7 Basic project.

Integral_sample.zip

( 2350 KB )

In the example, an analog input value (IW64, "velocity_INT" variable) is converted to a floating-point value in Network 1 (MD10, "velocity_REAL" variable). This floating-point value is the input "IN" for the integrator FB602, which results in the output "OUT" (MD14, "distance"). The calculation of the integral is started with the "DB_2".Enable bit (which is selected als retentive) on FB602's "Enable" parameter. The "Error" output must be stored by a retentive counter or a RS-Flip-Flop (Network 3) to see, that a power failure occurred while integration. M5.0 resets the output value and the error flag M5.3 in Network 4.

Library "Integral"

The "Integral.zip" library contains the know-how protected, "Integration" function block (FB602). The password to disable the know-how protection is "1234".

Integral.zip

(51)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

51

Fig. 03

To open libraries in STEP 7 Basic, follow these steps: 1. Open the "Libraries" task card in STEP 7 Basic.

2. Under "Global libraries" click on the "Open Global Libraries" button in the toolbar.

3. Browse for the library in the "Open Global Libraries" dialog and select the "Integral.al10" file. 4. Click the "Open" button.

The "Integral" library with the FB602 "Integration" appears in the "Global libraries". Validity

This FAQ is valid for

 S7-1200 PLCs from firmware version V1.0.0.  STEP 7 Basic from V10.5.

(52)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

52

(folha em branco)

(53)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

53

How can you access an S7-1200 PLC by PC Access and what is to be considered ?

Description

You can establish a connection between PC Access and your S7-1200 PLC. Nevertheless, there are some restrictions to keep in mind.

Note

Although establishing a connection between an S7-1200 PLC and SIMATIC NET OPC is not officially supported by Siemens, this FAQ describes a solution. In the following chapters, you will find a

description of how to establish such a connection. Restrictions

There are certain restrictions to be considered due to the fact that PC Access was originally intended to access an S7-200 PLC:

 Only tags in the data block DB1 of your S7-1200 PLC can be accessed because the S7-200 only had one data block.

 DB1 in your S7-1200 PLC needs to be non-symbolic. Please uncheck the checkbox "Symbolic access only" when creating your DB1 (Figure 01).

Requirements

The following items are the hardware and software requirements:  S7-1200 PLC

 Ethernet cable  STEP 7 Basic V10.5  PC Access V1.0.4.10 (SP4)

Create tags in data block DB1 of your S7-1200 PLC project To create tags in your S7-1200 PLC follow the instructions below.

No. Create tags in data block DB1 of your S7-1200 PLC project 1. Add the data block DB1 to your project

Browse the "project tree" and click on the item "Add new block". Click the button "Data block (DB)". Uncheck the checkbox "Symbolic access only". Click the "OK" button.

(54)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

54

Fig.01

2. Allocate the tags in STEP 7 Basic

Double-click DB1. Add the following three tags under "name" and "Data type" and give them an "initial value".

 Item_01: "Byte"  Item_02: "Int"  Item_03: "DWord"

Fig.02

Click the item "Save project" in the tool bar. Download the project by clicking the download button in the tool bar.

(55)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

55

3. Monitor the tags in STEP 7 Basic

To cross-check the tag values, use the watch table function of STEP 7 Basic. Browse the "Project tree" for the item "Add new watch table" and fill in the "Name" and "Address" of the required tags.

In this example, add the following three tags:  Item_01: "DB1.DBB0"

 Item_02: "DB1.DBW2"  Item_03: "DB1.DBD4"

Fig.03 Table 01

Create a new PC Access project and access tags

Follow these instructions to establish a connection between PC Access and your S7-1200 PLC to access data of your PLC.

No. Create a new PC Access project and access tags 1. Create a new project

(56)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

56

Fig.04

2. Add a new PLC

Highlight the entry "MicroWin(TCP/IP)" in the "project tree".

Browse the menu bar, and select "Edit > New > PLC". A "NewPLC" object will be added, and the "PLC properties" dialog window of the new PLC opens. Enter the following parameters into the input fields of this window:

 Name: "S7-1200_PLC"

 IP Address: "192.168.0.11" (IP adress of your S7-1200 PLC)  TSAP Local: "10.00." (TSAP of your S7-1200 PLC)  TSAP Remote: "03.01." (TSAP of PC Access) Click the "OK" button.

(57)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

57

3. Add a new item

Highlight your S7-1200 PLC in the "project tree". Browse the menu bar, and select "Edit > New > Item". The dialog window "Item properties" opens.

To access data in your S7-1200 PLC, perform the following steps:  Enter an item name in the "Name:" input field.

 Enter the address of the tag in the "Address:" input field.  Select the type of data in the "Data Type:" input field.

Additionally, you can restrict the memory address access to "read" only or "write" only. Click the "OK" button.

Fig.06

Note

Please find a list of the accessible items at the end of this document in the table "accessible tags and items".

(58)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

58

4. Save the project

Browse the menu bar, and select "File > Save" to save your project.

Fig,07

Note

Anytime you open or edit a PC Access project, you must click the "Save" button to send tag configurations to the server.

(59)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

59

5. Monitor items via the Test Client

Highlight the items you want to monitor and and click the "Add current items to test client" button in the tool bar. The selected items will be added to the Test Client.

Fig.09

6. Start the Test Client

Click the "Start Test Client" button in the tool bar. The Test Client will go online and access the designated data.

In the "Value" column, you can see the actual values of the listed items. If you are connected to your S7-1200 PLC, the "Quality" of the item is listed as "Good".

Fig.10

(60)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

60

Accessible items

The following table shows all accessible items, including address examples.

Item

Address example

tags "VB0", "VX1.0", "VW2", "VD4" etc. markers "MB8", "MX9.2", "MW10", "MD12" etc. inputs "I0.0", "AI0" etc.

outputs "Q1.3", "AQ0" etc.

Table 03

Required version of PC Access

The required version of PC Access is V1.0.4.10 (SP4) or higher. Please download PC access V1.0.4.10 (SP4) .

(61)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

61

How can you establish a connection between an S7-1200 PLC and SIMATIC NET OPC ?

Description

Please find a detailed description on how to realize a connection between an S7-1200 PLC and SIMATIC NET OPC V8.0 in the attached pdf-document.

Click the link "S7-1200_OPC_SIMATIC_NET_e.pdf" and save the document to your computer.

S7-1200_OPC_SIMA TIC-NET_e.pdf

( 822 KB ) Keywords

(62)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

62

(folha em branco)

(63)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

63

How can you erase the IP address and set your S7-1200 PLC back to factory settings , using the SIMATIC MC memory card (2MB or 24MB) ?

Description

You can erase the IP address and set your S7-1200 PLC back to factory settings without using the STEP 7 Basic software and without knowing the exact IP address. To do so use any SIMATIC MC memory card.

Disabling the write protection

Check that the memory card is not write-protected. Slide the protection switch away from the "Lock" position.

Figure 01 Figure 02 Obtaining a blank SIMATIC MC memory card

There are two ways to obtain a blank SIMATIC MC memory card:  Use a new, blank SIMATIC MC memory card from SIEMENS.

 If you habe a SIMATIC MC memory card that is not blank, delete the "SIMATIC.S7S" folder and the "S7_JOB.S7S" file on the memory card, using an application such as Windows Explorer.

Deleting the IP address

In order to erase the IP address and set your S7-1200 PLC back to factory settings, you must 1. insert a blank memory card into the S7-1200 PLC.

2. power cycle the S7-1200 PLC.

Now the S7-1200 PLC reboots. After rebooting and evaluating the SIMATIC MC memory card, the internal load memory, this means the device configuration including the IP address, the user program and any force values, is copied to the memory card. The memory card turns into a program card, containing the data and IP address stored in the internal load memory before. After the copy has been completed, the internal load memory of the S7-1200 PLC is erased. The S7-1200 PLC then goes to the configured startup mode (RUN or STOP).

When the operation is complete, the S7-1200 PLC flashes the maintenance LED to indicate that the memory card can be removed.

3. Remove the memory card from the S7-1200 PLC. 4. Power cycle the S7-1200 PLC.

The internal load memory including the IP address is erased and the S7-1200 PLC is set back to factory settings.

(64)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

64

(folha em branco)

(65)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

65

How can you change the IP address of an S7-1200 PLC without STEP 7 Basic ?

Description

You can change the IP address of an S7-1200 PLC using the IP TOOL, which you can find attached to this entry.

This tool is useful when you load a master project to multiple S7-1200 PLCs, connected to the same network.

Requirements

 Operating sytem: Windows XP or Vista  S7-1200 PLC

 Ethernet cable

 PC / PG with Ethernet interface  IP TOOL V1.1.0.1

Use cases of the IP TOOL

The IP TOOL can change the IP address of an S7-1200 PLC in one of two ways. The proper method is automatically determined by the state of that IP address:

1. Assigning an initial IP address:

If the S7-1200 PLC has no IP address, the IP TOOL uses the primary setup function to allocate an initial IP address to the S7-1200 PLC.

2. Changing the IP address:

If an IP address already exists, the IP TOOL will modify the hardware configuration (HW config) of your S7-1200 PLC.

Restrictions

 After an IP address is assigned by the IP TOOL, you cannot change it again with the IP TOOL, until after you have downloaded the hardware configuration to your S7-1200 PLC using STEP 7 Basic.

 You cannot communicate with a PLC to which no IP address has been assigned.

 An IP address cannot be used more than once in a network; each PLC must have a unique IP address.

Note

In the IP TOOLs "Update accessible devices" list, PLCs with duplicate IP addresses are shown in red.Assigning an initial IP address to your S7-1200 PLC

No.

1. Update accessible devices

(66)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

66

Fig.01

2. Select an S7-1200 PLC

Double-click the S7-1200 PLC without an IP address. On the right side of the dialog, the available data of the S7-1200 PLC is displayed.

Identify your S7-1200 PLC on site by clicking the "Flash LED Lights" button.

Fig.02

3. Assign a new IP address

 Enter the initial IP address in the "IP address:" input field.  Write the subnet mask in the "Subnet Mask:" input field.  Click the "Set" button.

(67)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

67

Fig.03

Table 01

Changing the IP address of an S7-1200 PLC

No.

1. Update accessible devices

Double-click the item "Update accessible devices" to show all accessible devices.

Fig.04

2. Select an S7-1200 PLC

Double-click the S7-1200 PLC whose IP address you want to change. On the right side of hte dialog, the available data of the S7-1200 PLC is displayed.

(68)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

68

Identify your S7-1200 PLC on site by clicking the "Flash LED Lights" button.

Fig.05

3. Assign a new IP address

 Enter the new IP address in the "IP address:" input field..  Write the subnet mask in the "Subnet Mask:" input field.  Click the "Set" button.

On the left side of the dialog, the designated IP address is listed.

Fig.06 Table 02

IPToolInstall.zip

(69)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

69

How can you download to a network of several S7-1200 PLCs with the same IP address ?

Description

When you first download a PLC program of a STEP 7 Basic project to a network which contains several S7-1200 PLCs, a situation may occur in which more than one PLC shares the same IP address.

This means you will miss one or more PLCs. In this case, delete the IP addresses of all PLCs to be able to access them by their MAC addresses.

Figure 01 Deleting the IP address

Delete the IP address of an S7-1200 PLC using a SIMATIC MC memory card. Identifying PLCs by their MAC address

To address a PLC by its MAC address, enable the checkbox "Show all accessible devices" in the "Extended download to device" dialog box and select a MAC address from the list.

Downloading to the PLC

(70)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

70

Figure 02

Note

(71)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

71

How you reset the IP address of your S7-1200PLC using STEP 7 Basic software ?

Description

You can reset the IP address of your S7-1200 PLC using the function "Reset to factory settings" of the STEP 7 Basic software. Therefore you need online access to your S7-1200 PLC. This means the IP address of your S7-1200 PLC needs to be the same as the IP address in your STEP 7 Basic project. Otherwise you cannot go online.

Adjustingthe IP address

1. To figure out the IP address of your S7-1200 PLC, highlight your S7-1200 PLC in the project tree. Browse the menu bar for "Online > Extended download to device..." and check the "Show all accessible devices" check box. The IP address of your S7-1200 PLC is listed in the

"address" column.

Figure 01 2. Change the IP address of the S7-1200 PLC in your project. Browse the project tree for the

"Device configuration" of your S7-1200 PLC and click the Ethernet port in the work area. Open the "Ethernet addresses" properties and enter the IP address which you figured out in step 1.

(72)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

72

Figure 02

Resetting the IP address

1. Launch STEP 7 Basic, and open the project containing the S7-1200 PLC whose IP address you want to reset.

2. In the project tree, browse for the S7-1200 PLC and highlight it.

3. Click the toolbar command "Go online". The title bar changes to orange. You have online access to the S7-1200 PLC now.

Figure 03 4. Double-click item "Online & Diagnostics" in the PLC folder in the project tree. The "Online

(73)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

73

5. In the Navigation area, browse for "Functions > Reset to factory settings".

6. Select the radio button "Reset IP address" in the work area, and click the "Reset" button.

Figure 04 7. A "Reset to factory settings" dialog box opens. Click the "OK" button.

The IP address is erased. Note

Make sure that no SIMATIC MC memory card is inserted in your S7-1200 PLC while deleting the IP address.

(74)

Doc. técnico do blog “Um PLC sem WatchDog” (www.plcsemwatchdog.blogspot.com)

74

(folha em branco)

References

Related documents

We carried out a meta-analysis of lipid traits based on three genome-wide association studies including more than 4,700 individuals of Mexican ancestry (two samples from Mexico

The results indicate that, besides improving both LCTM and CBTM scores with respect to the original MOSA and Evosuite’s default search strategy (Whole Suite), our quality-based

Mirjana Matijević Sokol i Tomislav Galović, Zagreb: Katedra za pomoćne povijesne znanosti i metodiku nastave povijesti Odsjeka za povijest Filozofskog fakulteta Sveučilišta u

Surface plate and auxiliary Surface plate and auxiliary marking equipment, ‘v’ block, marking equipment, ‘v’ block, angle plates, parallel block, angle plates, parallel

After you have received earnings-related or basic unemployment allowance for 500 days, Kela may pay you labour market subsidy.. Labour market subsidies are not paid

Rehabilitative training – these are training courses funded by the HSE to develop life skills, social skills, and basic work skills for people with intellectual disabilities,

Function Code (0x04) – Read Holding Registers Function Code (0x06) – Write Single Register. Visit http://www.modbus.org for a free download of the Modbus RTU and Modbus

Table 33 Redundant data for monitoring by the Modbus master Modbus Function Code Modbus- Register Modbus Register Name Format Description/Remarks 6/16 44001 Force