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

ADSCom' object has no attribute 'plc #7

Open
adetoni1 opened this issue Jun 12, 2024 · 0 comments
Open

ADSCom' object has no attribute 'plc #7

adetoni1 opened this issue Jun 12, 2024 · 0 comments

Comments

@adetoni1
Copy link

I've tried to download ros2_pyads and to install it. Everything went smoothly, however when I try to launch

ros2 launch ros2_pyads ads_com_bool_test.launch.py

I get the following error:

[INFO] [launch]: All log files can be found below C:\Users\dinterra.ros\log\2024-06-12-19-03-33-196428-DIN-IRMA-LT01-25096
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ads_com_bool_test_node.EXE-1]: process started with pid [10948]
[ads_com_bool_test_node.EXE-1] Traceback (most recent call last):
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\lib\ros2_pyads\ads_com_bool_test_node-script.py", line 33, in
[ads_com_bool_test_node.EXE-1] sys.exit(load_entry_point('ros2-pyads==0.0.0', 'console_scripts', 'ads_com_bool_test_node')())
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com_bool_test_node.py", line 53, in main
[ads_com_bool_test_node.EXE-1] ADSComBoolTestNode()
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com_bool_test_node.py", line 44, in init
[ads_com_bool_test_node.EXE-1] var_value=not self.ads_com.read_by_name('MAIN.bTest', pyads.PLCTYPE_BOOL), # Toggle the existing value
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com.py", line 68, in read_by_name
[ads_com_bool_test_node.EXE-1] raise e
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com.py", line 64, in read_by_name
[ads_com_bool_test_node.EXE-1] var = self.plc.read_by_name(var_name, var_type)
[ads_com_bool_test_node.EXE-1] AttributeError: 'ADSCom' object has no attribute 'plc'
[ERROR] [ads_com_bool_test_node.EXE-1]: process has died [pid 10948, exit code 1, cmd 'C:\dev\ros2_ws\install\lib\ros2_pyads\ads_com_bool_test_node.EXE --ros-args --params-file C:\Users\dinterra\AppData\Local\Temp\launch_params_zazljcay --params-file C:\Users\dinterra\AppData\Local\Temp\launch_params_5wyx8mi_'].

The comconfig file was changed with these values:

'sender_ams': '192.168.12.253.1.1',
'plc_ip': '192.168.12.253',
'route_name': 'ROS2PLC',
'host_name': '192.168.12.253',
'remote_ads': '192.168.12.253.1.1'

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

1 participant