Hannari Posted April 1, 2015 Report Share Posted April 1, 2015 I am trying to get CANopen communication going between my Unistream and a Motor controller (Mc) of type MDC1460 from Roboteq. I set the PLC to be node 1 and the Mc to be node 2. I set the Mc to send out a heartbeat every 1s. I then tried to send a NMT and SDO, but nothing happened. Then I tried setting up a Can sniffer to see if I was resaving the heartbeat. I saw in the sniffer that the identifier was 720. Meaning that the node was number 32 in decimal even though I had set it to #2 on the controller. But if I then power cycle the Mc and then it sent 702 after boot up. If I then reboot the PLC again it resaves 720 even though the Mc stayed on the whole time and no change was done to it. The weirdest part is that I’m not getting any control unless I set the Mc to be node number 32. I can send NMTs and SDOs, no problem, but as soon as I change the node id to 2 or any other number for that matter, except 32, I get nothing ??? Their suggestion at Roboteq, is that I should try setting the node id over RS232 instead of USB. I will try that tomorrow and see if it helps any. I am just not so sure any more. Is it me , is it the Mc or the PLC that is the problem or some combination? Could it be that the PLC is sending some object that makes the Mc behave in this manner? Is there something I´m not getting regarding the heartbeat or some other part of the CANopen protocol that could be causing this problem? O… and by the way I tried the same program on a load cell amplifier I had with no problems. I could set it to any node number and send it both NMTs and SDOs. Sorry for the long and tedious post, but does anyone have any suggestions that could possibly get me on the right track again or somewhere at least close? Quote Link to comment Share on other sites More sharing options...
Ofir Posted April 2, 2015 Report Share Posted April 2, 2015 Hi Hannari, According to your description it seems that the Node ID of the Mc device is somehow changes.. How do you set the Node ID of the Mc device? (Hardware dipswitches or by software) If you change the Node ID using SDO command , note that you need to save these setting using anohter SDO command. Usually the index for saving the settings is 0x1010 subindex 1. you will need to send the value 0x65766173 If this does not help please send us a mail to support@unitronics.com including the project file and the EDS and we will be happy to help! Quote Link to comment Share on other sites More sharing options...
Hannari Posted April 2, 2015 Author Report Share Posted April 2, 2015 Hi Ofir, I set the node id on a software via RS232 and save it to EEPROM on the Mc. I don’t think it is possible to change the Node id using SDO, I at least don’t know how that would be done. I will send you my code, the EDS file and a step-by-step description with snapshots of the CAN sniffer as I went through and trouble shot. Thanks again for your great support. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.