Consistent data transmission of position values above task limits

Question:

When angle information for synchro systems are transmitted above task limits incorrect values (data inconsistency) may occur. How can they be avoided?

Answer:

Two different procedures are possible:

1. Semaphores (Übertragungsmerker), see article 20010105 (Data consistency when using 32-bit variables in several tasks). This procedure causes sudden changes for quickly changing position values and is therefore not suitable for synchro systems.
2. Function blocks for the 32-bit transfer (system requirement: operation system 6.2 or higher and DDS  as of V2.0): These function blocks are suitable for quickly changing position values.
Function blocks for consistent data transmission of 32-bit values can be obtained from the function block library (Lenze32BitTransverDrv.lib) for the Servo PLC as of operating system 6.2. This library is installed automatically as of DDS V2.0 and can only be used as from this version. It is distinguished between between a function block for data of type DINT or DWORD. Format DINT is necessary for the transmission of position values. The suitable function block is: L_32BitTransferDINT.

The aim is to copy a global DINT variable to a local one and to avoid a copy interrupt. This variable can then be used without risking data inconsistency in the corresponding task. The variables pdnSource and pdnDestination are defined as pointer variables and must be addressed via ADR blocks. As an example, the X-axis position of a cam application is selected (g_dnVertShaftCamDataIn_p), which is to be copied to the task with the lower priority (dnVertShaftCamDataIn_p). The function is called in the task with lower priority.

URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/20031727/1/
Contact form