PLCNEXT#Using SPLC1000 to Build a Profisafe Connection with Siemens F-Host

This is the third episode of using the Phoenix Contact SPLC1000. This time, Siemens S71212FC is set up as F-HOST and SPLC1000 is used as F-Devices for Profisafe communication.The SPLC1000 provides 4-Word safety input/output data.

Let’s get started!

Reference Link

PLCNEXT#Let’s Use SPLC1000_ Part1
PLCNEXT#Let’s use SPLC1000_ Part2

Trips About Safety Program

Influence of the safety program’s cycle time

If the cycle time of the safety program is long, the response time of the safety function will be slow and the processing time of the standard user program will be long. But if the cycle time of the safety program is short, the response time of the safety function will be faster, but conversely, the time available for processing the standard user program will be shorter.

As shown in the figure below, yellow is the cycle time of the safety program and gray is the standard user program. As explained earlier, in Case 1, the F-Cycle is 10 ms, so the standard user program takes less processing time. Conversely, in Case 3, the F-Cycle is 30 ms, so the processing time of the standard user program is longer.

And note that the safety program can be interrupted by entering a higher priority organization block (e.g., cyclic interrupt OB or motion control OB) or by interrupting the safety program as shown in the figure. Be careful not to interrupt the safety program.

PROFIsafe address types

The Profisafe Address uniquely addresses the F-I/O, think of it as a number like an IP address. There are two types of Profisafe Address: Type 1 and Type 2.

The PROFIsafe Address must be unique. As plant sections are networked, individual Profisafe Addresses must be planned precisely.

Type1

  • The uniqueness of the PROFIsafe Address is only guaranteed by the F-destination Address.
  • The F-destination Address must be unique across the network and CPUs.
  • The Safety Summary must ensure that the F-destination ranges of all F-CPUs do not overlap.
  • The F-destination address and Fsource address are included in the CRC of the safety program.

Type2

  • The uniqueness of a PROFIsafe Address is guaranteed by combining the Fsource Address and the F-destination Address.
  • The F-destination Address must be unique across CPUs and must be different from all other F-destination Addresses of PROFIsafe Address Type 1 in the same network.
  • F-destinations used for F-CPUs and F-I/Os must be unique across the network.
  • The F-destination address and Fsource address are included in the CRC of the safety program.

F-change history(Siemens TIA Only)

The F-change History functions like a standard user program change history, with one F-change history per F-CPU created from Common data>Logs in the project tree.

The F-change history function records the following information

  • F-collective signature
  • User name
  • Compile time stamp
  • Safety Program’s TimeStamp
  • Compiled F-blocks with signature and time stamp

By using this function,

  • You can verify that the last change has been DOWNLOADED by comparing the online and offline status of the CRC.
  • In a multi-user project, you can track which users have modified or downloaded the safety program.
  • Contrast online/offline status when CPU and PG/PC are not connected online

Call sequence of the blocks

The following is the order in which Blocks are called when creating a Safety program. The following instructions are only recommendations, and we can assure you that the CPU always uses the latest values.

Sequence 1.RCVDP

Receive data between F-CPU.

Sequence 2.ACK_GL

Controls error checking and reintegration of F-modules/F-channels.

Sequence 3.Sensor

Organize input data.

Sequence 4.OperationMode

Evaluate the mode of operation of the device.

Sequence 5.Logic

Control programs and calculations for the equipment.

Sequence 6.Actuators

Control safety output.

Sequence 7.SENDDP

Send data to other F-CPUs.

Jumps in the safety program

In a standard user program, the Jump function from one Network to another (and the Jump function to a label) and the Return function from a block are recalculated in each Block cycle, even in a simple program branch, and still there is no protection from the CPU.

No check is made to see if the jump is executed despite the “false” condition, e.g. due to a memory error caused by EMC.

However, the Safety Program prohibits this kind of programming style: it must always guarantee that the Safety Program is running with the correct root.

For this reason, the Safety Program must calculate the complete True/False results of logical calculations.

The greater the number of jumps used in a safety program, the greater the impact on controller performance.

Download GSD File

Download the GSDML File for AXCF3152 from the link below.

https://www.phoenixcontact.com/en-pc/products/extension-module-axc-f-xt-splc-1000-1159811

Implementation

Siemens Side

Enable Safety Function

To enable the safety features of the S71200F, open your PLC>Device Configuration.

Go to General>Fail-safe and put in the F-activation checkbox to enable the safety feature.

Once the CPU safety features are enabled, F-parameters can be set.

Install GSD File

To install the GSD File for Phoenxic Contact PLCNEXT, click Options>Manage general station description files (GSD).

The GSD File management screen is now displayed.

Click the … button.

Select the GSDML File that was just downloaded from PhoenixContact HP.

Done!

Click the Install button to install the GSDML File.

Done!

