How to pass parameters .comp file
- dinodf
- Offline
- Senior Member
-
Less
More
- Posts: 46
- Thank you received: 9
13 Apr 2025 17:05 #326225
by dinodf
How to pass parameters .comp file was created by dinodf
Hello,
I am developing a driver to connect a device to linuxcnc via ethernet, I would like to pass the IP address as a parameter but I can't find the correct way to read the parameters in the EXTRA_SETUP() function of the .comp file, the driver is a realtime object
Can help me?
Thanks
I am developing a driver to connect a device to linuxcnc via ethernet, I would like to pass the IP address as a parameter but I can't find the correct way to read the parameters in the EXTRA_SETUP() function of the .comp file, the driver is a realtime object
Can help me?
Thanks
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11173
- Thank you received: 3720
13 Apr 2025 22:03 #326234
by rodw
Replied by rodw on topic How to pass parameters .comp file
The IP address is a 32 bit number internally, so you should be able to pass it as an unsigned long parameter. you would need to convert 192.168.1.1 to 4 bytes in hex, then use setp
The following user(s) said Thank You: dinodf
Please Log in or Create an account to join the conversation.
- dinodf
- Offline
- Senior Member
-
Less
More
- Posts: 46
- Thank you received: 9
14 Apr 2025 19:26 #326310
by dinodf
Replied by dinodf on topic How to pass parameters .comp file
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11173
- Thank you received: 3720
15 Apr 2025 05:14 #326339
by rodw
Replied by rodw on topic How to pass parameters .comp file
This example in the docs is similar to what you want
linuxcnc.org/docs/stable/html/hal/comp.html#_out8
linuxcnc.org/docs/stable/html/hal/comp.html#_out8
Please Log in or Create an account to join the conversation.
Time to create page: 0.145 seconds