Hi jds,
Found out that there is no documentation about redundancy so I’ll give you a short description.
The node currently handling the I/O and executing the plc is called the active node, and the other node, patiently waiting to take over is called the passive node. The idea is that the active node should send all information in the database so that the passive node can take over within one plc scan. In order to do this, the plc threads are actually themselves packing the contents of the objects they are handling into one packet that is send by the active node every scan. The plc thread in the passive node is receiving the packet and moving all the data into the objects in the database. But in passive state, it is not handling the I/O and it’s not executing the plc code. It’s just receiving and unpacking the packets. Thus is you examine the active and passive node with xtt the values in the database should be identical. When a switch over is made, the passive node already has all data available in the database and can start handling the I/O and executing the plc code immediately.
So each plc thread is sending it’s own packet with the data of the objects it is handling, and the packets are sent with the same frequency as the plc thread, so you have to make sure that the plc scan time is adapted to the speed of the network. There is also a priority that can be set on the packets, so that small packets from threads with fast scan time will interrupt larger packets from threads with slow scan time. You configure a packet with a RedcomPacket object and this should be placed under the PlcThread object. In Hierarchy you specify the hierarchies that is handled by this thread, and all the objects in theses hierarchies is included in the packet. There is a Transmit and Receive count that you can examine in runtime to see that the packets are transported with the expected frequency.
The packets are sent with the redundancy communication server, rt_redcom. This is configured with a RedcomConfig object in the node hierarchy. In runtime there is an object graph for this object where you can see if a node is active or passive, and you can also switch state manually. There is also a link section where you can examine the link to the other node (only the first link element is used).
The two redundancy nodes are configured in the same NodeConfig object. The primary node is configured in the ordinary way, and the secondary node under SecondaryNode where the IP address and node name is stated. When this is configured, both nodes will appear in the ’build node’ list and both have to be built. Also in the distributor both nodes will be present and it’s possible to create packages and distribute to both nodes. Note that SecondaryNode in the NodeConfig object is of type RedundancyNodeConfig and this class should not be used anywhere else.
/Claes