Page 1 of 1

Probing material hight for WaterJet

PostPosted: Wed Mar 27, 2024 6:23 pm
by Daniel
I need help creating a macro to probe the material on a water jet cutting machine.
The software is UCCNC and the controller is UC300ETH-5LPT.
The problem is that the Z axis has a direct current motor and the material thickness measurement is done analogically through a linear potentiometer.
I think the speed of the motor and the direction are controlled with -10V 0V +10V, and a contact activates the motor.
The linear potentiometer is powered by 10V and has values between 0V and 9.3V.
I understand that the Z Axis must stop when it reaches a certain value of the potentiometer (Ex: 1.5V), and even follow that value if continuous probing is necessary, but how can this be achieved through a macro, I have never worked with analog signals in macros before.
Can someone show me a macro model that would be close to what I need.

Thanks in advance

Re: Probing material hight for WaterJet

PostPosted: Wed Mar 27, 2024 8:02 pm
by cncdrive
You could attach the analog input value to a #var variable, e.g. #100 and then you could call the macro with parameter, like M300 P#100, then in the macro you can use the Pvar variable, it holds the #10 variable value now.

Re: Probing material hight for WaterJet

PostPosted: Thu Mar 28, 2024 5:34 am
by Daniel
Hi
I understand the part with the variable and the macro ;) , my problem is how to control the motor from the macro, it being controlled -10V 0V +10V. I don't think the analog port of UC300ETH-5LPT can output -10V.
And how could I make the ratio between the analog input and the analog output to the motor.
Can you help me with an example?
I'm not very good with programming :oops:
Thanks!