Nembered Paramenters accessibility.

More
03 May 2013 20:44 #33566 by bigalex
Hi people.
Is there any way to access the values of the Numbered Paramenter outside the G code ?
I mean is it possible to have a sort of list "like" the tool table in Axis where to read and/or write the Numbered Paramenters values ?

reagards

bigalex :blink:

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

More
03 May 2013 21:05 #33567 by ArcEye
It already exists, in your config directory is a file called emc.var or linuxcnc.var

The problem is that it is read and start up and only written at exit, so in between it is probably wrong
and you need to get the values via G Code
(where they are not accessible in any other way)

regards

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

More
03 May 2013 21:32 #33568 by andypugh

Hi people.
Is there any way to access the values of the Numbered Paramenter outside the G code ?:


If you need to pass values out of G-code you can use the motion.analog-out-NN pins and G68 (guessing the G-code, somewhere round there).

Communication fro HAL to G-code exists
www.linuxcnc.org/docs/devel/html/remap/s..._referto_hal_items_a
But is read-only from the H-code so not a huge help.

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

More
03 May 2013 21:33 #33569 by bigalex
Hi ArcEye.
Thank you for your quick reply. :)
I know about the .var file.
But the problem , as you say , is that the file is accessible (with the last values) only after a LCNC shut down.
This is , from my point of view ( I'm thinkin about the application I'm interest of ) , a big limitation.
Because Numbered Parameters are evaluated from the G code at the moment of a single line execution with a parameter involved with,
I would like to modify the value during the LCNC running.
In my application the operator have to be allowed to modify parameter values while the machine is in running auto mode.

Do you know if Numbered Parameters are accessible by the LCNC Python module ?

regards

bigalex :blink:

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

More
03 May 2013 21:45 #33570 by bigalex
Hi Andy.
Thank you too for the reply. I was answering while your message arrive.
I read something about remapping functionalities and for sure will be useful for some other needs (it is not yet so clear , I mean I have
to read more and understand much more) .
One of the LCNC limitations is the accessibility at the core variables/parameters .
Because the only way to have values stored in LCNC is to use Numbered Parameters it is quite important to have an "easy" access to them.
In the past I used different CNC systems (Siemens , AB .... ) and the access to their Numbered Parameters was transparent from
the GUI .

bigalex :blink:

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

More
03 May 2013 22:43 #33573 by ArcEye

Do you know if Numbered Parameters are accessible by the LCNC Python module ?


I don't use the python bindings, but I don't think they are, the GUIs don't need them, the interpreter takes care of restoring and saving them from/to file

They are set out in ...src/emc/rs274ngc/interp_array.cc and accessed in other places in the interpreter through settings->parameters[NNNN]
but you have to get deep into lcnc internals to get at them.

Exactly what are you trying to do?

You would not normally want operators messing with the core 5161 - 5428 range, they normally reflect the state of the machine which is not editable.

The numbered parameters in use within the GCode as variables is quite arbitrary, 0-31 for locals 32-62 for return values and then wide open,
but depends how the programmer wrote the GCode, as to which if any variables have useful data in them

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

More
03 May 2013 22:57 - 03 May 2013 23:04 #33575 by bigalex
Hi ArcEye.
from the User Manual

Persistence
When LinuxCNC is shut down, volatile parameters lose their values. All parameters except numbered parameters in the
current persistent range 1 are volatile. Persistent parameters are saved in the .var file and restored to their previous values
when LinuxCNC is started again. Volatile numbered parameters are reset to zero.
Intended Use
1. user parameters:: numbered parameters in the range 31..5000, and named global and local parameters except predefined
parameters. These are available for general-purpose storage of floating-point values, like intermediate results,
flags etc, throughout program execution. They are read/write (can be assigned a value).


In my application I use a set of G code subroutines and programs that use only Numbered Parameters to contain
the values of the axis positions and whatever data is needed to perform the machine cycles.
So the operator can change these values without edit any kind of G code program .
I usually have an HMI / Display with a programmable user interface with the Numebered Parameter on it .
Initially I was hoping to use PyVCP to solve this task but I think it is not possible.

The LCNC Python module do not have any access to the Numbered Parameter as per Integrator Manual .

bigalex :blink:
Last edit: 03 May 2013 23:04 by bigalex.

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

More
03 May 2013 23:06 #33576 by andypugh

When LinuxCNC is shut down, volatile parameters lose their values. All parameters except numbered parameters in the
current persistent range 1 are volatile. Persistent parameters are saved in the .var file and restored to their previous values
when LinuxCNC is started again. :


I believe that it is possible to add items to the .var file to make them persistent.
I don't know if that works for named parameters, and if it does then it would be anyone's guess what happened if you were to use a hal-pin named parameter in the .var file.

it isn't, however, too hard to find out.

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

More
03 May 2013 23:12 #33577 by BigJohnT

When LinuxCNC is shut down, volatile parameters lose their values. All parameters except numbered parameters in the
current persistent range 1 are volatile. Persistent parameters are saved in the .var file and restored to their previous values
when LinuxCNC is started again. :


I believe that it is possible to add items to the .var file to make them persistent.
I don't know if that works for named parameters, and if it does then it would be anyone's guess what happened if you were to use a hal-pin named parameter in the .var file.

it isn't, however, too hard to find out.


I'm pretty sure any numbered parameters you add to the .var file become persistent.

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

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

More
03 May 2013 23:13 #33578 by bigalex
Hi Andy.
That is why I'm talking about Numbered Parameters only.
Named Parameters are volatile .
The persistence range can be "easily" extended modifying the .var file.
But the problem is access to them with LCNC running.

bigalex :blink:

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

Time to create page: 0.410 seconds
Powered by Kunena Forum