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.
Insert a Network Variable
Network variables can then be added under the box. Enter a name (nCounterPub in the example) and a data type (UINT32 in the example, corresponding to UDINT).
Inputs and outputs were created under the added variable.
The 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 example, the network variable is linked to the output variable of a PLC.