TIA will update the GSDML library.

Check the GSDML

Now let’s check if the GSDML File has been imported.

Click on Project>Devices & Networks.

You should see AXCF 3152 from the Hardware catalog.

Add Device

Add AXCF 3152 from Catalog to your Network.

Done!AXCF 3152 has been added.

Assign Profinet 

To connect AXCF 3152 to CPU 1212FC used in this tutorial, click Not assigned and select Profinet Interface.

Done!

Configure IP

Next, to set the IP address of AXC-F-3152, click on eye ICON from Network View.

The IP of each device on the Network is displayed.

You can click directly on the IP to change the settings.

Done!This IP address should match the PLCNEXT AXCF 3152 on the actual device.

Configure Slots

The next step is to set up each Slot for AXCF 3152.

Insert the FDEV from Options to exchange SPLC1000 safety data with Profisafe.

Done!4 Word safety input/output data has been added.

In fact, you can also check the corresponding Slot information from the FDEV Description.

IQ Address

Change the IO address number in the I address and Q Address Field.

In this case, we will use 600.

Once the FEDV Slot is added, a Fail-Safe symbol is added to the AXC-F-3152’s ICON, i.e., the AXC-F-3152 indicates that it has Profisafe communication.

Device Name

Profinet communication requires the correct setting of Devie Name, click Accessible Devices from TIA.

Select PN/IE for Type of the PG/PC interface, set PG/PC Interface to the network card of the PC connected to the same network, and press “Start Search” to search for devices.

Done!AXCF 3152 was found. axcf3152-pnd-lan3 appears in the Field of Device, and this string is the device name of AXCF 3152.

To be sure, let’s also check it from PLCNEXT Engineering.

Open the PLC Object in the Project Tree.

You can see the current AXCF 3152 device name under Name of station.

Enter this device name in the TIA project under AXCF 3152>PROFINET Interface>Ethernet address>PROFINET.

First, remove the “Generate PROFINET device name automatically” checkbox.

The PROFINET device name field becomes available for input.

Enter the device name you just confirmed.

Tags

Once the Configuration is complete, it is time to create the Tags.

Create a PLC tags>Tag Table.

Let’s define inputs and outputs according to the IO address defined earlier in FDEV.

Program

Finally, open Program blocks>Main_Safety_RTG1 to create a Safety program for verification.

This is the verification program on Siemens’ side this time.

Network1

Add QW600 in cycles to confirm that Profisafe communication is established.

Network2

The values received from the input data IW602 of the PLCNEXT AXCF 3152 are fed back to the QW602 as they are.

Network3

The values received from the input data IW604 of the PLCNEXT AXCF 3152 are fed back to the QW604 as they are.

Network4

The values received from the input data IW606 of the PLCNEXT AXCF 3152 are fed back to the QW606 as they are.

Network5

If the AXCF 3152 needs to be reset, it will perform an automatic reset.

Download

Finally, click “Download to device” from TIA to download the project to S71212FC.

Proceed with Load.

Done!Put the CPU in Run Mode with Start Module.

PLCNEXT Side

After the Siemens side has been prepared, it is time to build the PLCNEXT side.

F-Devices Data

You have the 4 Word safety input and output data from TIA just now. Where is it actually located in the PLCNEXT project? To find it,please click on the Safety PLC item.

If you open a tab in the Data List, you will find the FDEV_IN0… tags, which is the safe data area exchanged when SPLC1000 communicates with F-Host as F-devices.

Safety Program

Next, open S_Main to create a Safety program for verification.

This is the verification program on the PLCNEXT side.

SAFEWORD_TO_SAFEBYTES

This Safety Function Block allows you to convert a SAFEWORD variable into two SAFETBYES.

Network2

This one writes fixed values to safety output data Byte2/Byte3.

Network3

This one writes fixed values to safety output data Byte4/Byte5.

Network4

こちらは固定値を安全出力データByte6/Byte7に書き込みます。

Result

When the project is downloaded to AXCF 3152 and S71200 is set to Run Mode, the P/C LED of SPLC1000 also turns green.

The F Device AXCF 3152 was also recognized by TIA.

Safety data sent from AXCF 3152 was received by S71200.

And we were also able to receive Data Feedback and Counter sent from the Siemens side.

Download

You can download the AXCF 3152 project and the Siemens TIA project at once from this Link.

https://github.com/soup01Threes/PLCNEXT/blob/main/SPLC1000_Project2_ConnectWithS71200.rar

Footer_Basic

Please Support some devices for my blog

Amazon Gift List

Find ME

Twitter:@3threes2
Email:soup01threes*gmail.com (* to @)
YoutubeChannel:https://www.youtube.com/channel/UCQ3CHGAIXZAbeOC_9mjQiWQ

シェアする

  • このエントリーをはてなブックマークに追加

フォローする