How to pass parameters .comp file

More
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
 

Please Log in or Create an account to join the conversation.

More
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.

More
14 Apr 2025 19:26 #326310 by dinodf
Replied by dinodf on topic How to pass parameters .comp file
I know it, thanks, my problem is upstream  I can't find where it is explained how to pass the parameters 
 

Please Log in or Create an account to join the conversation.

More
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

Please Log in or Create an account to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum