Configuration of the Publisher
In the TwinCAT System Manager, a new box is added for the Publisher under the RT Ethernet device.
Insert a Publisher Box
A Publisher box must be added under the RT Ethernet device.
Fig.111: Insertion of a Publisher Box in the TwinCAT configurationInsert a Network Variable
The network variables are inserted underneath the box. Enter a name (nCounterPub in the sample) and a data type (UINT32 in the sample, corresponding to UDINT).
Fig.112: Adding a network variableInputs and outputs are created underneath the added variables.
Fig.113: Inputs/Outputs of the inserted variablesThe FrameState input under the box indicates the current status of the sent Ethernet frames.
The following values are possible for the FrameState:
|
Short description |
Value |
Description |
|---|---|---|
|
Not sent (frame skipped) |
0x0001 |
|
|
Error (frame oversized) |
0x0001 |
The maximum size of an Ethernet frames was exceeded. The linked variable should be smaller. |
A Control Word can be written in the FrameCtrl output under the box.
The following values are possible for FrameCtrl:
|
Short description |
Value |
Description |
|---|---|---|
|
Disable sending |
0x0001 |
Sending of a frame is interrupted. Sending of the frame does not restart until the value is 0 again. |
The VarState input under the network variable indicates the current status of the network variable.
The following values are possible for VarState:
|
Short description |
Value |
Description |
|---|---|---|
|
Not sent (variable skipped) |
0x0001 |
|
A Control Word can be written in the VarCtrl output under the network variable.
The following values are possible for FrameCtrl:
|
Short description |
Value |
Description |
|---|---|---|
|
Disable publishing |
0x0001 |
Sending of the network variable is interrupted. Sending of the network variable does not restart until the value is 0 again. |
Mappings
The network variable of the Publisher can be mapped to any output variable with a suitable data type. In the sample, the network variable is linked to the output variable of a PLC.
Fig.114: Mapping of the network variable with an output variable of the PLC