Friday 10 May 2019

Newker macros - baby steps...

Loading a modified macro:
Let's try editing an existing macro (M882, aka UserProgram2) and restoring it to the controller. For one thing, it would be helpful to translate the status and error messages to something I can read and understand.

Let's try this:
STATUSINFO(Tool Z axis setting is a-happening);
IF (+#387) THEN;
MOVE(G90,F#386,Z#382);
MOVE(G90,F#386,X#380,Y#381);
ENDIF;
MOVE(G90,F#383,Z#388,W+25);//#1925
PAUS160;
IF (-X25) THEN
MESSAGEBOX(Bollocks - no closing signal seen!)
ERREXIT;
ENDIF
MOVE(G90,F#384,Z#1929,W-25);
IF (+X25) THEN
MESSAGEBOX(Bollocks - no release signal seen!)
ERREXIT;
ENDIF
#50=#5023;
MESSAGEBOX(Well done fat boy. Now run M883!)
RETURN;

Loaded this into the machine and ran it. 
That seems to work. And the error messages come out if you create the right conditions. The "MESSAGEBOX" instruction creates a popup which then requires you to clear it, whereas the "STATUSINFO" instruction simply appears in the green banner thing at the bottom. 

Worth knowing: you can plug in a UFD with only one single file (ProgramUser2 in this case) and the "restore" operation will only upload that file into the system. The subsequent STATUSINFO message tells you to restart the system but in fact it doesn't seem to need it. 


No comments:

Post a Comment

Final assembly and test of the spindle nose adaptor - RESULT!!

After the recent distraction caused by the 3D scanner, resurrecting the 3D printer and buggering about with the throttle bodies for my Honda...