DeviceNet second gateway component missing

Topics about the Hardware of Revolution Pi
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

DeviceNet second gateway component missing

Post by cataliz3er »

I just bought a RevPi Connect + DIO + DeviceNet Gateway and what I would like to do is connect the inputs/outputs from the DIO to the Gateway. I need this in order to interface sensors and actuators with a KUKA robot.
I'm finding it very difficult to find any detailed documentation on how to achieve something like this and now I'm beginning to wonder if it's even possible.
I eventually managed to find a user manual on a distributor's website.

I have 2 leds flashing red:
POWER = Correctable error (e.g. second gatewaycomponent missing)
MS = At least one system component is not running due to a configuration error or the partner gateway component is not connected.

When I connect the gateway to the Kuka KRC2 Controller the NS LED is on green but the other two are still flashing.
https://youtu.be/btVILZy-sPw

Any info is much appreciated!
Thanks!
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

Re: DeviceNet second gateway component missing

Post by cataliz3er »

piTest -d gives the following info regardless of connection to the DeviceNet network:

Found 4 devices:

Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
input offset: 1137 length: 6
output offset: 1143 length: 5

Address: 31 module type: 96 (0x60) RevPi DIO V1.4
Module is present
input offset: 1024 length: 70
output offset: 1094 length: 18

Address: 30 module type: 32841 (0x8049) Gateway DeviceNet V0.0
Module is NOT present, data is NOT available!!!
input offset: 0 length: 512
output offset: 512 length: 512

Address: 64 module type: 24580 (0x6004) ModbusRTU Master Adapter V0.0
Module is present
input offset: 1148 length: 337
output offset: 1485 length: 73
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

Re: DeviceNet second gateway component missing

Post by cataliz3er »

I tried removing the DIO and leaving just the Connect Module and the Gateway thinking it's a PiBridge issue.
Now the NS led is flashing green.
Here's my PiCtory layout. Went through the Save As COnfig File + Reset Driver procedure.
Annotation 2020-09-04 102031.png
Annotation 2020-09-04 102031.png (255.06 KiB) Viewed 8827 times
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

Re: DeviceNet second gateway component missing

Post by cataliz3er »

Great success!
Unplugged everything then reconnected. Seems to work.
IMG_20200904_111254.jpg
IMG_20200904_111254.jpg (140.51 KiB) Viewed 8818 times
My question now is how do I use the information in the Gateway tutorial to communicate to the KUKA?
The module currently in use is a WAGO which communicates the digital inputs/outputs with the robot via DeviceNet.
When i read the ins and outs with piTest it gives all zeros.
When i attempt to write nothing happens.
IMG_20200904_123655.jpg
IMG_20200904_123655.jpg (202.08 KiB) Viewed 8818 times
IMG_20200904_123707.jpg
IMG_20200904_123707.jpg (180.63 KiB) Viewed 8818 times
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

Re: DeviceNet second gateway component missing

Post by cataliz3er »

The tutorial says:
To configure the gateway component, you have to make the appropriate settings in the DeviceNet objects with the configuration software of your Device master.
Does this mean I need an external device to configure the gate?
Can't the configuration be done somehow from the Connect Module?
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: DeviceNet second gateway component missing

Post by dirk »

Hi cataliz3er, thank you for your information and your steps that you already performed by yourself.
You have successfully setup the PiCtory configuration and also played around a bit.
The Gateway module DeviceNet Slave is not a master. Have a look at the user maual how to configure the module.
The idea behind the Gateway Module is that you don't have to deal with the fieldbus and on the RevPi you have I/O data.
Then you write an application i.e. with Python and the RevPiModIO library or Codesys that processes the DIO and the fieldbus data.
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

Re: DeviceNet second gateway component missing

Post by cataliz3er »

Thank you, dirk!
Revpimodio is what I've been looking for! I'll start digging around and playing with it.
So basically I would do a read or subscribe to the event handlers on the DIO using the names defined in Pictory and pass the info on using the IO names defined for the DeviceNet module? Simple as that?
If so, can't wait.
I'll post updates as soon as I have something working.
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: DeviceNet second gateway component missing

Post by dirk »

Hi cataliz3er, thank you for your positive reply. It is good that you are progressing with your project and that the things get easier with every step.

If you are interested to be listed in the success stories then write us an EMail.
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

Re: DeviceNet second gateway component missing

Post by cataliz3er »

Hey guys, back with some updates.
Managed to get the DeviceNet communication working and data is flowing in and out of the robot. That's the good part.
The bad part is that the connection seems extremely sensitive.
I'm using one of the outputs to drive a 24V replay that, in turn, drives a 220V contactor for a 1kW electric motor, and the moment I switch on the contactor, the NS light goes red and communications stop.
So far I've tried using a bigger 24V PSU (went from 1.5A to 5A) as I thought the switching of the contactor might affect the 24 supply used in the communication. I'm supplying power to the DN and the revPi from the same PSU, by the way.
The power to the cabinet is 3phase so I've tried using a different phase for the contactor coil. Same problem.
Tried supplying the 24V PSU from a different power outlet alltogether. Same problem.
Removed the contactor from the cabinet (thought it might be EMI) and supplied it with a long wire. Same problem.
Removed the control connection from the revPi and I'm switching the relay manually. Same problem.
The motor isn't connected yet. So the only thing that is new to the setup is the contactor coil. It's an LS MC-18b.
https://www.tme.eu/en/details/mc-18b-23 ... 0vac-1a1b/

Here's an annotated photo of the layout:
InkedIMG_20200918_133059_LI-min.jpg
InkedIMG_20200918_133059_LI-min.jpg (229.67 KiB) Viewed 8518 times
Here's a rough schematic sketch:
IMG_20200918_133147-min.jpg
IMG_20200918_133147-min.jpg (170.64 KiB) Viewed 8518 times
PS:
I've also noticed some issues with the Gateway. It doesn't always start up properly, the Power and MS leds blink red until i do a "sudo reboot now" on the revPi.
This usually happens when I change the wiring on the DN connection, but not always. It's rather unpredictable behavior.

For now I'll switch back to the WAGO and see if it behaves the same with the contactor in place. If the problem persists I'll know it's something to do with my cabling or layout.
If not, I think it's safe to assume the problem lies with the Gateway. I'd really like to be able to use the revPi, though.

Thanks in advance!
cataliz3er
Posts: 14
Joined: 29 Aug 2020, 13:18

Re: DeviceNet second gateway component missing

Post by cataliz3er »

Updates:
Switched to the WAGO. Problems no more.
Same wiring + connected motor + cabinet light.
Switched back to a 2.5A PSU. Connection stable.
Tomorrow I'll wire up the IO's and see if everything works together.
I think I wound up with a faulty gateway.
Post Reply