Here's a screen shot of a piece of the Lazarus code.  I added a temporary 
button onto the main form to show how easy it is to work with this.  Click the 
button and the Axis: radio button changes to the next one and then loops back 
to the first.
 
So then I put that temporary button onto the form and set the button caption to 
'Cycle Axis'.  Didn't bother renaming the button although normally I'd do that 
too to make it more readable for coding.
 
Double clicked on it and it took me to the program with the cursor right after 
the 'begin'.
I added the variable 'i' and the code between begin end.  Type F9 to compile 
and run and there you are.  Click on the button and the highlighted radio 
button changes.
 
The automatic range checking built into pascal and enabled in this case means I 
have to use a temporary variable because incrementing the ItemIndex directly 
causes a range check error once it's greater than 2.
 
procedure TForm1.Button4Click(Sender: TObject);
var i : integer;
begin
  i := AxisRadioGroup.ItemIndex + 1;
  if (i > 2) then i := 0;
  AxisRadioGroup.ItemIndex := i;
end;
 
Now any other part of the program can read what button is set like if you 
clicked on 'Touch Off' button it would throw up the dialog code with the 
ItemIndex parameter so it knows which axis to touch off.
 
If the MPG on the pendant has selected a different axis the code that deals 
with the pendant can set the ItemIndex to a new value.  Perhaps even highlight 
it on the pendant LCD display if possible with that pendant.
 
Once I figure out how to control the LCNC stuff from here I could use the +/- 
buttons and Spindle buttons to control the spindle for example.  Then copy the 
source code over to the Pi4, compile it with the Pi4 Lazarus or set up my 
Lazarus on the PC to cross compile for the Pi4 and just copy the binary.  And 
bingo updated Axis.  Then copy it over to the PC and also the BeagleBone with 
MachineKit and do the same.  
 
This is a work in progress…  Long way to go yet.
John
 

 
 
> -----Original Message-----
> From: John Dammeyer [mailto:jo...@autoartisans.com]
> Sent: July-16-21 11:14 AM
> To: 'Enhanced Machine Controller (EMC)'
> Subject: Re: [Emc-users] AXIS UI Jog Button
> 
> Nope.   Not na�ve.
> 
> Since we can read the status of the indicators as an 'out' something just 
> needs to be changed to be able to set/reset that indicator.
> The 'out' value is likely read by the button press to know which axis to 
> touch off.
> 
> In Delphi or Lazarus Object Pascal the code to do this sort of things is a no 
> brainer.  But tcl and python together with who knows
> what else is to me at the moment unreadable.  I started redoing the AXIS user 
> interface in Lazarus but other projects got in the way.
> I think I stopped when I had to first create all the little picto icons along 
> the top bar.  I did get far enough along to interpret the G-
> Code and fill in the window with the setable G-Code values.
> 
> However, to clone AXIS one actually has to understand how it works for the 
> connection to LCNC and I'm not there yet.  Project #42
> ;-)
> 
> John
> 
> 
> > -----Original Message-----
> > From: Martin Dobbins [ <mailto:tu...@hotmail.com> mailto:tu...@hotmail.com]
> > Sent: July-16-21 10:49 AM
> > To: Enhanced Machine Controller (EMC)
> > Subject: Re: [Emc-users] AXIS UI Jog Button
> >
> >
> >
> > >Yes.  Keyboard and click on radio button both change so the Tool buttons 
> > >refer to the correct axis.  But Pendants don't seem to
> > have that feature.
> > >John
> >
> > If a USB (or in this case a Ps/2) keyboard can do it, then somewhere in the 
> > code for that, there must be a way to get any other
> device
> > connected by USB to make the same GUI updates.
> >
> > Or am I just being naive?
> >
> > Martin
> >
> >
> > _______________________________________________
> > Emc-users mailing list
> >  <mailto:Emc-users@lists.sourceforge.net> Emc-users@lists.sourceforge.net
> >  <https://lists.sourceforge.net/lists/listinfo/emc-users> 
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> > _______________________________________________
> > Emc-users mailing list
> >  <mailto:Emc-users@lists.sourceforge.net> Emc-users@lists.sourceforge.net
> >  <https://lists.sourceforge.net/lists/listinfo/emc-users> 
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> 
> _______________________________________________
> Emc-users mailing list
>  <mailto:Emc-users@lists.sourceforge.net> Emc-users@lists.sourceforge.net
>  <https://lists.sourceforge.net/lists/listinfo/emc-users> 
> https://lists.sourceforge.net/lists/listinfo/emc-users
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to