> There is now FPC (Free Pascal Compiler) that is quite > compatible with Borland Turbo Pascal extensions. > I ported an old Turbo Pascal application from a Windows > environment to Linux with that, and it went very well. > I don't know how compatible it is with actual Delphi code > and extensions, however. > > Jon >
Hi Jon, Lazarus is like a clone of Delphi 5. Like any IDE and programming language you have to know how to use it of course. This little demo took less than 15 minutes to whip up. On a Pi because my Beagle is in the shop but it's the same Lazarus. Longer to write the document, figure out how to do a screen capture on the Pi and ftp it to my web site. Now I don't know how I'd tell the MachineKit thread that I want it to execute a Y-0.10 G code command in relative mode. Nor do I know how to tell it to jog continuously. But the user interface that provides whatever needs to be sent to that task could look like this http://www.autoartisans.com/cnc/AxisDemo1.jpg Note the similarity to the Axis program including the drop down menu for selecting jog distance. Obviously we could also add an Fxx for speed and we could limit xx based on the .ini file value for max speed. I understand that there is more under the covers so to speak. But here's the code that does that. And needless to say items like axis and distances would be in the .ini file not hard coded. Total number of lines including empty lines is 57. Total number of lines I added by typing is 2. The form was created with drag and drop items and the defaults entered inside the IDE. A month or so and I could probably clone the MACH3 "video game" look. Each button click etc. just results in a function that is called and does something. The secret of course is in what that 'something' is. What I've been trying to say is a drop down menu item with a dialog that fills in each of the AXIS parameters that are currently edited in the .ini file is trivial. And with a bit more work Hints and Help features for each item. The file saved in XML format can also easily be edited. BTW, the executable file on the Pi is huge at 22MB because the entire library is linked into the executable. There are ways to not have it do that but the upside is you don't need any other files installed. unit axis; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls; const AxisString = 'XYZA'; type { TForm1 } TForm1 = class(TForm) Button1: TButton; Button2: TButton; AxisRate: TComboBox; AxisSelector: TRadioGroup; MDI_Edit: TEdit; Label1: TLabel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { private declarations } public { public declarations } end; var Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button2Click(Sender: TObject); begin MDI_Edit.text := AxisString[AxisSelector.ItemIndex+1] + AxisRate.items[AxisRate.ItemIndex]; end; procedure TForm1.Button1Click(Sender: TObject); begin MDI_Edit.text := AxisString[AxisSelector.ItemIndex+1] + '-'+AxisRate.items[AxisRate.ItemIndex]; end; end. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
