| Dettagli del download |
|
The communication is represented by a "shared" data area: Provided by one module and accessed by pointers from other modules. It is not possible that two different data pointers are linked to the same entry in an output or input data area due to synchronization issues, which would occur without this limitation. Therefore a module ModuleDataProvider collects input and output into a standard data area, which does not have this restriction. Overall this sample contains the following modules:
The user of the sample triggers the ModuleDataInOut by setting the variables ValueIn / Bit1 / Bit2:
All modules are configured to have the same task context, which is necessary because access through data pointers does not provide any synchronization mechanism. The order of execution is determined by the sort order specified on the context configuration tab. This value is passed as parameter "SortOrder" and it’s stored in cyclic caller smart pointer (m_spCyclicCaller), which also holds the object id of the cyclic caller. The module ModuleDataInOut has input and output variables. These are linked to the corresponding variables of the data provider. The module ModuleDataProvider provides an input and an output data area and implements the ITcIoCylic interface. The method InputUpdate copies data from the input variables to DataIn symbol of the standard data area "Data" and method OutputUpdate copies data from the DataOut symbol to the output variables. The modules ModuleDataAccessA and ModuleDataAccessB have pointers to data areas of the data provider by links. These pointers are initialized during the transition from SAFEOP to OP. ModuleDataAccessA cyclically sets the BitOut1 as indicated by Bit1. ModuleDataAccessB respectivelywith BitOut2 / Bit2. Both increment ValueOut by multiplying the internal counter with the ValueIn value. |
|
|||||||||||||||||||||||||||||||||

Gli esempi presenti su questo sito sono stati liberamente inviati dagli utenti di automationforum.it, è stato espressamente specificato loro di inviare solo esempi FREE. Automationforum.it non si ritiene responsabile dell'eventuale presenza di esempi rilasciati sotto licenza commerciale, Automationforum.it invita tutti coloro che individuano esempi rilasciati sotto licenza commerciale presenti in questa raccolta a segnalarlo dall'apposito