PLC to MDC1230 over CANopen Problem

5 years 6 months ago #29530404 by Hannari
I got my MDC1230 controllers last week. I have been trying all weekend to get a CANopen communication going between my PLC (Unitronics Unioigic) and the controllers’ with no luck. I have disabled the rs232 watchdog, Can mode is Canopen, bitrate 125K on both ends, the plc is node 1 and the controllers 2 and 3, heartbeat I have tried both 1000ms and 0, and have tried both having Canopen auto-start enabled and disabled. I unplug the USB and restart the controller after having it in USB mode.

I am using a dedicated Canopen cable and two 120-Ohm resistors in each end. The cable has two pairs a plus, minus and Can-L, Can-H and a shield. The PLC has a spot for both pear and the GND. On the controller, I connect the Can-L to pin 6 and Can-H to pin 7. I have tried both having the shield connected to GND pin 5 and the minus. How am I supposed to connect it on the controller side?

It is as if I am not getting anything back from the controller or I could be doing something wrong on the PLC side. I am reading the NMT status but I do not see any change, it always seems to be in Initialization mode. I try sending it a NMT command to go to Preoperational mode and operational mode but nothing happens. If I have, the controller set to Canopen auto-start and send it a SDO upload i.e. to read the internal voltage at the 5v out: Node Id: 2, Index: 210D, sub index: 3, length: 2 bytes, I get nothing back.

Any suggestions?

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530406 by Hannari
I now know that it is something with the controller. I just hooked up a CANopen Load cell amplifier that I had with no problem, therefore, it is not the PLC.

Could it be something with the heartbeat? I have tried setting the heartbeat to 1000ms, but nothing. The controller is not sending any change on the NMT. One thing I am not so sure on either is the listen node. What is that? I have it set to 1, which is the PLC. Another thing I am not so sure of is that the plc dos not have anything whit heartbeat only node guard.

Please help!!!!

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530410 by TechSupport
What is the firmware of the controller?

In console send

?fid

The plc has its' own functions. Is the PLC sending the can commands or is it sending an analog voltage? Analog voltage is only 0 to +5V.

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530411 by Hannari
Hi,
I get back: FID=Roboteq v1.4a MDC14XX 11/21/2014

I am only connected to the controller via CAN.
The following user(s) said Thank You: buchjyot

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530412 by TechSupport
Problem is that if you are connected via USB, this automatically disables can, even when you re-enable it config. You must set it up for can bus when you are connected via RS232.

The controller needs to be assigned a node ID, and has to listen for a node ID that is sending the signals.

Example
Controller node ID:5

PLC: ID 2

That means that the controller needs to listen on ID 2.

To verify that the can bus is working properly, connect it to software that can read back. Typically we use P-CAN.

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530415 by Hannari
I don’t quite understand. Do I need to connect to the controller via RS232 and not USB? And then configure the Can settings again in Roborun+?

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530416 by TechSupport
If you are wanting to use can, you have to set it up for can via RS232. You cannot do this via USB.

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530417 by Hannari
??? Ok, I will try that.

Why do I then have the option to configure the CAN when I'm USB connected? Even when I save it to the controller, it does not come up with warnings regarding that it’s not setting the CAN.

Please Log in or Create an account to join the conversation.

5 years 6 months ago #29530418 by TechSupport
The USB shares the same lines as the Can bus, so the hardware is what creates this problem which can't be fixed.

Since the utility communicates via usb, it is why it allows you to. Problem is that the usb shuts off/resets the can bus communication.

Please Log in or Create an account to join the conversation.

5 years 6 months ago - 5 years 6 months ago #29530419 by TechSupport
I just checked with my unit. It appears that you can set the can bus via usb and it will remain set after the settings have changed and saved.

One thing in mind is that if you disconnect the usb and reconnect, it will disable the can bus. At least in the past it used, but my unit is showing that it stays enabled.

Anyways, set your canOpen to auto-start enabled.

After the configurations are saved, disconnect the usb and power cycle the control.

See if the controller communicates via can bus.


Attachments:
The following user(s) said Thank You: Hannari

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.270 seconds