Hello Guest it is December 05, 2024, 11:46:53 AM

Author Topic: Comparing DRO´s in a Brain  (Read 4468 times)

0 Members and 1 Guest are viewing this topic.

Comparing DRO´s in a Brain
« on: January 14, 2020, 05:55:52 AM »
In a custom screenset I am using a compare function of an OEM DRO and an axis DRO to set a OEM LED to green if the axis has moved to the correct position (same as the OEM DRo). This is working in most cases, BUT; Sometimes the positioning is just a little off maybe 1/1000 mm. This does not matter , but as this is not an excact equal value in the compare, the led does not turn green. I have good resolution in the motor tuning with approg 600 steps/mm (no deciaml after comma) , so I am not sure why it sometimes calculates off.

My question is; Are there any way of writing a formula in a brain that says something like this;  (A = B +/-0.250) ( I know this is not mathematically correct, but hopefully gets the explanation up front)

In PLC programming it is possible to write a compare block like this: Variable1 < Variable2 + 0.025  AND Variable1 > Variable2 - 0.025 -----> Output

Or, could Mach3 be set up to use lesser digits? ( I think I have read somwhere that there are actually lots more digits in the code of the program, but not more than 4 after comma is shown in the DRO.

Any good suggestion on how to solve this issue is greately appreciated

Best regards
Roy
« Last Edit: January 14, 2020, 06:05:44 AM by corydoras »

Offline TPS

*
  •  2,535 2,535
Re: Comparing DRO´s in a Brain
« Reply #1 on: January 14, 2020, 07:22:58 AM »
here is a small sample

added 0.125 to dro(1300) and stored it in dro(1301)
subtracted 0.125 from dro(1300) and stored it in dro(1302)

then compared both with x-axis dro and result is Led(1300)

not tested just written down
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Comparing DRO´s in a Brain
« Reply #2 on: January 14, 2020, 07:36:08 AM »
Thanks a lot Thomas
That is PLC code alright:)

I will try this out.
BTW, the saw build is coming along well, and phase 2 of the build will include yur genious fingerjoint jig:)

Thanks again

Best reg
Roy
Re: Comparing DRO´s in a Brain
« Reply #3 on: January 14, 2020, 12:53:12 PM »
Hi Thomas.
The brain worked just as intended. Thank you very much Sir, and have a great afternoon

Best reg
Roy