Save Variables

More
8 years 10 months ago #102678 by HalaszAttila
Replied by HalaszAttila on topic Save Variables
What do you think about these custom modules?
Can I use for saving some variables, and working hour?
Does anybody used these?

wiki.linuxcnc.org/cgi-bin/wiki.pl?Contri...ents#Parameter_Saver

or:

github.com/torvn77/LinuxCNC-Work-Counter

Unfortunately i never install a custom linuxcnc modules.
Is these a documentation step by step how to compile it in linuxcnc project?

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

More
8 years 10 months ago #102722 by andypugh
Replied by andypugh on topic Save Variables
Does your part counter originate in G-code or in HAL?

I can think of different ways to do this for each situation.
The following user(s) said Thank You: HalaszAttila

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

More
8 years 10 months ago #102735 by HalaszAttila
Replied by HalaszAttila on topic Save Variables
The counter is in HAL code. A dont know how can i count the parts from G code.
Is there a documentation how to install custom C HAL module. For me, will be very useful the param saver module. What you think about? Can i use this for general purposes, i want just to save some parameters that changes over time.

Thanks Attila.

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

More
8 years 10 months ago #102736 by BigJohnT
Replied by BigJohnT on topic Save Variables
Yes in the HAL section of the documents.

JT
The following user(s) said Thank You: HalaszAttila

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

More
8 years 10 months ago #102739 by andypugh
Replied by andypugh on topic Save Variables

HalaszAttila wrote: The counter is in HAL code. A dont know how can i count the parts from G code.

I could imagine a custom M-code or G-code that incremented a counter. (and, potentially, saved the counter to disc)

Is there a documentation how to install custom C HAL module.

See: linuxcnc.org/docs/html/hal/comp.html
You probably just need
Code:
sudo halcompile --install the_file_name
The following user(s) said Thank You: HalaszAttila

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

More
8 years 10 months ago #102741 by Todd Zuercher
Replied by Todd Zuercher on topic Save Variables

HalaszAttila wrote: The counter is in HAL code. A dont know how can i count the parts from G code.
Is there a documentation how to install custom C HAL module. For me, will be very useful the param saver module. What you think about? Can i use this for general purposes, i want just to save some parameters that changes over time.

Thanks Attila.


Counting something in G-code is extremely easy. I would consider it basic parametric programming 101. Simply assign a variable as your count (or create a named parameter) and add 1 to it after the completion of each part.
Code:
% (Use _count as your part count variable and create it if it doesn't already exist) o10 o10 if [EXISTS[#<_count>] (debug, _count exists and is #<_global>) o10 else (debug, _count does not exist setting to 0) #<_count>=0 o10 endif (insert the g-code to make your part here) #<_count>=[#<_count>+1] (debug, Part count is now #<_count>) m2 %
The following user(s) said Thank You: BigJohnT, HalaszAttila

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

Time to create page: 0.298 seconds
Powered by Kunena Forum