You are on page 1of 9

SENTRON Communication – TIA Portal

Flexible Access (FA) for Profibus (DP) and Profinet (PN)

This application is released as an example only and there is no warranty for any issue.

Index of Content
1. Overview ............................................................................................................................. 2
2. Function Block FA_Read .................................................................................................... 3
3. Function Block FA_Write..................................................................................................... 4
4. Example measuring device PAC 3200 / 4200 ..................................................................... 5
5. Example circuit breaker 3VA ............................................................................................... 8

1/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

1. Overview

Profinet

Profibus

Flexible Access (FA) via Profibus and Profinet is a special method for the SENTRON
measuring devices and circuit breakers to be able to address and read all measured values
and parameters that can be read via Modbus via a DP/PN connection.

Focus is the accessibility to measured values, which are not available in the regular basic
types or datasets via DP/PN standard access.

If the desired measurement values are available via DP/PN standard functions (for example,
part of basic types), regular access via DP/PN is recommended.

Available for: Step7 5.6, TIA Portal ≥ V14 SP1.

Supported PLC’s:

S7-300, S7-1200 (FW ≥ 4.2) and S7-1500 (FW ≥ 2.1)

Supported SENTRON devices:

All devices with equipped “Profinet / Switched Ethernet” or “Profibus DPV1“ Module. PAC
32x0, 42x0 and 3VA + COM100/800.

For all devices and expansion modules, the use of a current firmware is recommended:

https://support.industry.siemens.com/cs/ww/en/ps/21501/dl

https://support.industry.siemens.com/cs/ww/en/ps/19479/dl

2/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

2. Function Block FA_Read

This FB coordinates reading values regarding the configured input parameters.

- Init: Initialization of block on PLC startup.


- Addr: Hardware Identifier of PN device.
- Device_ID: Defines device. 0: PAC. 1-8: 3VA ID. 255: COM100/800
- Offset: Similar to Modbus Register start address.
- Length: Similar to Modbus Register length (WORD’s).
- SC*: All blocks include a scheduler which controls the communication
sequence. Central element for this is the value „SC“ which must be connected to all
blocks of a line. Each block requires a unique ID by „SC_ID“. If block is processed
successfully, the block with defined ID at “SC_ID_Next” will be processed. If
„SC_ID_Skip“ is true, the complete block will be skipped and directly jump to next ID.
- DATA_PTR: Data area for received data (Max. 120 WORD).

- Done: TRUE for one cycle after successful writing.


- Error: TRUE for one cycle after error.
- Status: 0: None; 20: Busy; 1000: Done; 20020: Error. Check Register Length;
20030: Error. Check Register Offset; 20040: Error. Check Device ID;
20200: Error WRREC, 20300: Error RDREC

Remark:
An FB can be called multiple times within a sequence and always use the same instance
DB. It should be noted that all inputs must be completely re-assigned each time they are
called. Otherwise, values of the previous call are retained at the inputs and unwanted states
of the inputs can occur.

3/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

3. Function Block FA_Write

This FB coordinates writing values regarding the configured input parameters.

- DATA_PTR: Data area for data to be written (max. 118 WORD).


- All other parameters are identical in meaning to the FA_Read block.

4/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

4. Example measuring device PAC 3200 / 4200

4.1. Addressing

Addr: 272 = Hardware Identifier from DP/PN device.


Device_ID: 0 = PAC device.
Offset: 1 = Start reading from Register Offset Address 1.
Length: 74 = Read length of 74 Registers (WORD).
DATA_PTR: STRUCT = Data area for storing the read data. Identical construction to
the queried register structure.

Addressing is done according to the register list in the device manual:


https://support.industry.siemens.com/cs/ww/en/ps/21501/man

[…]

5/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

4.2. Sequence control SC_ID 0

Input variables for a sequence control. This can be used to coordinate several queries
as a sequence and are processed consecutively in series.

SC_ID_Skip: FALSE = Call is processed (TRUE = call is not processed and


jumped directly to the call with the ID "SC_ID_Next").
SC_ID: 0 = ID of this call.
SC_ID_Next: 1 = ID which will be processed next when this call is
completed or skipped.
SC: Common variable within a sequence. Contains the current ID.

6/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

4.3. Sequence control SC_ID 1

Call with ID 1. This is processed after the previous call has been completed. With
"SC_ID_Next" = 0, the user jumps to the first call and the sequence starts again.

7/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

5. Example circuit breaker 3VA

5.1. Addressing

Addr: 262 = Hardware Identifier of DP/PN device.


Device_ID: 1 = 1 to 8 corresponds to the switch ID in COM100 / 800.
Offset: 1 = Start reading from Register Offset Address 1.
Length: 110 = Read length of 110 Registers (WORD).
DATA_PTR: STRUCT = Data area for storing the read data. Identical construction to
the queried register structure.

Addressing is done according to the register list in the device manual:


https://support.industry.siemens.com/cs/ww/en/view/98746267
https://support.industry.siemens.com/cs/ww/en/view/90318775

Offset and Length must be specified as a decimal number starting from 1. The
information in HEX should therefore be converted to DEC as follows:

Current L1: 0x0002 (HEX) --> 2 (DEC) - 1 = 1

[…]

8/9
30.04.2019
SENTRON Communication – TIA Portal
Flexible Access (FA) for Profibus (DP) and Profinet (PN)

5.2. Sequence control

Call with ID 1. This is processed after the previous call has been completed. With
"SC_ID_Next" = 0, the user jumps to the first call and the sequence starts again.

9/9
30.04.2019

You might also like