Was this code module helpful to you?
6 members have voted
Notice: This is an example program, instead of an importable module. The way CanOpen is confgured in Unitronics makes an importable module for this impractical.
The program is an example of communication with a Wago 750-307 IO node. The node I used to develop it has 16 digital inputs and 10 relay outputs. Refer to the documentation of the node to see how to set the Unit ID for the node, the program looks for node 1.
I designed the NMT section of the program to mainly to handle automatic launch from Pre-Operational to Operational mode at power-up, and to recover if the node is disconnected. Error messages are checked against the error register to see if they are legit, and an alarm bit in the PLC is set if this is the case. Otherwise they are ignored. PDOs are not processed until the node is seen as operational in response to the Node Guard request.
The 307 uses Node Guarding, and the scheme is designed around this. I noticed a change between Unitronics' processing of Node Guard signals (Toggle Bit no longer toggles, Received bit is triggered) in the latest OS, vs the previous one. It's actually an improvement, but I don't know if they will go back to the old method. It works with OS 3.3.3 on the 570.
I hope you find it useful. If anybody can think of a good way to make it importable, please share!