Structure CCModule¶
This structure provides information on the module, which e.g. can be accessd via function CfgCCGetRootModule.
The components:
Variable | Data Type | Description |
---|---|---|
ucEntryTag | BYTE | ‘M’ = Module |
ucDummy1 | BYTE | |
ucDummy3 | ||
ulModuleId | Id of the module given in the configuration file *.cfg | |
sModuleNumber | Number of the module in the parent module (-1 if root) | |
usModuleTag | Describes the kind of the module ( 0=3S-Module, 1=DP-Master, 2=DP-Slave, 3=CAN-Master, 4=CAN-Slave, 5=DP-SingleSlave) | |
byDeviceDriver | BYTE | The module needs a device driver (0=FALSE, 1=TRUE) |
ucDummy4 | BYTE | |
ucDummy5 | BYTE | |
ucDummy6 | BYTE | |
ulNodeId | UDINT | NodeId of the module |
byDefinedWithStruct: | BYTE | The module was defined with a structure (0=FALSE, 1=TRUE) |
ucDummy7 | BYTE | |
ucDummy8 | BYTE | |
ucDummy9 | BYTE | |
ulBitOffsetInput | UDINT | Offset of the modules input area |
ulBitSizeInput | UDINT | Size of the modules input area in bit |
ulBitOffsetOutput | UDINT | Offset of the modules output area |
ulBitSizeOutput | UDINT | Size of the modules output area in bit |
ulRefIdCommonDiag | UDINT | RefId of the modules common diagnosis area |
ulBitOffsetCommonDiag | Offset of the modules common diagnosis area | |
ulBitSizeDiag | UDINT | Size of the modules diagnosis area in bit |
usParameterCount | UINT | Number of parameters |
usDummy | UINT | |
ppccpModuleParams | POINTER TO POINTER TO ccParam | <ccParam [0..usParameterCount]> a pointer to an array of pointers to CCModuleParam-structures. (Definition of structure CCParam see below). Dereferencing the pointer with ppccpModuleParams^ gives you the pointer to the first parameter structure. (ppccpModuleParams+4)^ gives you the pointer to the next parameter structure. See also comment (*Read pointer to parameters *) in example project. |
ulSizeOfSpecificData | UDINT | Size in bytes of the module specific data |
pModuleData | POINTER TO BYTE | <MODULE_SPECIFIC_DATA> Here the data, according to usModuleTag is located: pModuleData is possible to be a pointer to PBSlave, CANSlave, PBMaster, PBSlave, PBSingleSlave, see definitions below. |
usChannelCount: | UINT | Number of configured channels |
usModuleCount | UINT | Number of configured modules |
In the following the Channels and Modules of this Module in the configured order are located! (DP-Slaves are ordered by the stationnumber!) This means, it is possible that another CCModule structure is inserted here. | ||
ppcccChannels | POINTER TO POINTER TO ccChannel; | <ccChannel [0..usChannelCount]> Definition of structure CCChannel see below * Dereferencing the pointer with ppccpChannels^ gives you the pointer to the first parameter structure. (ppccpChannels+4)^ gives you the pointer to the next parameter structure. See also comment “(*Read pointer to parameters *)” in example project. |
ppccmSubModules | POINTER TO POINTER TO BYTE | <ccModule [0..usModuleCount]> Points to an array of variables of type POINTER TO ccModule. To view the contents, you have to assign the value to a variable of type “POINTER TO CCModule”. Definition of structure CCModule see below. Dereferencing the pointer with ppccpSubModules^ gives you the pointer to the first parameter structure. (ppccpSubModules+4)^ gives you the pointer to the next parameter structure. See also comment “(*Read pointer to parameters *)” in example project. |