How to get HAL variable to G-code

More
04 Apr 2019 13:30 - 04 Apr 2019 13:30 #130283 by aleksamc
Hi, all.

I make pyvcp panel, where I can write some variables, correspondly to topic SPINBOX DATA to G-Code VariableSPINBOX DATA to G-Code Variable

Now, when I try to get value of the pin (debug, #_hal[<pyvcp.Hlen>]) , I get ####.
But If I write directly to (debug, #_hal[<pyvcp.spinbox.0.pin_param>]). Everything OK.
Why it so?

My aim is to set values from pyvcp xml panel and to run it in g-code.It's hard to debug g-code, if I will use values "spinbox.0.pin_param", etc.

File Attachment:

File Name: Axis4.ini
File Size:2 KB

File Attachment:

File Name: Axis4.hal
File Size:4 KB

File Attachment:

File Name: custom_postgui.hal
File Size:0 KB

File Attachment:

File Name: Panel.xml
File Size:1 KB
Last edit: 04 Apr 2019 13:30 by aleksamc.

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

More
04 Apr 2019 14:29 #130289 by islander261
Have you read this?

linuxcnc.org/docs/devel/html/remap/remap...ap:referto-hal-items

I know it is in an obscure location, also look at the preceding sections for related info and cautions. I use this in my Gcode files all the time to get operational parameters from my GUI.

John
The following user(s) said Thank You: aleksamc

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

More
04 Apr 2019 14:52 #130291 by aleksamc
Thanks a lot, it's working.

Proble was in upper case letters. HAL command works only with lower case letters.

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

More
08 Apr 2019 10:42 - 08 Apr 2019 10:46 #130492 by pl7i92
as you may come from WIN
Please do all Files Naming in lowercase
no space use underscore
linux may thank you by giving a better system
ALL outside the software in Base OperationSystem shoudt be no extra letters used also (-+*#)

WHY dont you use a NGCgui option for your parameters to set
see Eyamples ngcgui from the mashine menue
entry and one button press generates g-code
Last edit: 08 Apr 2019 10:46 by pl7i92.

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

More
07 May 2019 19:16 #133080 by aleksamc
Thanks for your post, I didn't know about NGCGUI till now.

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

Time to create page: 0.829 seconds
Powered by Kunena Forum