- Thank you received: 0
How to display the value of the int variable from the hal_parport.c file in the
- drzasiek90
- Topic Author
- New Member
-
Less
More
3 years 1 month ago #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 the
file. 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?
Code:
hal_parport.c
Please Log in to join the conversation.
- Cant do this anymore bye all
- Offline
- Platinum Member
-
Less
More
- Posts: 1199
- Thank you received: 0
3 years 1 month ago #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 to join the conversation.
3 years 1 month ago #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 to join the conversation.
- drzasiek90
- Topic Author
- New Member
-
Less
More
- Thank you received: 0
3 years 1 month ago #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 to join the conversation.
3 years 1 month ago #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.
Please Log in to join the conversation.
- drzasiek90
- Topic Author
- New Member
-
Less
More
- Thank you received: 0
3 years 1 month ago #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 to join the conversation.
- Cant do this anymore bye all
- Offline
- Platinum Member
-
Less
More
- Posts: 1199
- Thank you received: 0
3 years 1 month ago #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 to join the conversation.
3 years 1 month ago #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 to join the conversation.
- drzasiek90
- Topic Author
- New Member
-
Less
More
- Thank you received: 0
3 years 1 month ago #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 to join the conversation.
Time to create page: 0.091 seconds
