×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 109765658, Entry date: 03/19/2019
(1)
Rate

SENTRON Communication - TIA Portal, Flexible Access (FA) for Profibus (DP) and Profinet (PN)

  • Entry
  • Associated product(s)

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


1.   Overview



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 (f. e. part of basic types), regular access vie DP/PN is recommended.

Available for: Step7 5.6, TIA Portal V14 SP1, V15 and V15.1.

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 3200, 4200 and 3VA + COM100/800.

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


2.   Function Block FA_Read

This FB coordinates reading values regarding the configured input parameters.



- Init:                 Initialization of block on PLC startup.
- HW_ID:          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 schedular 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 successfull 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.   Function Block FA_Write


This FB coordinates writing values regarding the configured input parameters.



Parameter:


- 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.   Example measuring 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




[...]




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 completed or skipped.
SC:                        Common variable within a sequence. Contains the current ID.

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.


5.   Example circuit breaker 3VA

5.1.  Addressing

Addr:              262                  = Hardware Identifier from 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




[...]


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.

  SENTRON_Communication_TIA_Flexible_Access_Readme_2019.04.30EN.pdf (686,4 KB)

 Registrierung notwendig  SENTRON_Communication_FlexibleAccess_Demoproject_V3.0_2019.04.30.zip (8,5 MB)

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.