Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rostopic list not shown for ROS MODBUS DEVICE DRIVER NODE #6

Open
sivaeinfo opened this issue Oct 14, 2023 · 4 comments
Open

Rostopic list not shown for ROS MODBUS DEVICE DRIVER NODE #6

sivaeinfo opened this issue Oct 14, 2023 · 4 comments

Comments

@sivaeinfo
Copy link

Hi, I am working on ROS modbus to communicate with PLC to read holding register of Delta AS228P PLC. I have installed the ros modbus device driver package and run the rosrun ros_modbus_device_driver modbus_device_driver.py _mapping:=devicemapping.json with mapping of json file.
It was executed without error. But when I run rostopic list, it doesn't show any active topic. Can you give me a solution for this issue.
I have modified json file.
Shall I specifiy the same name for coil, discrete input and holding register that you have given in readme portion in github link?
Do you want me to create subscriber program to access the holding register?
In your paper, you have given different topic name for coil and register. In github you specified different one. Which one I would prefer to use.

My Delta PLC coil address is 00001
Holding register address is 40001

@sivaeinfo
Copy link
Author

I am working on ROS modbus to communicate with PLC to read holding register of Delta AS228P PLC. I have installed the ros modbus device driver package

https://github.com/bitmeal/ros-modbus-device-driver/tree/master

and run the rosrun ros_modbus_device_driver modbus_device_driver.py _mapping:=devicemapping.json with mapping of json file. It was executed without error. But when I run rostopic list, it doesn't show any active topic. Can anyone give me a solution for this issue. I have modified json file. Shall I specifiy the same name for coil, discrete input and holding register which was given in readme portion in github link? Do you want me to create subscriber program to access the holding register? In their paper, they have given different topic name for coil and register. In github, the author specified different one. Which one I would prefer to use.

My Delta PLC coil address is 00001 Holding register address is 40001

Below is the configured json file

// modbus-slave configuration example { "name": "mymodbusslave",

"address": "192.168.1.5",
"port": 502,
"unit": 0,
"timeout": 3,

"rate": 20,

"byteorder_reverse": false, // byte order: default, big endian
"wordorder_reverse": false, // word order: default, little endian

"discrete_read_continuous": true,
"discrete_read_separation_gap": 64,

"registers_read_continuous": false,

"mapping": {
"coils": {
"gripper": 1,
"signal": 2,
// ...
},
"discrete_inputs": {
"overload": 10001,
"presence": 10010,
// ...
},
"input_registers": {
"distance": {
"address": 40001,
"type": "WORD"
},
// ...
},
"holding_registers": {
"name": {
"address": 40000,
"type": "WORD",
},
// ...
}
}

image

@bitmeal
Copy link
Owner

bitmeal commented Oct 23, 2023

Your are executing the command rosrun ros_modbus_device_driver modbus_device_driver.py _/mapping:=devicemapping.json in the directory ~/modbs_ws. I spot one issue and one potential issue:

  1. you typed _/mapping with an additional /. Remove it to read _mapping
  2. The location of the config file must relative to the current working directory ~/modbs_ws, or you have to give an absolute/full path

@sivaeinfo
Copy link
Author

image
Hi, I did what you have mentioned in your post. Still, I am not getting the list of topics for (rostopic_list command
)

@bitmeal
Copy link
Owner

bitmeal commented Nov 16, 2023

I cannot reproduce this error. Are your sure the file devicemapping.json is actually in the directory you are starting your node from? In the case above this would require the file to be present as ~/modbus_ws/devicemapping.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants