Device/Group-specific Parameters
- Last UpdatedJul 08, 2025
- 2 minute read
The MODNET driver can apply different initialization parameter values to specific I/O devices or groups of I/O devices. This means the user can specify:
Global parameters that apply to devices.
Channel-level (port-level) parameters that apply to devices on the specified port.
Group-level parameters that apply to devices in a specified group.
Device-level parameters that apply only to the specified device.
|
|
|
UNINTENDED EQUIPMENT OPERATION Do not change these protocol parameters, except on the advice of Technical Support for this product. Failure to follow these instructions can result in death, serious injury, or equipment damage. |
Note: Always seek the advice of Technical Support personnel for this product regarding undocumented features.
This feature can be implemented in the citect.ini for the following MODNET parameters:
-
MaxBits
-
InitVar
-
InitVarType
-
StringReverse
-
RegisterBitReverse
-
FloatMode
-
LongDataType
-
SendBCDSwap
-
ForceMultiCoilsOnly
-
PresetMultiRegistersOnly
-
Retry
-
Timeout
To set parameters for a particular port, group, or device, you need to create a new section in the citect.ini file. Label it with the driver name followed by a period (.) character and the name of the particular port, group, or device you want to specify the parameter setting for.
For example:
[MODNET.<Port_Name>]: applies the parameter settings to the specified port.
[MODNET.<Group_Name>]: applies the parameter settings to the specified group.
[MODNET.<Port_Name>.<IODevice_Name>]: applies to the specified device.
Any parameters you then define in the following section of the citect.ini file relate only to the specified device or device group.
Example
The following citect ini file format is an example of how the InitVarType parameter could be specified differently for different I/O devices communicating using the MODNET protocol.
Assume that two ports are used: PORT1 and PORT2. PORT1 has three I/O devices attached:
-
DEV1A
-
DEV1B
-
EV1C
PORT2 also has three devices:
-
DEV2A
-
DEV2B
-
DEV2C
Assume that the user has specified that DEV1C and DEV2C belong to GROUPZ. The citect.ini file contains the following entries:
[MODNET]
InitVarType=1
[MODNET.PORT1]
InitVarType=2
[MODNET.PORT2]
InitVarType=2
[MODNET.GROUPZ]
InitVarType=3
[MODNET.PORT1.DEV1A]
InitVarType=1
[MODNET.PORT2.DEV2B]
InitVarType=4
The resultant InitVarType for the I/O devices will be as follows:
|
DEV1A: |
1 |
as a result of [MODNET.PORT1.DEV1A] |
|
DEV1B: |
2 |
as a result of [MODNET.PORT1] |
|
DEV1C: |
3 |
as a result of [MODNET.GROUPZ] |
|
DEV2A: |
2 |
as a result of [MODNET.PORT2] |
|
DEV2B: |
4 |
as a result of [MODNET.PORT2.DEV2B] |
|
DEV2C: |
3 |
as a result of [MODNET.GROUPZ] |
As the above example shows, there is a hierarchy that determines the outcome of such settings. In simple terms, specific parameter settings overwrite general level settings. Therefore, parameters written in the scope of I/O devices will overwrite those set for groups; parameters set for groups will overwrite global settings, and so on.
