Variable that will be available in the plugin and macros

This is where you talk about Plugins. How they are made and how they work, show examples.

Variable that will be available in the plugin and macros

Postby shad » Sun Oct 09, 2016 3:21 pm

Is it possible to add ability to declare in the plugin any register (int or bool or double variable) which will be available in the macros. Just any time we need to check any plugin variable in the macros.
For example declare
Code: Select all
REG   n_SystemIsBusy;  //declare register
RegRegister("Neuron", "n_SystemIsBusy", REG_TYPE_GENERAL, &n_SystemIsBusy);  //Add register for the Neuron device in the UCCNC

Then get the value in the macros
Code: Select all
bool res = GetRegValue("Neuron","n_SystemIsBusy")

Balazs, what you think? It's will be useful in the future?
Also I see Getvar(int varnum)/Setvar(double value, int varnum) functions. May be this is what I say? In this case how to declare Variable in the Plugin (which will be available in the macros, for example variable #1)
Thank you!
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Return to Plugins

Who is online

Users browsing this forum: No registered users and 4 guests