Can you enable/disable radiobuttons and checkbuttons in pyVCP?

More
29 May 2023 01:49 #272385 by tropostudio
I am trying to emulate the hardware pushbuttons, LEDs, rotary switches, et. al on control panel of an existing machine in a pyVCP panel. Current testing as I work out the layout is by running a simple shell demo with a pyVCP.xml file and associated pyVCP.hal file   A few questions I'm not quite sure about, even after reading the the LinuxCNC Documentation:

1) Is it possible to 'latch' (toggle) a regular button?  I figured out how to disable a button with another input, but would like to be able to latch a regular button  closed/true instead of just being momentary.
2)  Is it possible to disable an entire radiobutton array?  I've not succeeded in disabling an array or even a single radiobutton.  FWIW, I am using radiobutton arrays to emulate existing multi-position selector switches.
3) Is it possible to disable checkbuttons?  I am using them to emulate keyswitches and as toggle buttons (although I'd prefer to use 'latched' regular buttons in most cases (see question 1).

Thanks!




 

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

More
29 May 2023 03:47 #272394 by cmorley
Isn't there an optional disable HAL pin?

To be frank it sounds like you should be using one of the more sophisticated VCPs.

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

More
29 May 2023 04:05 #272396 by rodw
Yeh, build a panel for qtdargon. When you get stuck, Chris will sort it out with you. He did that for me and even stole my masterpiece as an example now in the core code and the docs.  :)
The following user(s) said Thank You: joekline9

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

More
29 May 2023 17:38 - 29 May 2023 17:46 #272442 by tropostudio
cmorley - I didn't find any properties associated with disabling radiobuttons and checkbuttons in the Configuration:Control Panels:pyVCP:Widgets section of LinuxCNC_Documentation.pdf.  I Googled a bit more and didn't find anything specific. Guess I was curious if there were additional properties not listed in the LinuxCNC doc. I may delve into GladeVCP, but writing XML files in Geany for pyVCP is really simple for someone who is better with hardware than code. 

The purpose for this initial VCP is just to sort out IO and setup for a a VMC conversion that will retain 95% of the original machine hardware and electronics.  Pics of the revised control panel and machine cabinet are attached. A CTI USB keyboard and small USB/HDMI touchscreen replace the original monitor and keypad.  Ultimately I envision a simple, tab-based interface onscreen that does not try to duplicate all the hardware interface.  IO is taken care of through 2 MESA 6i24 PCIe cards.  Seven Mitsubishi servos controlled via a Yurtaev PCI adapter card.  IO runs through my custom opto boards (green pcb's on the machine cabinet wall).

rodw - I'll take a look at QtDragon.  Thank you both.
Attachments:
Last edit: 29 May 2023 17:46 by tropostudio. Reason: pics were too large and typos

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

More
29 May 2023 19:20 #272452 by tropostudio
Found the QtDragon page at linuxcnc.org/docs/devel/html/gui/qtdragon.html. Also found the QtVCP page at linuxcnc.org/docs/devel/html/gui/qtvcp.html#cha:qtvcp. Great stuff. Strange that I had to find them through a Google search rather than through a link on the linuxCNC.org site ;) Very cool, and great documentation - I will look into it for developing a future UI. In the meantime, I think I can do everything I need to right now in pyVCP by becoming familiar with the HAL commands.

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

More
29 May 2023 23:03 #272461 by rodw
Its all linked on the main page. You need to take care which version of the docs you open . You need to select V 2.9
Don't forget that QTVCP is also well documented

 

 
Attachments:

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

More
29 May 2023 23:47 #272464 by tropostudio
Much appreciated. Thank you.

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

More
30 May 2023 00:52 #272469 by cmorley
yes I see in pyvcp only labels, leds and push buttons have disable pins.
I guess I didn't need radio pins at the time :)

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

More
30 May 2023 01:35 #272475 by tropostudio
Hah! The radio buttons serve as a good interface substitute for several multi-position rotary switches on my panel. A couple of those rotary switches are modal (value assignments of each position dependent on whether in manual jog or auto mode, etc). This can all be worked around since it I see it more as a test interface, not a user interface. Get the machine to run first, then make it better!

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

Time to create page: 0.100 seconds
Powered by Kunena Forum