- Configuring LinuxCNC
- HAL
- How to display the value of the int variable from the hal_parport.c file in the
How to display the value of the int variable from the hal_parport.c file in the
- drzasiek90
-
Topic Author
- Visitor
-
05 Sep 2023 11:44 #279946
by drzasiek90
How to display the value of the int variable from the hal_parport.c file in the was created by drzasiek90
Hi, I'm compiling my own version of LinuxCNC and making some changes to thefile. I would like to be able to display the value of a variable in the Axis panel in a way similar to how spindle speed is displayed using a HAL pin. Can someone guide me on how to achieve this?
hal_parport.c
Please Log in or Create an account to join the conversation.
- Cant do this anymore bye all
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1200
- Thank you received: 421
05 Sep 2023 12:45 #279960
by Cant do this anymore bye all
Replied by Cant do this anymore bye all on topic How to display the value of the int variable from the hal_parport.c file in the
You may want to elaborate a little more.
What variable ?
Where is coming from ?
What variable ?
Where is coming from ?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23244
- Thank you received: 4915
05 Sep 2023 14:34 #279979
by andypugh
Replied by andypugh on topic How to display the value of the int variable from the hal_parport.c file in the
Maybe create a new HAL pin or parameter and set the value of it inside your new comp.
Please Log in or Create an account to join the conversation.
- drzasiek90
-
Topic Author
- Visitor
-
06 Sep 2023 05:23 #280054
by drzasiek90
Replied by drzasiek90 on topic How to display the value of the int variable from the hal_parport.c file in the
I create a global variable in the source file that takes certain values in certain situations. I compile linuxcnc and run. I would like to be able to view the value of this variable while the program is running.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23244
- Thank you received: 4915
06 Sep 2023 08:09 - 06 Sep 2023 08:09 #280067
by andypugh
Replied by andypugh on topic How to display the value of the int variable from the hal_parport.c file in the
Create your variable in the HAL structure and assign it to a parameter (you can copy the structure of the other pins / params)
Then you can use the existing HAL tools to monitor the value, including displaying it in GUIs.
Then you can use the existing HAL tools to monitor the value, including displaying it in GUIs.
Last edit: 06 Sep 2023 08:09 by andypugh.
Please Log in or Create an account to join the conversation.
- drzasiek90
-
Topic Author
- Visitor
-
06 Sep 2023 09:40 #280078
by drzasiek90
Replied by drzasiek90 on topic How to display the value of the int variable from the hal_parport.c file in the
No, I've already done it.
I am able to view the parameter in tools.
However, I would like to display this value permanently, but using pycvp it is probably not possible - so far I have not succeeded.
Using pyvcp I am successfully displaying the hal pins but the hal parameters are not working.
I am able to view the parameter in tools.
However, I would like to display this value permanently, but using pycvp it is probably not possible - so far I have not succeeded.
Using pyvcp I am successfully displaying the hal pins but the hal parameters are not working.
Please Log in or Create an account to join the conversation.
- Cant do this anymore bye all
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1200
- Thank you received: 421
06 Sep 2023 10:18 #280081
by Cant do this anymore bye all
Replied by Cant do this anymore bye all on topic How to display the value of the int variable from the hal_parport.c file in the
Oh ok, you want to modify Axis to display the value ?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23244
- Thank you received: 4915
06 Sep 2023 10:44 #280083
by andypugh
(Which means that it needs to be part of the hal_malloc data and needs to be a pointer to a pointer)
Replied by andypugh on topic How to display the value of the int variable from the hal_parport.c file in the
PyVCP can only display items that can be "net"-ed to the PyVCP pins in HAL. So you will need to create the variable as a pin, not as a parameter.Using pyvcp I am successfully displaying the hal pins but the hal parameters are not working.
(Which means that it needs to be part of the hal_malloc data and needs to be a pointer to a pointer)
Please Log in or Create an account to join the conversation.
- drzasiek90
-
Topic Author
- Visitor
-
06 Sep 2023 10:44 #280084
by drzasiek90
Replied by drzasiek90 on topic How to display the value of the int variable from the hal_parport.c file in the
If necessary.
However, I'd prefer to do without modification by adding a panel via pyvcp.
I am looking for a simple method so that it is easy to replicate.
However, I'd prefer to do without modification by adding a panel via pyvcp.
I am looking for a simple method so that it is easy to replicate.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- HAL
- How to display the value of the int variable from the hal_parport.c file in the
Time to create page: 0.364 seconds