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


Postby andyjack38 » Thu Apr 08, 2021 8:25 pm

Hello all, need help for showing the contain of UCCNC Modbus Reg.(10). I have a good connection in plugin Modbus Master also a good read function from VFD Modbus Register (3004H) (12292) put into UCCNC Modbus Reg.(10). I have created a textfield (20010) which is not showing, so how do I do to see the contain of my text field (20010). Thank you
Posts: 30
Joined: Thu Mar 12, 2020 2:27 am

Re: textfield

Postby dezsoe » Fri Apr 09, 2021 6:13 am

Save the following lines as a macro (Mxxxx.txt) and set it as macroloop:

Code: Select all
ushort showreg = 0;

exec.GetModbusregister(10, out showreg);                                        // Read from Modbus registers

AS3.Setfieldtext(showreg.ToString(), 20010);                                    // Convert to string and write to screen
Posts: 1508
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Return to Macros

Who is online

Users browsing this forum: No registered users and 2 guests