Machsupport Forum
Mach Discussion => Mach Screens => Topic started by: corydoras on February 13, 2021, 03:06:40 PM
-
I use a USB motion controller for Mach 3. These do not support use of softlimits unfortunately.
I input all my positions manually on the DRO on a custom screenset.
BUT I would like to know if anyone has any experience on solving the issue with the missing softlimits?
Is there a way of setting a max-min value for each DRO input value, and have a pop-up msg if a value is entered outside this range, by use of a basic script?
Best regards
Roy
-
there is no possibilty (ok i do not know one), to set a Min/Max range for a partucular DRO.
here:
https://www.machsupport.com/forum/index.php?topic=36213.msg247828#msg247828
i posted a numeric Keyboard Input possibilty via VB, there is would be easy to inplement.
-
Thanks for the reply Thomas.
I use your onscreen keyboard, and it is GREAT, thanks man.
So making a couple of lines with a >= or =< would be harder to implement in the keyboard macro as it would have to know what DRO it is writing to.
If there was a specific macro that was called for each axis, would it be possible then?
Like:
numerkkeyboard_x_axis.m1s
numerkkeyboard_y_axis.m1s
numerkkeyboard_z_axis.m1s
BTW. I picked up the work on my table saw screenset, and the fingerjoint wizzard you made for me.
When I finish the sled , I will make a YT video on it. If it is OK with you, I might shoot you an email with a couple of questions in a day or 2.
Have a great day Sir
Best regards
Roy
there is no possibilty (ok i do not know one), to set a Min/Max range for a partucular DRO.
here:
https://www.machsupport.com/forum/index.php?topic=36213.msg247828#msg247828
i posted a numeric Keyboard Input possibilty via VB, there is would be easy to inplement.
-
Just did a little more testing, and it actually turns out that the Softlimit switches work when jogging the axis in manual mode. But if you input a value outside the limits in the MDI, it moves beyond the softlimits.....hmmmmm funny
BR
Roy
-
the macro "knows" allready witch DRO it has to write too. it knows it form the
function call:
call NumericKeyboard(800)
because 800 (in this example) is the dro number
here:
'numeric Keyboard with MIN/MAX value
Function NumericKeyboard(ByVal DRONum as Integer , ByVal Min as Double , ByVal Max as Double) As Double
Dim title as String
value = GetOemDRO(DRONum)
title = Header
Begin Dialog UserDialog1 60,60, 105, 210, "Eingabe:" , .Enable
PushButton 10, 10, 25, 25, "7", .but7
PushButton 40, 10, 25, 25, "8", .but8
PushButton 70, 10, 25, 25, "9", .but9
PushButton 10, 40, 25, 25, "4", .but4
PushButton 40, 40, 25, 25, "5", .but5
PushButton 70, 40, 25, 25, "6", .but6
PushButton 10, 70, 25, 25, "1", .but1
PushButton 40, 70, 25, 25, "2", .but2
PushButton 70, 70, 25, 25, "3", .but3
PushButton 10, 100, 25, 25, ".", .butD
PushButton 40, 100, 25, 25, "0", .but0
PushButton 70, 100, 25, 25, "<-", .butB
PushButton 10, 130, 25, 25, "+/-", .butN
PushButton 40, 130, 25, 25, "Del", .butDel
TextBox 10, 160, 85, 18, .FText
PushButton 10, 185, 40, 21,"OK", .OK
CancelButton 55, 185, 40, 21
End Dialog
Dim Dlg1 As UserDialog1
Dlg1.FText = CStr(value)
x = Dialog( Dlg1 )
NumericKeyboard = CDbl(Dlg1.FText)
If CDbl(Dlg1.FText) < Min Then NumericKeyboard = Min
If CDbl(Dlg1.FText) > Max Then NumericKeyboard = Max
SetOEMDro(DRONum,NumericKeyboard)
End Function
is the code with MIN/MIX check included
the call would be:
call NumericKeyboard(800,0,400)
with call NumericKeyboard(DRO number,MIN,MAX)
this part of the code:
NumericKeyboard = CDbl(Dlg1.FText)
If CDbl(Dlg1.FText) < Min Then NumericKeyboard = Min
If CDbl(Dlg1.FText) > Max Then NumericKeyboard = Max
SetOEMDro(DRONum,NumericKeyboard)
does the check AND writes the value into the given DRO number
-
Hello Thomas
I tried this version of the numeric keyboard with the min max function, and it works great.
In the beguinning I had some issues, but I found that I had aso deleted the commands after the "end function"
Thanks again Sir
BR
Roy