Tuesday, 2 May 2017

UCCNC probing screen and macros

The flash adapters I am making demand a pretty complicated 3D milling. It may not look complicated to everyone, but each adapter is milled and/or drilled on five of the six sides, must be turned around several times and accuracy is very critical. To be able to turn around the same work piece several times during the milling and drilling process, as well as changing tools requires a number of setting changes on all three axes.

To be able to use UCCNC and almost fully move away from Mach3 I needed to create a number of probing macros. Mach3 uses Visual Basic and UCCNC uses C#, so all the macros had to be rewritten for UCCNC.

To make the macros more user friendly and not have to type in the macro file name every time I created a folder and buttons. This way I get direct access to the macros I frequently use.



Also added to the folder two user fields, one for the probe diameter and the other for the plate thickness values. These two parameters are used by most of the macros, so they are global values.

The new PROBE folder 


In UCCNC there is a simple CAM which I don't find very useful. I decided to removed it and replaced with the PROBE folder. I kept most of the window layout but changed the field labels and added buttons also for the offsets to be able to select which offset should get which probing result. Note that Z tool height is global, so all offsets are set to the value, regardless which offset is active at the time of probing Z.

Download and use as you like


If you are interested in having a look or using my Probe screen, buttons and macros then you can download the zipped file from this link:

https://drive.google.com/file/d/0B_50s_KFlpQqM3JKU1dxREF1bDg/view?usp=sharing

There is also a file describing how to install the screen and also a few ssf files for some of the controllers. Please download this file:

https://drive.google.com/file/d/0B_50s_KFlpQqbDJGcUM4UUY4c0E/view?usp=sharing

Follow the instructions carefully, otherwise the installation may fail and you may experience problems. Start with taking a backup of your screen file, in my case the Defaultscreenset.ssf file.

File contents


The MyProbeScreenset.zip file contains two folders, the MyProbeBMP with all the images and the MyProbeMacros folder with all the macro files necessary to run this function.

The MyProbeMacros folder contains ten probing macros, one for each button. These are commented inside the macro files. There is also the constructor macro. If you want to use my probing macros as they are, it is necessary to add those four lines to your constructor macro, otherwise the Plate thickness and Probe diameter fields will not be kept and updated after each start of UCCNC. Copy all the txt macro files into the folder where you have your UCCNC macro files for your configuration, for example \UCCNC\UCCNC_1_2037\Profiles\Macro_Myprofile folder.

The MyProbeBMP folder contains all the bitmap images necessary for the PROBE folder window to appear in UCCNC. Copy all the files into your UCCNC installation BMP folder, for example the \UCCNC\UCCNC_1_2037\Flashscreen\BMP\Defaultscreenset folder.

Also included some screenset.ssf, files for a few controllers. If you have never made any changes to your screens, you could just replace the contents of your controllers screenset with the one included and off you go, using my new screen. Note that you should not just rename the included file and call it Defaultscreenset.ssf because that will eventually lock UCCNC and crash the application. Follow the instructions below. Note also that the CAM will no longer be available after installation. Take a backup of your Defaultscreenset.ssf file before making changes.

Quick installation of the ssf file


Included you will find some ssf files for a few UCCNC motion controllers. If you find you model you can just open your user ssf file, for example the Defaultscreenset.ssf file, find the region for your controller, delete that section and place the contents of the section for your controller included here, for example the contents of UC300_5LPT_Defaultscreenset.ssf file, into the Defaultscreenset.ssf.
You can place it at the very end of the Defaultscreenset.ssf or at the beginning, or simply paste it after any //ENDREGION part in Defaultscreenset.ssf file UCCNC will find it at start. If the ssf file for your controller is not included here or you have made other changes in your own screen which you want to keep, then you have to follow the instructions below. Installing it this way is very fast, but it is not an automated process, takes maybe 5-10 minutes.

If your controller is not included


The second fasted option is to follow the Installing the Probe screen.txt installation manual. You will need to follow those instructions very carefully, letter for letter, otherwise you will/may end up with problems. The installation instructions have been tested many times, so if you carefully read and follow then after about 10-15 minutes you will have the Probe screen running.

Slow installation


The last and slowest way of installing is doing it through the screen editor. You need to add each image manually, using the UCCNC screen editor. This gives you the liberty to design your own layout if you wish to do that, but it takes a while. The screenset file is a simple text file, but unless you do it right, you might end up with trouble. I am not able to assist in this process or help out with the screen editor. Use and read the manual or contact CNC Drive support, or any of the discussion forums on the web if you have questions about the "how to..."

How to change some default parameters


The macro files have been created for my needs, so they may not suit yours. Also note that these files are written for metric units, so if you use imperial units then you MUST change in these files because the moves will be too fast and too large for imperial units. I will not be able to do all the changes, you have to fight your way through in that case.

However, I made a short video to demonstrate how to use the most complicated button and change the probing area for that button. Watch this and regard it as a demonstration and an instruction video.



A final note


This is offered in an "as is" basis. You are free to download, distribute, use or change it as you like. I cannot promise any support and no warranties are given. The macros work just fine for me in my installation, but I have no time in supporting it unless I have a need in doing a change or improvement for my own use. Please note also that I only tested with the UC300ETH_5LPT.

No comments:

Post a Comment