As the Mdp.xml file needs to be re-generated in Pre-operational network state if the detected Nodes are different from the <Topology> section defined in Mdp.xml:
May I know if re-generating the Mdp.xml file is possible using RapidCode API or using rsiconfig? (Something similar like the dialog option in RapidSetup to replace the saved topology with the current active one)
This is to implement a safety clause in the event that the node topology may be swapped or to provide a standardized way to re-generate the existing Mdp.xml file in our application without using RapidSetup.
Your feedback and clarification on this is much appreciated. Thank you!
As of version 10.7.1, rsiConfg will update the Mdp.xml to the active Mdp Topology if the network is running (Op or PreOp) at the time you generate a new ENI file. You can also use MotionController::NetworkEniGenerate() which ultimately calls rsiConfig for ENI generation.
Much appreciated on the clarification for Mdp.xml regeneration in RapidCode.
Out of curiosity, I would like to take this opportunity to understand how the ENI file node count is compared with the current EtherCAT network node count:
As I understand that the ENI file node count is retrieved using RapidENI.CountENISlaveNodes() as shown in the tooltip when hovering over the ENI node count in RapidSetup
However, I couldn’t find this in the API (As RapidENI has deprecated already and is compressed into rsiconfig & RapidSetup) so may I know how do I retrieve the value for ENI file node count? (is it through rsiconfig commands?)
As for network topology with same node count with ENI file but different order, I understand that the network cannot be started if the network topology order is incorrect:
Except for a failed network start, may I know if there are any other methods in the API or rsiconfig that can be utilized to know that the order for network topology is incorrect for the ENI file?
Thank you for your clarification and feedback. I truly appreciate your support and guidance in helping me further my understanding for RapidCode.
MotionController::NetworkNodeCountGet() will get the node count after Discover or Network start. Any attempt to start a network with the right number but wrong type or order of nodes should fail due the InitCmds in the ENI file. You should see an error in the NetworkLog about a mismatch. Here is an example where It expected 1 type (0x111713) but found another (0x2) instead.
00:00:26.603 EtherCAT EcSlave.cpp:596 ‘Node # (Node Name)’ (1001): ‘INIT to PREOP’ failed! Error: ‘check vendor id’. Value ‘0x00000002’ read and ‘0x00111713’ expected.
It tells you which node was the problem and both expectation and realization.
This function is great for checking the ActiveNodeCount. If you have a cable break for failed node, it will tell you where to look. If you are expecting 20, but only see 12. You know the problem is likely with Node 13 or the out cable from 12.