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: 39
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: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

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: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: Change #var value

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

5
Alberto FUL
 
Posts: 39
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
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 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: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Change #var value

Postby Alberto FUL » Wed Nov 14, 2018 12:24 pm

Thank You Dan,

That's what I need.
Am I too unpolite to ask for source code of this plugin?
I'd like to play around and add some "cosmetics".
THANKS ;)
Alberto
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: Change #var value

Postby Alberto FUL » Wed Nov 14, 2018 9:12 pm

It seems that I cannot input negative numbers
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Re: Change #var value

Postby Dan911 » Wed Nov 14, 2018 11:58 pm

Alberto FUL wrote:It seems that I cannot input negative numbers

Sorry Alberto, I had only numbers and decimal allowed, I added minus(negative), I also added Get variables to check there value, plugin is still being developed.

Dan

SetandRead_Vars.zip
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Change #var value

Postby Alberto FUL » Thu Nov 15, 2018 7:50 pm

Thanks
Alberto FUL
 
Posts: 39
Joined: Thu Jan 12, 2017 1:48 pm
Location: Italy

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 14 guests