Application example: flying saw – Lenze PLC Designer ApplicationTemplate (PLC Designer R3-x) User Manual
Page 161
Lenze · ApplicationTemplate · 1.3 EN - 04/2013
161
Application example: Flying saw
Setting up communication between master modules and slave modules
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
13.4
Setting up communication between master modules and slave modules
Every machine module has a data container, the ACD structure MACD_sc
• The ACD structure can be used to exchange data with a higher-level machine module.
• The higher-level master module accesses the ACD structure via POINTER and REFERENCE.
The section below shows how a data exchange between a master module and a slave module
works.
How to proceed:
1. Double-click and open:
•
A70_MachineModuleSources\MM_A01_MachineControl\ ModApp1
• Module application
MAP_A01_MachineControl_App1
2. In the declaration part, a pointer and a reference to the ACD structure of the slave must be
declared which is slave to the MachineControl machine control module:
This step must be executed for all direct slave modules of the MM_A01_MachineControl
master module.
In this example, pointers and references to the Infeed, FlyingSaw and Outfeed modules
must be declared.
3. In all slave modules, access must be provided to the ACD structure.
• In the program part of the module application of the corresponding slave module, the
AccessACD() method must be called for accessing the ACD structure.
• The relative address of the machine module whose ACD structure is to be accessed must
be transferred to the MM_Address input. The relative addresses of the machine modules
can be seen in the machine structure tree:
Folder A10_MachineModuleTree\
MMT (PRG).