Printing out numbered parameter value

01 Apr 2018 13:25 #108211 by andrey-bts
Is there a simple method to print out numbered parameter (#xxxx from linuxcnc.var) value on pyvcp?
There's a widget <number>, looks like suits for this purpose, but i was unable to link it's <halpin> to NP in any way.
03 Apr 2018 12:10 #108296 by andypugh
I don't think that there is a simple way, no.
You can output the value of a parameter from G-code to a motion.analog-out HAL pin, and show that in the PyVCP.

Which parameter do you want to display?
03 Apr 2018 12:17 #108298 by andrey-bts
I have different values of delta Z for G38.3, it is stored in #3030 - for different fixtures on the table. I.e. #3030==0 means Z==0 on the table, #3030==10 means Z==0 10mm above the table. It's convenient to use numbered param, because lcnc automatically reads and writes it to var-file. But when you run lcnc-axis, you don't see current value of delta for tool sensor G38? and that may lead to some nasty consequencies. I just wanted to print it out on pyvcp

When i just start lcnc - there's no g-code executed yet, but previous val of #3030 is already read from var-file. Writing to motion.analog seems not possible in this way
03 Apr 2018 12:22 - 03 Apr 2018 12:23 #108299 by andypugh
The INI file has a "RS274NGC_STARTUP_CODE" section. You might be able to put a
M68 E0 Q#3030
in that section.
Last edit: 03 Apr 2018 12:23 by andypugh.
The following user(s) said Thank You: andrey-bts
03 Apr 2018 14:00 #108307 by andrey-bts
Thank you, STARTUP_CODE helped a bit - now I can see a preset value of fixture height
03 Apr 2018 15:51 #108319 by Mike_Eitel
It is easy to make a your own 'comp' hal component and show these pins on Screen.
03 Apr 2018 16:39 #108323 by andypugh
Not so easy to read a G-code parameter into a comp though.

You can get the probe-trip position through the Python interface:

So a user-space Python comp could read that (if it helped) and make it available on a HAL pin. Or it might be possible to create a whole new PyVCP widget that displayed that value.
Time to create page: 0.080 seconds
Powered by Kunena Forum