Probing Plugin

This is where you talk about Plugins. How they are made and how they work, show examples.

Probing Plugin

Postby Robertspark » Fri Jun 16, 2017 2:07 am

Hello,

General question (nothing may come of this.... [work, life, other projects]) If you were designing a Probling Plugin, would you embed the macro gcode within the plugin, or would you create seperate macros which would be triggered using button presses?

The reason why I ask this is the latter would mean that the user could modify the macros if they so wish (and the plugin is a glorified screen / user interface of buttons and fields etc)

The former means that you are stuck with potential bugs until the developer sorts out the issues.

(CNCdrive request: would be really nice to be able to mutli axis probe sooner than later)

Comments welcome

Did not want to create a screenset / modified screentab as A_Camera did because of the continual development of uccnc + future changes to the screensets and potential clashing button and field numbers should they be used up, hence my plan is to use variables (#) for the inputs and probing values.

must admit the graphics repensentation is the PIA part of this project for me as I can't be bothered in creating flashy images to represent probing icons / images (looking at using Inventor screenshots to represent the motion [I can draw in inventor quickly and move the parts around in the assembly to represent the objects / diagramatic representation].
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Probing Plugin

Postby A_Camera » Fri Jun 16, 2017 6:49 am

In my opinion it is better if the macros are outside the plugin. The obvious advantage is that users could modify them. The disadvantage is that if you have any other connection to the plugin than the necessary button which calls the macro then a user change in the macro may result in errors.

BTW, my latest version is more flexible and definitely better, as well as easier to install and is not changing anything in UCCNC except adding an extra screen.

Probe version 3-1.jpg


The latest version looks like this. As you can see, there is a lot of interaction between the screen and the macros, so if a user would make a change in a macro that change can cause serious issues, like with every other macro. Never the less, I think that integrating the probing macros in a plugin is not a good idea.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Probing Plugin

Postby Robertspark » Fri Jun 16, 2017 9:17 am

Thanks for the input A_Camera.

My plan is to use variables (#) a bit to be able to shove the settings out from the plugin, and then to just display the co-ordinates back within the plugin (as a floating screen).

That way you could use the variables for other things if you / your macros require (calibrated probe diameter, fast and slow probing feedrate etc)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Probing Plugin

Postby A_Camera » Fri Jun 16, 2017 10:28 am

Robertspark wrote:Thanks for the input A_Camera.

My plan is to use variables (#) a bit to be able to shove the settings out from the plugin, and then to just display the co-ordinates back within the plugin (as a floating screen).

That way you could use the variables for other things if you / your macros require (calibrated probe diameter, fast and slow probing feedrate etc)

I am using the user variables as well. Those are saved after a change and restored after starting UCCNC. Very nice feature, no need to change anything in the macro, the macro reads the appropriate value from the variable list. In my first version the Probe screen was not very flexible because the macros needed to be changed. The new one only needs the Probe screen and the macros don't have to be edited every time. It is much better because I change tools often and finding edges is simpler this way since everything can be changed at any time using the probe screen, so setting up a work is quick, even if I have to change tools or changing the probe plate.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Probing Plugin

Postby Dan911 » Sat Jun 17, 2017 3:15 am

What I did is made a configure window for plugin to map button to the macro.


Configure window.JPG
Configure window.JPG (24.66 KiB) Viewed 19709 times
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Probing Plugin

Postby Robertspark » Sun Jun 18, 2017 11:35 am

Work in progress....

Bit rough at present, lot to still do but it's beginning to come together..
Attachments
2017-06-18 12_28_28-.png
2017-06-18 12_27_07-.png
2017-06-18 12_26_26-UCCNC software _ Running in demo mode....png
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Probing Plugin

Postby Robertspark » Sun Jun 18, 2017 7:33 pm

TP,

How would I go about creating a MacroWizard?

How would I create the form, the example from the Macro Documentation file look like a real PIA....
file:///C:/UCCNC/Documentation/Macro_capability_detailed.htm

I link the click and place of visual studio (ok I'm NOT a programmer [yes it tells...]) just VS seemed fairly easy to use (plus free...).

Code: Select all
Button MyButton = new Button();
MyButton.Size = new System.Drawing.Size(80, 40);
MyButton.Location = new System.Drawing.Point(110, 130);
MyButton.Text = "Press me";
MyButton.Click += new EventHandler(MyButton_Click);

MyForm = new Form();
MyForm.Size = new System.Drawing.Size(300, 300);
MyForm.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
MyForm.Controls.Add(MyButton);
MyForm.ShowDialog();

MyFunction();

#Events

Form MyForm; //This is a global variable, a Windows Form

void MyButton_Click(object sender, EventArgs e)
{
  MessageBox.Show("Mybutton was clicked!");
  MyForm.Close();
}

void MyFunction()
{
  exec.Code("G0 X10");
}
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm


Return to Plugins

Who is online

Users browsing this forum: No registered users and 6 guests