How to add HAL pins to QtPyVCP?
- scotta
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 889
- Thank you received: 464
22 Mar 2019 23:58 #129313
by scotta
How to add HAL pins to QtPyVCP? was created by scotta
So I now have QtPyVCP up and running with a full development environment on a Raspberry Pi 3 on Arch Linux. Raspbian is so out of date when it comes to graphics functionality needed for QtVCP or QtPyVCP on the Pi.
I have a question though that I have not seen yet. I'm using LinuxCNC and the Pi to run a 3D printer with an SPI base PRU (Programmable Realtime Unit) that is a hacked Smoothieboard clone. The board does all the step generation, heater control etc.
In PyVCP I simply make some HAL pins and connect them to my custom HAL component pins to get data like Heated Bed and Extruder temperatures etc to be displayed and edited.
My question is, how to do this in QyPyVCP? I can see that rules can be made that are based on "Status", standardHAL pins seemed to be read into Status from the Info.py and this appears to look at one of the HAL config files as well.
Is there an example how to make visible custom HAL pins?
In PyVCP I have the following but the plugin makes the HAL pins as we know...
# spiPRU command outputs
net bed_set_temp => pyvcp.bed_set_temp
net ext0_set_temp => pyvcp.ext0_set_temp
net ext0_fan_speed => pyvcp.ext0_fan_speed
net BLtouch_set_pos => pyvcp.BLtouch_set_pos
# spiPRU command feedbacks
net bed_temp => pyvcp.bed_temperature
net ext0_temp => pyvcp.ext0_temperature
Thanks in advance
Scott
I have a question though that I have not seen yet. I'm using LinuxCNC and the Pi to run a 3D printer with an SPI base PRU (Programmable Realtime Unit) that is a hacked Smoothieboard clone. The board does all the step generation, heater control etc.
In PyVCP I simply make some HAL pins and connect them to my custom HAL component pins to get data like Heated Bed and Extruder temperatures etc to be displayed and edited.
My question is, how to do this in QyPyVCP? I can see that rules can be made that are based on "Status", standardHAL pins seemed to be read into Status from the Info.py and this appears to look at one of the HAL config files as well.
Is there an example how to make visible custom HAL pins?
In PyVCP I have the following but the plugin makes the HAL pins as we know...
# spiPRU command outputs
net bed_set_temp => pyvcp.bed_set_temp
net ext0_set_temp => pyvcp.ext0_set_temp
net ext0_fan_speed => pyvcp.ext0_fan_speed
net BLtouch_set_pos => pyvcp.BLtouch_set_pos
# spiPRU command feedbacks
net bed_temp => pyvcp.bed_temperature
net ext0_temp => pyvcp.ext0_temperature
Thanks in advance
Scott
The following user(s) said Thank You: KCJ
Please Log in or Create an account to join the conversation.
- KCJ
- Offline
- Moderator
Less
More
- Posts: 330
- Thank you received: 269
23 Mar 2019 03:59 #129326
by KCJ
Replied by KCJ on topic How to add HAL pins to QtPyVCP?
Sounds like an interesting setup with the RPi! How does the VTK based Gcode Backplot perform on the Pi? I have not got a chance to test it by think it should be perform better than Gremlin since it should support OpenGL ES and have a lower memory footprint.
Regarding the HAL pins, QtPyVCP only has preliminary support for reading them so far. I do have a HALStatus plugin in the works that exposes all the HAL pins as data channels that can be used in the rules just like the status items. I will work on finishing that up in the next few days.
Regarding the HAL pins, QtPyVCP only has preliminary support for reading them so far. I do have a HALStatus plugin in the works that exposes all the HAL pins as data channels that can be used in the rules just like the status items. I will work on finishing that up in the next few days.
Please Log in or Create an account to join the conversation.
- scotta
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 889
- Thank you received: 464
23 Mar 2019 06:28 #129330
by scotta
Replied by scotta on topic How to add HAL pins to QtPyVCP?
The VTK implementation required to build VTK from source with python bindings. A bit slow on the Pi but it got there in the end. I have not had a chance to load a large gcode file yet to see how it goes.
Let me know if I can help in any way. I am on the Python learning curve but C and C++ are my background. The Hunanyang VFD component which is now part of master was my baby 10 years ago. How time flies...
BR
Scott
Let me know if I can help in any way. I am on the Python learning curve but C and C++ are my background. The Hunanyang VFD component which is now part of master was my baby 10 years ago. How time flies...
BR
Scott
The following user(s) said Thank You: KCJ
Please Log in or Create an account to join the conversation.
- fixer
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 27
23 Mar 2019 06:39 #129331
by fixer
Replied by fixer on topic How to add HAL pins to QtPyVCP?
Is it not possible to use
halmodule
with Qt?
Please Log in or Create an account to join the conversation.
- KCJ
- Offline
- Moderator
Less
More
- Posts: 330
- Thank you received: 269
23 Mar 2019 15:40 #129367
by KCJ
Replied by KCJ on topic How to add HAL pins to QtPyVCP?
Fixer, yes it would be possible to use halmodule with Qt, but you would have to do that by sub-classing the QtPyVCP widgets you wanted to HAL-ify and adding the necessary python code. That would not be very difficult and would make sense in some situations, but having access to HAL from the rules system would be much more convenient for most things.
Please Log in or Create an account to join the conversation.
- scotta
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 889
- Thank you received: 464
24 Mar 2019 03:40 #129434
by scotta
Replied by scotta on topic How to add HAL pins to QtPyVCP?
Hi, when you say "QtPyVCP only has preliminary support for reading them so far." how is this done. I'd be interested in having a play.
Thanks
Scott
Thanks
Scott
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
Less
More
- Posts: 7106
- Thank you received: 1177
24 Mar 2019 13:08 #129471
by BigJohnT
Replied by BigJohnT on topic How to add HAL pins to QtPyVCP?
This is the status items page
qtpyvcp.kcjengr.com/components/status_items.html
This is the basic tutorial
qtpyvcp.kcjengr.com/tutorials/basic_vcp.html
JT
qtpyvcp.kcjengr.com/components/status_items.html
This is the basic tutorial
qtpyvcp.kcjengr.com/tutorials/basic_vcp.html
JT
Please Log in or Create an account to join the conversation.
- KCJ
- Offline
- Moderator
Less
More
- Posts: 330
- Thank you received: 269
24 Mar 2019 15:00 #129475
by KCJ
Replied by KCJ on topic How to add HAL pins to QtPyVCP?
The only HAL widget we have so far is the HalLedWidget for indicating BIT HAL pin states of existing pins. To use it place it on a window and set the hal_pin_name property to the name of the pin you want it to reflect.
This widget does not create a new pin, but works much like HALMeter to show the states of existing pins. This widget is going to go away and I am going to add a support for reading HAL pins from the widget rules. I am also going to add support for read/write HAL widgets that create their own pins much like the pyvcp widgets.
HAL LED Demo indicating the state of the halui.machine.is-on pin.
This widget does not create a new pin, but works much like HALMeter to show the states of existing pins. This widget is going to go away and I am going to add a support for reading HAL pins from the widget rules. I am also going to add support for read/write HAL widgets that create their own pins much like the pyvcp widgets.
HAL LED Demo indicating the state of the halui.machine.is-on pin.
Please Log in or Create an account to join the conversation.
- KCJ
- Offline
- Moderator
Less
More
- Posts: 330
- Thank you received: 269
10 Apr 2019 20:51 #130622
by KCJ
Replied by KCJ on topic How to add HAL pins to QtPyVCP?
Scott, we finally have a pretty complete set of HAL widgets in QtPyVCP.
See here for a list of widgets and the pins they create: qtpyvcp.kcjengr.com/widgets/hal_widgets/
We will be adding more HAL widgets down the road, but if you see something is missing let us know and we will add it.
Also QTPyVCP now has a QObject based version of hal_glib that can be used for creating custom HAL components if needed.
Cheers,
Kurt
See here for a list of widgets and the pins they create: qtpyvcp.kcjengr.com/widgets/hal_widgets/
We will be adding more HAL widgets down the road, but if you see something is missing let us know and we will add it.
Also QTPyVCP now has a QObject based version of hal_glib that can be used for creating custom HAL components if needed.
Cheers,
Kurt
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- Dave3891
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 5
11 Apr 2019 18:56 #130684
by Dave3891
Replied by Dave3891 on topic How to add HAL pins to QtPyVCP?
Scott,
Any more info on the SPI PRU for the raspberry pi?
Any more info on the SPI PRU for the raspberry pi?
Please Log in or Create an account to join the conversation.
Moderators: KCJ, Lcvette
Time to create page: 0.094 seconds