FRO & SSO with encoders now possible

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

Re: FRO & SSO with encoders now possible

Postby Kelevra » Sat Feb 11, 2017 6:29 pm

Vmax549 wrote:I think A-C was talking about just bringing teh actual axis positions back into UCcnc for display.

When you start working with teh FRO and SSO it can be a little tricky because of teh % sign being included in teh DRO value.

(;-) TP


Did you get it working good tough?
Right now i'm just trying to understand how to use a macro loop to read out the fields of the encoders and then send them to the buttons.
I'm sure having a hard time but i hope in the end i'll get there.
Kelevra
 
Posts: 17
Joined: Tue Sep 06, 2016 8:13 am

Re: FRO & SSO with encoders now possible

Postby Vmax549 » Sat Feb 11, 2017 7:40 pm

See if this help you out. It is a simple sample of what is needed. Be advised there can be MANY ways to do this and this is just one way.

if ( ""+(AS3.Getfielddouble(2430)/4)+"%" != AS3.Getfield(232) ) // This compares teh 2 values and if they are different then do this, other wise do nothing
{
AS3.Setfield((AS3.Getfielddouble(2430)/4),232); // Update teh FRO to teh value in teh Encoder DRO , note teh divisor to modify teh value to 1 unit per
AS3.Validatefield(232); // Validate teh DRO value to make it useable
}

You do have to rememeber that a MacroLoop is just that a Loop the repeats 25 time per sec . If you are not care full you can overload teh CPU and stall out UCCNC.

Being that UCCNC adds a Charector to that field "%" does make it a bit harder to deal with.



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

Previous

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 4 guests