ros-drivers / odva_ethernetip

Library implementing ODVA EtherNet/IP (Industrial Protocol).
94 stars 48 forks source link

RR Data Command failed with status 1 #12

Open wpmccormick opened 6 years ago

wpmccormick commented 6 years ago

I'm trying to make an IO scanner interface for Tolomatic stepper controllers. Following the omron_os32c_driver as an example only gets me so far (see output below). Any help would be appreciated.

Cheers,

Bill

started roslaunch server http://ros-i-kinetic-vm:45665/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.7
 * /stepper_node/host: 192.168.0.11

NODES
  /
    stepper_node (stepper_eip_driver/stepper_node)

auto-starting new master
process[master]: started with pid [6567]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 70259a5e-9c13-11e8-9bf9-080027883dcb
process[rosout-1]: started with pid [6580]
started core service [/rosout]
process[stepper_node-2]: started with pid [6593]
Generated starting connection ID 3144563369 and SN 20792
[ INFO] [1533846794.062533976]: Socket created
Resolving hostname and connecting socket
Creating and sending the registration message
Sending Command
Waiting for response
Received response of 28 bytes
Successfully opened session ID 53
[ INFO] [1533846794.063998120]: Host open
Creating RR Data Request
Sending Command
Waiting for response
Received response of 58 bytes
RR Data Command failed with status 1
terminate called after throwing an instance of 'std::runtime_error'
  what():  RR Data Command Failed
[stepper_node-2] process has died [pid 6593, exit code -6, cmd /home/ros-industrial/topcapsys/devel/lib/stepper_eip_driver/stepper_node __name:=stepper_node __log:=/home/ros-industrial/.ros/log/70259a5e-9c13-11e8-9bf9-080027883dcb/stepper_node-2.log].
log file: /home/ros-industrial/.ros/log/70259a5e-9c13-11e8-9bf9-080027883dcb/stepper_node-2*.log
EGrobot commented 3 years ago

Hi,

I have encountered the same issue. Did you find the solution ?

Thanks you

wpmccormick commented 3 years ago

It's been long since I looked at that and I'm not working with it any longer, but for sure I got it all working. The Tolomatic driver is open source for reference. Take a look at that.

-Bill

EGrobot commented 3 years ago

Thank you for your answer. I am looking for using this package for a PLC motor driver (Kollmorgen AKDP00306). And I have encountered the same issue as you did. If you have any Leads for this issue I would be glad to hear it.

wpmccormick commented 3 years ago

I would base your design off the Tolomatic implementation https://github.com/ros-industrial/tolomatic rather than the Omron implementation.

The Omron implementation had issues (UDP port mgmt) with unsolicited messaging, so in the Tolomatic implementation, I stripped out all the unsolicited messaging and strictly used solicited messaging.

Also, keep in mind that this implementation is designed for use with ROS messaging,meaning that an IPC running ROS is acting like a PLC to control the motor. So if you're using a PLC to control the motor, I'm not sure any of this makes sense.

Also, the interface is very specific for the device EIP interface, so you'll need to look at your Kollmorgen EIP object definitions and design to that.

-Bill

On Wed, Oct 7, 2020 at 9:16 AM EGrobot notifications@github.com wrote:

Thank you for your answer. I am looking for using this package for a PLC motor driver (Kollmorgen AKDP00306). And I have encountered the same issue as you did. If you have any Leads for this issue I would be glad to hear it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ros-drivers/odva_ethernetip/issues/12#issuecomment-704966693, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALAW2FFVTEAV6LXVRYQUXDSJRZ37ANCNFSM4FO3H4WA .

EGrobot commented 3 years ago

Thank you for your help. I will look into it and see if I can link the PLC to ros.

wpmccormick commented 3 years ago

If you want to make ROS talk to a PLC using EIP, then the odva_ethernetip project isn't what you want.

Fo that I think there are other options:

  1. pycomm - might be stale
  2. OpenEr - this will make the ROS IPC look like a device in the EIP tree.

Or don't use Ethernet/IP at all and use OPC-UA.

On Wed, Oct 7, 2020 at 1:32 PM EGrobot notifications@github.com wrote:

Thank you for your help. I will look into it and see if I can link the PLC to ros.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ros-drivers/odva_ethernetip/issues/12#issuecomment-705118560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALAW2GPQSJMWMZW4OXLF7LSJSX5HANCNFSM4FO3H4WA .