FRO SRO set via macro

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

FRO SRO set via macro

Postby Blaise » Sun Jan 26, 2020 6:52 pm

I would like to set both FRO and SRO using a macro.
The macro gets its values from the Modbus master plugin.
Getting the values from the registers into the macro is working already. The part I need help with is setting the fields in UCCNC with these values.

The following lines don't seem to work:

Code: Select all
ushort Feed_Overide; exec.GetModbusregister(6, out Feed_Overide);
ushort Spindle_Override; exec.GetModbusregister(7, out Spindle_Override);
exec.Setfieldtext(Feed_Overide,232);
exec.Setfieldtext(Spindle_Override,233);;


Any help would be most appreciated!

- Blaise
Blaise
 
Posts: 81
Joined: Tue Jan 16, 2018 3:41 am

Re: FRO SRO set via macro

Postby Blaise » Sun Jan 26, 2020 7:41 pm

Never mind!!!

Here are the working lines of code:

Code: Select all
AS3.Setfield(Feed_Overide,232);
AS3.Validatefield(232);
AS3.Setfield(Spindle_Override,233);
AS3.Validatefield(233);


- Blaise
Blaise
 
Posts: 81
Joined: Tue Jan 16, 2018 3:41 am


Return to Macros

Who is online

Users browsing this forum: No registered users and 8 guests

cron