My probing screen and macros

If you created a new screenset and want to share it with others then please post it here. You can talk about screens here.

My probing screen and macros

Postby A_Camera » Tue May 02, 2017 10:35 am

I had some time this weekend and finally created a screen for my probing macros. I found the UCCNC CAM functionality useless for me and decided to replace it with my PROBE screen. Basically, I kept the layout of the CAM screen, removed only what was necessary to remove and added my own buttons and changed the functionality to suit my probe screen. The new user field options come handy as well, I am using two new fields, Plate thickness (#20002) and Probe diameter (#20003).

Here is how it looks like.

Image

If anybody is interested in using this, please visit my blog for more details and for the download link.

https://adapting-camera.blogspot.se/2017/05/uccnc-probing-screen-and-macros.html

The zipped file contains everything needed, all the images and macros, as well as my Defaultscreenset.ssf so installation should be pretty straight forward. If you wish to add the screen and buttons manually, feel free to do so. The files are offered in an "as is" basis, they work fine on my installation but if you need support or changes I can't promise much of that, except through this or other forums. All the necessary instructions for how to install this are on my blog in that blog post, I don't think I missed out anything.

I think the buttons are self explanatory, but before you use it you should test them carefully to understand how they work. This is especially the case for the three square buttons on the right. No documentation other than what is found in the macros will be provided.

There are ten button macros, as well as the constructor macro. Note that currently I did not include the macros for A axis, only for X, Y and Z.

Download, use, distribute and change it if you like it.

Good luck.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: My probing screen and macros

Postby dezsoe » Tue May 02, 2017 11:35 am

Very nice screen, congratulations! I will test it in the evening. (I'll also check your problem with the fields.)

I have some remarks.
- In the past I also made modifications in the default screenset, but lot of UCCNC updates change the screen too. There may be new buttons, fields or settings. I saw the next version on an exhibition in Debrecen, it has a lot of new fields and some new settings. So, if you want to use the up to date screenset, you have to make the modifications again. Writing plugins is a better solution from this aspect as it works with the newer versions, usually without any modifications.
- Your probe screen works only with UC300ETH_5LPT, other devices show the standard CAM screen. (Another vote on plugins. :))
- Not important, just a remark to your blog: 1.2031 was the first release which saves the user fields. (Maybe 1.2030, but I didn't see that.)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: My probing screen and macros

Postby A_Camera » Tue May 02, 2017 11:51 am

Hi,
dezsoe wrote:Very nice screen, congratulations! I will test it in the evening. (I'll also check your problem with the fields.)


Thank you for the comments. I would really like to know why the filed is misbehaving for me.

dezsoe wrote:I have some remarks.
- In the past I also made modifications in the default screenset, but lot of UCCNC updates change the screen too. There may be new buttons, fields or settings. I saw the next version on an exhibition in Debrecen, it has a lot of new fields and some new settings. So, if you want to use the up to date screenset, you have to make the modifications again. Writing plugins is a better solution from this aspect as it works with the newer versions, usually without any modifications.
- Your probe screen works only with UC300ETH_5LPT, other devices show the standard CAM screen. (Another vote on plugins. :))
- Not important, just a remark to your blog: 1.2031 was the first release which saves the user fields. (Maybe 1.2030, but I didn't see that.)


Thank you for the remarks. I don't know if I'll make it into a plugin, perhaps later, but until then I will keep it as it is.

Thanks for pointing out the issue, I didn't think about that it will only work with the UC300ETH, I thought those screens were global for all. Anyway, for me it is not an issue, but yes it will be noted on my blog. Also, I don't know when the user fields got introduced, but in any case, 1.2037 is I think the first official version with that feature.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: My probing screen and macros

Postby ger21 » Tue May 02, 2017 11:58 am

Thanks for pointing out the issue, I didn't think about that it will only work with the UC300ETH, I thought those screens were global for all.


In the .ssf file, each device actually has it's own screen. So, when you modify the screen, you are only modifying it for the device that you are using.
When I make changes to my 2017 screen, after making the initial changes with the screen editor, I then open the .ssf file in Notepad and copy the changes to all the different device sections. Rather tedious, but I find it to be the easiest way. Using "Find" makes it go quicker.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: My probing screen and macros

Postby A_Camera » Tue May 02, 2017 1:12 pm

ger21 wrote:
Thanks for pointing out the issue, I didn't think about that it will only work with the UC300ETH, I thought those screens were global for all.


In the .ssf file, each device actually has it's own screen. So, when you modify the screen, you are only modifying it for the device that you are using.
When I make changes to my 2017 screen, after making the initial changes with the screen editor, I then open the .ssf file in Notepad and copy the changes to all the different device sections. Rather tedious, but I find it to be the easiest way. Using "Find" makes it go quicker.

Yes thanks. That's what I was planning to try later on when I have time and when the user field issue is solved. ...or I just describe how to do it and let each and every user do it. For me only the one for the UC300ETH is needed.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: My probing screen and macros

Postby A_Camera » Wed May 03, 2017 2:03 pm

I created a simple installation document describing how to install the screen for another motion controller than the UC300ETH_5LPT I am using. I tested for the UC100, UC400ETH and the UC300_5LPT and for the demo version it seems to work. Manual editing is necessary, but it takes less than 10-15 minutes, considerably faster than it would take adding all the buttons and placing them right, as well as editing/creating all the other items.

Note that I am not running UCCNC in maximized size. I don't know if it matters for the installation procedure or not. Hopefully not.

Installing the Probe screen.txt
(8.4 KiB) Downloaded 1618 times
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: My probing screen and macros

Postby A_Camera » Fri May 05, 2017 4:15 pm

I made some changes because it seems that the two user fields I used did not work as I expected, but when I changed the type to "fieldnb" type it works without issues. I also created some ssf files for a few controllers, if you have any of those then installation is really simple. Note that I will not post a direct link to the files and you can only access them through my blog post link. The reason is simple, by doing this change I realized that if I am going to any more changes I will eventually lose tracks of where I posted a link. and which links are updated. I will keep my blog post updated and link to that instead, this is much easier for me.

https://adapting-camera.blogspot.se/2017/05/uccnc-probing-screen-and-macros.html

Note that you will need both zipped files, one contains the macros and the images, the other the ssf and text files.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: My probing screen and macros

Postby A_Camera » Sun May 07, 2017 8:31 pm

I have just published a short movie about the most complicated button and also how to make the outer centering button work with larger objects. It is a sort of an instruction and demo movie about the Probe screen.



Also made some update to the blog post about the screen, as well as added some ssc screen files for some controllers and better installation instructions.

https://adapting-camera.blogspot.se/2017/05/uccnc-probing-screen-and-macros.html
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: My probing screen and macros

Postby A_Camera » Fri May 12, 2017 9:36 am

Credit to forum member dezsoe, who proposed some changes in the installation procedure. Thanks a lot dezsoe, I appreciate you taking the time for this and for sending me the PM about the proposals. I made some small additional changes and added a missing line plus moved the addtab to the ssf file and also wrote an installation instruction which I share with others here.

I am also working on some radical improvements and changes, additionally improving the usefulness and functionality, but this will come later.

The new installation procedure is much simpler and considerably more flexible, making it easy to modify for any controller. Also, this installation is non-destructive, meaning that the CAM is back, accessible from the same tab as before. Small changes are made to to the main screen, the UCCNC logo is a bit reduced in size and moved down to make room for the new, Probe tab, which calls the new screen.

The constructor macro needs to be updated with the new one, since much of the instructions needed for the Probe function are moved into the M99998.txt macro.

Code: Select all
Probe screen and function installation instructions:

Make a backup copy of your Defaultscreenset.ssf and every file you are changing, before making a change, in case you need it later.

Create a new folder called "MyProbeBMP" under your \Flashscreen\BMP folder.
Extract and save the png files in the newly created folder.
Extract and save the provided macro files for the buttons in your macro folder, for example \Profiles\Macro_Default.
Don't save the M99998.txt macro file, we will create a new one.

After the installation is completely finished there will be a new, "Probe" tab on the top right above the CNC Drive logo.
The logo will be reduced in size by 10% and moved down a few pixels to make room for the new Probe tab.

The CAM tab is accessible, the new installation is not replacing it with the Probe tab.
The Probe tab will call the Probe layer (#200) which is the new screen.
The CAM layer (#45) is not touched by this installation.

Work to be done in the screen set file:

1. Open the "Defaultscreenset.ssf" file.
2. Find the "//REGION UC300ETH_5LPT" section or the one matching your controller.
3. Find the "//Load images for main screen" section and add the following just below the line:

AS3.Loadpicture("BMP/MyProbeBMP/Inner_Center_X_Y_up.png", "BMP/MyProbeBMP/Inner_Center_X_Y_down.png",200, false);
AS3.Loadpicture("BMP/MyProbeBMP/Outer_Center_X_Y_up.png", "BMP/MyProbeBMP/Outer_Center_X_Y_down.png",201, false);
AS3.Loadpicture("BMP/MyProbeBMP/XY_Zero_up.png", "BMP/MyProbeBMP/XY_Zero_down.png",202, false);
AS3.Loadpicture("BMP/MyProbeBMP/X_Center_up.png", "BMP/MyProbeBMP/X_Center_down.png",203, false);
AS3.Loadpicture("BMP/MyProbeBMP/X_minus_up.png", "BMP/MyProbeBMP/X_minus_down.png",204, false);
AS3.Loadpicture("BMP/MyProbeBMP/X_plus_up.png", "BMP/MyProbeBMP/X_plus_down.png",205, false);
AS3.Loadpicture("BMP/MyProbeBMP/Y_plus_up.png", "BMP/MyProbeBMP/Y_plus_down.png",206, false);
AS3.Loadpicture("BMP/MyProbeBMP/Y_minus_up.png", "BMP/MyProbeBMP/Y_minus_down.png",207, false);
AS3.Loadpicture("BMP/MyProbeBMP/Y_Center_up.png", "BMP/MyProbeBMP/Y_Center_down.png",208, false);
AS3.Loadpicture("BMP/MyProbeBMP/Z_Tool_Height_up.png", "BMP/MyProbeBMP/Z_Tool_Height_down.png",209, false);
AS3.Loadpicture("BMP/MyProbeBMP/Probe_screen.png", "BMP/MyProbeBMP/Probe_screen.png",210, false);
AS3.Loadpicture("BMP/MyProbeBMP/Probe_all_up.png", "BMP/MyProbeBMP/Probe_all_down.png",211, false);
AS3.Addtab("", "Arial", "center", 24, 0, 930, 7, 69, 18, 211, 200, 1);

4. Find the following line:

AS3.Addbutton(915, 11, 100, 100, false, false, 63, 0, 1);

5. Replace with:

AS3.Addbutton(920, 30, 90, 90, false, false, 63, 0, 1);

6. Find the "//Add codeviews to main screen" section and add the following line:

AS3.Addcodeview("", "Arial", "left", 18, -1, 670, 274, 206, 339, 200);

7. Save and close the file. This completes the changes in the ssf file.

Creating a new constructor macro:

If you have not made any changes to your M99998.txt macro then you can just replace it with the one included here.
If you have made changes previously then you have to copy the contents of the M99998.txt macro included here and
paste the contents into your own file.

After starting UCCNC in the top right corner you should see the new Probe tab, which leads you to the probe screen.


This is the new M99998.txt macro:

Code: Select all
//This is the Constructor macro which executes once when the application gets loaded
//------------------------------------------------------------------------------------------------------------------------------------
//
//   Add background for the Probe screen
//
    AS3.Addbackground(0, 0, 1024, 692, 210, 11, 200);

//
//   Add buttons to the Probe screen
//
    AS3.Addbutton(156, 150, 100, 100, false, false, 205, 20033, 200);
    AS3.Addbutton(51, 150, 100, 100, false, false, 204, 20032, 200);
    AS3.Addbutton(51, 255, 100, 100, false, false, 206, 20034, 200);
    AS3.Addbutton(51, 360, 100, 100, false, false, 207, 20035, 200);
    AS3.Addbutton(261, 42, 109, 422, false, false, 209, 20031, 200);
    AS3.Addbutton(51, 45, 206, 100, false, false, 203, 20037, 200);
    AS3.Addbutton(156, 254, 100, 207, false, false, 208, 20036, 200);
    AS3.Addbutton(51, 475, 50, 40, true, false, 8, 118, 200);
    AS3.Addbutton(108, 475, 50, 40, true, false, 9, 119, 200);
    AS3.Addbutton(165, 475, 50, 40, true, false, 10, 120, 200);
    AS3.Addbutton(222, 475, 50, 40, true, false, 11, 121, 200);
    AS3.Addbutton(279, 475, 50, 40, true, false, 12, 122, 200);
    AS3.Addbutton(336, 475, 50, 40, true, false, 13, 123, 200);
    AS3.Addbutton(375, 185, 135, 135, false, false, 200, 20039, 200);
    AS3.Addbutton(375, 45, 135, 135, false, false, 202, 20038, 200);
    AS3.Addbutton(375, 325, 135, 135, false, false, 201, 20040, 200);
//
//   Add fields to the Probe screen
//
    AS3.Addfield("", "Arial", "center", 16, -16777216, 532, 179, 130, "fieldnb", 0, 50, 20002, 200);
    AS3.Addfield("", "Arial", "center", 16, -16777216, 532, 229, 130, "fieldnb", 0, 8, 20003, 200);

    AS3.Addfield("", "Arial", "center", 16, -16777216, 532, 379, 130, "showfieldnb", Double.MinValue, Double.MaxValue, 868, 200);
    AS3.Setfieldtext(AS3.Getfield(868), 868);
    AS3.Validatefield(868);
    AS3.Addfield("", "Arial", "center", 16, -16777216, 532, 429, 130, "textfieldnb", Double.MinValue, Double.MaxValue, 226, 200);
    AS3.Validatefield(226);
    AS3.Addfield("", "Arial", "center", 16, -16777216, 532, 479, 130, "textfieldnb", Double.MinValue, Double.MaxValue, 227, 200);
    AS3.Validatefield(227);
    AS3.Addfield("", "Arial", "center", 16, -16777216, 532, 529, 130, "textfieldnb", Double.MinValue, Double.MaxValue, 228, 200);
    AS3.Validatefield(228);
    AS3.Addfield("", "Arial", "center", 16, -16777216, 532, 579, 130, "textfieldnb", Double.MinValue, Double.MaxValue, 229, 200);
    AS3.Validatefield(229);

    AS3.Addfield("", "Arial", "left", 18, -12212238, 600, 630, 297, "textfieldnb", 0, 0, 1000, 200);
    AS3.Addfield("", "Arial", "left", 15, -1, 645, 652, 257, "showfieldnb", Double.MinValue, Double.MaxValue, 877, 200);
    AS3.Addled(580, 635, 6, 30, false, 68, 216, 200);
//
//   Add tool path display to the Probe screen
//
    AS3.Addtoolpath(671, 53, 228, 216, 200);
//
//   Update the user fields of the Probe screen with the previously saved values.
//
    AS3.Setfield(Convert.ToDouble(exec.Readkey("UserTextfields", "20002", "0.0")), 20002);
    AS3.Validatefield(20002);
    AS3.Setfield(Convert.ToDouble(exec.Readkey("UserTextfields", "20003", "0.0")), 20003);
    AS3.Validatefield(20003);
//
//   This completes the constructor macro file.
//
//------------------------------------------------------------------------------------------------------------------------------------


After the installation the screen should look something like this:
Attachments
ProbeTab.jpg
ProbeTab.jpg (44.41 KiB) Viewed 36475 times
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: My probing screen and macros

Postby A_Camera » Fri May 12, 2017 8:27 pm

Please disregard the above installation routine because I think there is an error in it somewhere. It seems that it is working, but if the screen editor is opened and then saved the results are that the screen items are multiplied, saved every time. I don't know if it supposed to be so or not, but it is not good. It also results in the field texts getting thicker and stronger every time this happens. So, until this is investigated don't use the above instructions, use the one on my blog.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Next

Return to Custom Screensets

Who is online

Users browsing this forum: No registered users and 1 guest

cron