Change #var value

Post anything you want to discuss with others about the software.

Change #var value

Postby Alberto FUL » Sat Nov 10, 2018 6:15 am

I run automatic tool grinding machine with UCCNC.
The programs runs in neverending loop. All is parametric (positioning, movements, I/Os).
Is there any possibilty to change vars without stopping the program? Now i placed some M1 in order to do that but I'd like to do "on the fly".
Thanks
Alberto FUL
 
Posts: 34
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: Change #var value

Postby dezsoe » Sat Nov 10, 2018 9:26 am

Yes, of course. You can use e.g. #1=3*[#2+1]. For details see chapter 4.2 Parametric programming in manual.
dezsoe
 
Posts: 567
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Change #var value

Postby Vmax549 » Sat Nov 10, 2018 11:49 am

I think he was asking IF you could change the value of those #vars while running a gcode program.

Yes and No. Currently there is no way to do that as you cannot access the MDI while a program is running but a Plugin or macroloop could be written to do so.

(;-) TP
Vmax549
 
Posts: 1379
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Change #var value

Postby Alberto FUL » Sun Nov 11, 2018 10:14 am

You are right Vmax549.
I'm more g-code programmer than C#. I tried to look at sample code included in UCCNC but I still do not understand it very well. Which editor should I use ? Now I'm using a modified 2017 screenset where I have check boxes to activate various options in my g-code. I'm thinking that default UC screenset with my personal plugin would be (maybe) better .
Can anybody help me doing this?
Thanks
Alberto FUL
 
Posts: 34
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: Change #var value

Postby Vmax549 » Sun Nov 11, 2018 12:48 pm

How many different # vars do you need to update ??

Just a thought(;-) TP
Vmax549
 
Posts: 1379
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Change #var value

Postby Alberto FUL » Sun Nov 11, 2018 3:19 pm

5
Alberto FUL
 
Posts: 34
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: Change #var value

Postby Dan911 » Sun Nov 11, 2018 7:09 pm

Wanted to make it to read variables also but pressed for time, on my way out to brunch. Let me know if this is what you needed and will finish up later tonight.

Create a button or HotKey and give it a # 8989.
Enable plugin in Configure Plugins

Dan


SetandRead_Vars.zip
(4.54 KiB) Downloaded 5 times
Dan911
 
Posts: 468
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Change #var value

Postby Vmax549 » Sun Nov 11, 2018 7:48 pm

Hiya Dan, I have already done this one as part of a Var monitor so I will see what you come up with.

(;-) TP
Vmax549
 
Posts: 1379
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Change #var value

Postby Dan911 » Sun Nov 11, 2018 10:55 pm

Vmax549 wrote:Hiya Dan, I have already done this one as part of a Var monitor so I will see what you come up with.

(;-) TP


No need to come up with anything if you have something that will help the op. Post it.

Dan
Dan911
 
Posts: 468
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Change #var value

Postby Vmax549 » Mon Nov 12, 2018 2:14 am

Hi Dan you have already started you can finish up this one.

(;-) TP
Vmax549
 
Posts: 1379
Joined: Sun Nov 22, 2015 3:25 am
Location: USA


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: Google [Bot] and 7 guests