Solutions for the consistent data exchange in the multi tasking system

Question:
How can data be exchanged consistently between tasks?

Answer:
  • By semaphores: By means of an additional global Boolean variable the access to the actual variable is controlled from different tasks. Further information can be found in article 200412064 (Data inconsistency of global 32-bit variables).
  • By activating Data consistency for multitasking: The development environment Global Drive PLC Developer Studio (DDS) V2.2 has been extended by Data consistency for multitasking in the dialog  Target Settings (tab Resources). If it is activated, the access to all 32-Bit-variables is protected against task interruptions. Further information can be found in article 200403230 (Data consistency for multi-tasking).
  • By using the library Lenze32BitTransferDrv.lib: In the function library Lenze32BitTransferDrv.lib there are two functions enabling data consistent copying of 32-Bit-variables, even in case of a task interruption. Further information can be found in 20034029 (32 bit data consistency through library function).

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