Looking for an PAID expert at UCCNC macro writing

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Looking for an PAID expert at UCCNC macro writing

Postby twedlake » Thu Nov 07, 2024 4:00 pm

I am looking for someone I can pay to fix a macro written by someone else for 3 axis, simultaneous probing. Looking to do this via sidebar, not through the forum, as I want a single source to assist me instead of varying opinions. Anyone willing to assist? twedlake at outlook dot com is my email address.
twedlake
 
Posts: 18
Joined: Mon Mar 28, 2022 2:19 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby cncdrive » Thu Nov 07, 2024 7:32 pm

What do you mean by "Simultanous"?
You mean to probe one axis and after the other and after the third?
Or you mean to probe on all 3 axis the same time with all 3 axis moving the same time?

The first is possible with the UCCNC.
This second is currently not possible with the UCCNC.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby twedlake » Sat Nov 09, 2024 2:56 pm

cncdrive wrote:What do you mean by "Simultanous"?
You mean to probe one axis and after the other and after the third?



Yes this is correct.

Probe Y, then X, then probe Z (or sequence doesn't really matter), setting zero for each axis in the software.

I have a macro from Triquetra from when I purchased my probe block from them but it probes oddly in that if I place the probe at the bottom left corner of my materials, then this macro probes from the top right of the probe and when it touches the probe on x or y, it move the probe therefore it's not accurate - z works fine. Although being 40 years IT, I am not a developer and do not understand C# enough to be able to determine where in the macro these steps are occurring and changing it.

this is what it's doing wrong - skip to 7:47 where the sequence starts. it should not be probing the bottom left corner of the material from the top right of the probe - this makes no sense. I can certainly take a video of mine as well but this video shows you how it's searching for zero on each axis.
https://www.youtube.com/watch?v=UGf6Bpv ... rleyThomas

This is what I would expect it to do.
https://www.youtube.com/watch?v=aVZYFji ... rintronics

I've attached the macro so you can look at it if you want to and I thank you!
Attachments
M31-triquetra 4-6-2024.txt
Triquetra M31 macro
(24.04 KiB) Downloaded 65 times
twedlake
 
Posts: 18
Joined: Mon Mar 28, 2022 2:19 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby RsX » Sat Nov 09, 2024 5:02 pm

It seems pretty logic and safe what the probe does in the video.
At 7:00 you can see, on the left side, another touchplate upside down.
There are two shoulders machined on the bottom side of the block and the distances from each of the shoulder to the other side of the block are known in both X and Y direction and are set in the macro.
This way when the machine touches the block on the right side it knows it is X_distance + half the diameter of the tool away from the left side of the part.
Also if the machine doesn't stop the block is just pushed away and you have time to safely stop the machine.
User avatar
RsX
 
Posts: 31
Joined: Fri Oct 25, 2024 9:22 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby twedlake » Sat Nov 09, 2024 5:41 pm

it's pushing the block off the material so safe or not, it's not accurate
twedlake
 
Posts: 18
Joined: Mon Mar 28, 2022 2:19 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby RsX » Sat Nov 09, 2024 6:48 pm

I could answer that you can hold the block against the material, but that wouldn't be safe, right? :mrgreen:
Maybe the machine moves too fast. I see the macro calculates automatically the fast and slow feedrate.
What are the feedrates it uses? Maybe you could try manually setting a slower value.
User avatar
RsX
 
Posts: 31
Joined: Fri Oct 25, 2024 9:22 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby RsX » Sat Nov 09, 2024 7:12 pm

Also it is not hard to change the logic of the probing, nor it is required to understand C#. All you need is notepad++ and its C# code highlighting
I just changed a couple of signs in X and Y gcode moves and in newX/Y calcuation and it should do what you want.
Code: Select all
if(stMethod == "1") // Left  Front Corner
  {
// Start the X axis dual probe cycle

  exec.AddStatusmessage("Executing Left Front Corner Probe Cycle.....");
  double dblZero = 0;
  exec.ChangeaxisDROvalue(0, dblZero.ToString()); //Change the DRO value
  exec.Wait(200);
  exec.ChangeaxisDROvalue(1, dblZero.ToString()); //Change the DRO value
  exec.Wait(200); 
  exec.ChangeaxisDROvalue(2, dblZero.ToString()); //Change the DRO value   
  exec.Wait(200);
  exec.Code("G31 X" + move1 + " F" + FeedrateFast);
  while(exec.IsMoving()){}
  exec.Wait(200);
  exec.Code("G91 G0 X-" +  move020);
  while(exec.IsMoving()){}
  exec.Wait(200);

  exec.Code("G31 X" + move1 + " F" + FeedrateSlow);
  while(exec.IsMoving()){}
  exec.Wait(200);
  newX = - newX - newBitR;
  exec.ChangeaxisDROvalue(0, newX.ToString());
  exec.Wait(200);

// Reposition for Y Zeroing.
  exec.Code("G91 G0 X-" +  move125);
  exec.Code("G91 G0 Y-" +  move1);
  exec.Code("G91 G0 X" +  move625);
  exec.Code("G31 Y" +  move1 + " F" + FeedrateFast);
  while(exec.IsMoving()){}
  exec.Wait(200);
  exec.Code("G91 G0 Y-" +  move020);
  while(exec.IsMoving()){}
  exec.Wait(200);
  exec.Code("G31 Y" +  move1 + " F" + FeedrateSlow);
  while(exec.IsMoving()){}
  exec.Wait(200);
  newY = - newY - newBitR;
  exec.ChangeaxisDROvalue(1, newY.ToString());
  exec.Wait(200); 
//Reposition for Z Zeroing
  exec.Code("G91 G0 Y-" +  move125);
  exec.Code("G91 G0 Z" +  move1);
  exec.Code("G91 G0 Y" +  move625);

// Start Z Axis Zeroing
  exec.AddStatusmessage("Executing Z Axis Only Probing....");
  exec.Code("G31 Z" + Zmin + "F" + FeedrateFast); // Do the Z probing With Fast feedrate first
  while(exec.IsMoving()){}
  exec.Wait(200);
  exec.Code("G91 G0 Z" + RetractForSecondMeasurement);
  while(exec.IsMoving()){}
  exec.Code("G90");
  exec.Wait(200);
// Start the second for the dual probe cycle Or the only probe in a single cycle setup.
  exec.Code("G31 Z" + Zmin + "F" + FeedrateSlow); // Do the Z probing again With Slow Feedrate To Get a more accurate reading
  while(exec.IsMoving()){}
  exec.Wait(200);

  //newZ = newZ - Nominal;

  exec.ChangeaxisDROvalue(2, newZ.ToString()); //Change the DRO value
  exec.Wait(200);  //Safety wait For the UC100 syncronisation

// Restore original modes And feed
  exec.Code("G" + CurrentDistanceMode); // Set Distance Mode back To previous (G90, G91, Etc)
  exec.Code("G" + CurrentModalMode); // Set Modal Mode back To previous (G0, G1, etc)
  exec.Code("F" + CurrentFeed); // Set Feedrate back To previous
  AS3.Setfield(CurrentFeedOverride, 232); // Set FeedOverride back
  AS3.Validatefield(232); // Validate To field value

  exec.Wait(200);

  exec.AddStatusmessage("Probe Complete.");

  if(!exec.Ismacrostopped()) // If tool change was not interrupted with a stop only then validate new tool number
        {
    double Zup = exec.GetZmachpos() + RetractHeight;

    if(Zup > SafeZ)
                                                                                                                {
      Zup = SafeZ;
        }
 exec.Code("G00 G53 Z" + Zup); // Move 10mm above probe plate
 while(exec.IsMoving()){}
 exec.Wait(200);
 MessageBox.Show("***WARNING*** PROBE CYCLE COMPLETED. PLEASE REMOVE YOUR TOUCH PLATE AND WIRING FROM THE MACHINING AREA.");
    }
}
User avatar
RsX
 
Posts: 31
Joined: Fri Oct 25, 2024 9:22 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby twedlake » Sat Nov 09, 2024 9:41 pm

I appreciate the responses and please don't take this the wrong way, this is exactly why I offered to pay someone directly to do this for me.

I have no clue what you changed, also have no clue that what you changed won't brick my machine. I also have no clue what to do with the code above. Are you expecting me to copy and paste it to replace that exact same section in the macro I attached?

what exactly am I to expect to see if I do so and enable this as M31?
twedlake
 
Posts: 18
Joined: Mon Mar 28, 2022 2:19 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby twedlake » Sat Nov 09, 2024 9:45 pm

RsX wrote:I could answer that you can hold the block against the material, but that wouldn't be safe, right? :mrgreen:
Maybe the machine moves too fast. I see the macro calculates automatically the fast and slow feedrate.
What are the feedrates it uses? Maybe you could try manually setting a slower value.


maybe this is part of the problem. By "eye", it looks like the initial speed for initial touch is too fast, hence the reason it's pushing the probe puck when it initially touches it. How does it know what speed to move if it's automatic? Automatic to what?

Based on my UCR201 speeds, I'm guessing the initial speed it moves towards probe is way above 10% but well below 100% speed. Maybe 50 - 60 % - how does this work in respect to automatic calculation?

The 2nd touch appears to move at the same speed at UCR201 if I set it at 1%. super slow which is what I'd expect.
twedlake
 
Posts: 18
Joined: Mon Mar 28, 2022 2:19 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby RsX » Sat Nov 09, 2024 10:32 pm

You can exactly see what has been changed using Notepad++ and its compare tool.
The beauty of code that is compiled at run time is that you can clearly see what it does and you don't have to thrust an anonymous exe.
macro m31.png

what I ended up with is exactly the code for a right back corner probe.
If you want to try just keep your feed override very low, start in a position for X probing, don't jam the puck between the tool and the part but rather keep it floating, and hand on e-stop. Just the usual drill.

Here you can change the FeedrateFast and FeedrateSlow to whatever you like. If they are not zero the macro won't calculate them.
For Z probing I use 100mm/min and 25mm/min (about 1% and 0.3% of my max speeds of 9000mm/min). Be careful to use the correct units imperial/metric.
free world.png

Start setting the correct feedrates because if the actual ones are so fast that move the puck during probing, you might end up breaking the tool and/or crashing the machine probing with the inverse logic.
User avatar
RsX
 
Posts: 31
Joined: Fri Oct 25, 2024 9:22 pm

Next

Return to Macros

Who is online

Users browsing this forum: No registered users and 0 guests