Appendix | Appendix C: Network variables IF NOT fbWRI.BUSY ANDNOT fbWRI.ERR THEN state := 0; ELSIF fbWRI.ERR THEN state := 100; END_IF 100: ; (* Error *) END_CASE Client: PROGRAM Client VAR uReceive : UDINT; END_VAR On the client-side creation of a UDINT variable is sufficient. To use the source code for a test you must adapt the NetIDs to your system. 12.3 Appendix C: Network variables | Appendix C: Network variables Network variable are variables which can be exchanged cyclic between PC/CX1000. Any elementary or complex datatypes can be exchanged. A Publisher/Subscriber model is used. For deterministic communication the Realtime-Ethernet Driver for TwinCAT has to be installed.
Publisher/Subscriber Model With the Publisher/Subscriber model one publisher makes variable available in the network. Any PC/CX1000 can 'subscribe' to one of these variables. The publisher can allow access for one PC/CX1000, a set of PC/ CX1000 or all PC/CX1000 in the network. With a Broadcast the variable can be accessed from all PC/ CX1000, a Multicast allows access to a set of selected PC/CX1000 and a Unicast allows access only to one PC/CX1000. A Subscriber can also be a Publisher. With this a bidirectional connection is possible. TwinCAT 2 424 Version: 1.7