DOCA0272EN-00

Acyclic Data

For those function blocks that use acyclic communication with TeSys™ island, a reference to a hardware module containing the acyclic data is required for the function block. Usually, this reference is provided at the function block interface as an input of the type “HW_IO” called “i_hwSubmHWID”. When a device is created in the Siemens TIA Portal (for example, via import of an AML file), system constants with the values for the hardware ID are created automatically for all devices, modules, and sub-modules. These can be directly used to parametrize the access to the acyclic data of an avatar or a device. The names of these constants are usually created using the following pattern: <device name>~<module name>~<submodule name> (for example, “mytesysisland~AvPump02~Acyclic”).

For access to the Asset Management data of the devices of the TeSys™ island, these too are represented as modules in the TeSys™ island. The device modules are placed in the slots starting at slot number 101 for both PROFINET IO and PROFIBUS DP.

NOTE:
  • For PROFIBUS DP no sub-modules exist within a module. Therefore, all cyclic and acyclic data belong to the module itself instead of the individual sub-modules. This means that for PROFIBUS DP function blocks that involve cyclic as well as acyclic communication, the hardware ID can be directly derived from the input start address, and no additional hardware ID needs to be parametrized. However, for those function blocks that only use acyclic communication (mainly the Device Asset Management function blocks), the hardware ID of the module must be provided to the function block interface (interface variable “i_hwModuleHWID”).

  • The function blocks cannot detect whether there is a match between the module that the hardware ID provided at the function block interface references, and the type of avatar or device that the function block is made for. Therefore, it remains your responsibility to ensure that the correct hardware IDs are used with the appropriate function blocks. Neglecting to do so might result in unexpected behavior of the TeSys™ island.

The reading or writing of the acyclic data has to be triggered using a rising edge at the function block input “i_xExecute”. However, the acyclic reading or writing is only started if the function block is enabled (“i_xEnable”), no detected error has occurred, and the input variable “i_xAcyclicBusy” is “false”. Variable “i_xAcyclicBusy” can be used to interlock multiple instances of function blocks using acyclic communication (either from the TeSys™ island library for the TIA Portal or any other part of the PLC program using the functions RDREC or WRREC) to avoid detected errors due to the limited resources for acyclic communication of the Siemens PLCs. Each function block involving acyclic communication also provides an output “q_xAcyclicBusy” that is set to “true” while an acyclic read or write request is being executed by the function block and can be used to interlock with other function blocks.

NOTE: You are responsible for ensuring that sufficient resources are available for acyclic communication when starting an acyclic request with one of the function blocks in the library. For details on the limitations of the different PLC types, refer to the Third-Party documentation by Siemens.

If a detected error occurs during acyclic communication, the function block indicates this occurrence with a rising edge on the output “q_xError”, combined with an appropriate detected error code in “q_dwErrorID” from the data block ConstTeSysIsland. All outputs based on communication results are reset to their default values (the same reaction as for all other detected errors—see also Cyclic Data; for details on the values from ConstTeSysIsland, see Data Block ConstTeSysIsland). In addition to the detected error ID, the function block in some cases also provides a status code for the acyclic communication in the variable “q_dwAcyclicStatus”. The table below provides an overview of the acyclic status codes in use.

Acyclic status codes

Acyclic status code

Description

Cdw_StsNoMsg

No status details available (also see Data Block ConstTeSysIsland)

All others

TIA Portal specific status/error code of the used system function

  • RDREC/WRREC if “q_dwErrorID” is one of the following values from ConstTeSysIsland:

    • Cdw_ErrReadAcycData1

    • Cdw_ErrReadAcycData2

    • Cdw_ErrWriteAcycData

  • LOG2GEO (if “q_dwErrorID” is equal to Cdw_ErrInvalidHwid from ConstTeSysIsland)

For further information about the TIA specific detected error codes, see the Siemens TIA Portal information System and Third-Party Documentation.

If the function block finishes the acyclic communication successfully, “q_xAcyclicBusy” returns to false, “q_dwErrorID” shows the appropriate status code (see Data Block ConstTeSysIsland) and the data read from the island acyclically is copied to the output variables. The data remains present on the outputs until it is overwritten after a new acyclic request has been completed, the function block is disabled, or an error is detected and the output data is overwritten with default values.

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?