Hello Guest it is May 02, 2024, 08:54:32 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TPS

571
VB and the development of wizards / Re: Help to finish a button
« on: February 18, 2021, 08:44:46 AM »
Code: [Select]
Sleep 500

'clear x-axis Limit Switch if needed
If GetOEMLed(830) then
    Code "G91 G1 X10 F100"
    Code "G90"
    While IsMoving()
    Wend
'!!!!!!!!!!!!!!! I A PRETTY SURE HERE SHOULD BE A -> End If !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Dobutton( 22 ) ' Zerox

While IsMoving()
Wend

572
General Mach Discussion / Re: Chinese 3040 Engraver Grounding Problem
« on: February 15, 2021, 02:03:49 PM »
have a look here:
https://www.ecmweb.com/construction/article/20897728/failures-in-outlet-testing-exposed

i think good Explanation what the chinese expert did wrong.

here in Germany we had this bootleg ground System until the late 50s, then we understood that it might be dangerous.

573
Mach Screens / Re: Softlimits on RnR card---, min-max input value
« on: February 15, 2021, 01:23:44 AM »
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:

Code: [Select]
'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:
Code: [Select]
  call NumericKeyboard(800,0,400)

with   call NumericKeyboard(DRO number,MIN,MAX)



this part of the code:
Code: [Select]
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

574
VB and the development of wizards / Re: Tool change Macro Issue
« on: February 14, 2021, 10:16:23 AM »
first i would replace:
Code: [Select]
x = GetToolChangeStart( 0 ) ' Get x tool change start position
y = GetToolChangeStart( 1 ) ' Get y tool change start position
z = GetToolChangeStart( 2 ) ' Get z tool change start position

by:
Code: [Select]
x = GetOEMDro( 800 ) ' Get x tool change start position
y = GetOEMDro( 801 ) ' Get y tool change start position
z = GetOEMDro( 802 ) ' Get z tool change start position

this:
Code: [Select]
Call SetUserDRO (1224,NewTool)
does not make sense to me, but don't know wether DRO 1224 is used somewhere else

all this verifycation for tool insert:
Code: [Select]
' Verify Tool Change Complete
Msg = "Please Insert Tool Number " & " ( " & GetSelectedTool() & " ) " & " " & GetToolDesc(NewTool) ' Define message
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons
Style = 0 + 48 + 0 ' Define buttons.
Title = "Tool Change Requested" ' Define title
Help = "DEMO.HLP" ' Define Help file
Ctxt = 1000 ' Define topic 'context. ' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbOk Then ' User chose Ok
MyString = "Ok" ' Perform some action
End If

does not make many sense too, except that the machine is waiting for tool insert, because:
1.the MSG has only a OK button
2.no matter what you do (press OK or the X of msgbox), the rest of code will be done anyway

also no Chance to cancel via MSGBox input.

575
Mach Screens / Re: Softlimits on RnR card---, min-max input value
« on: February 14, 2021, 09:51:18 AM »
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.

576
General Mach Discussion / Re: Mach 3 is not recognizing cutting torch
« on: February 14, 2021, 05:59:00 AM »
if you can post the Profile.xml we can have a look what is configured.

577
General Mach Discussion / Re: Mach3 intervals going 3x as far
« on: February 12, 2021, 11:19:19 AM »
Config -> Motor Tuning -> Step's per for each axis

https://www.machsupport.com/wp-content/uploads/2013/02/Mach3Mill_Install_Config.pdf

chapter 5.5 would be from interest

however the hole Manual might be interesting.

578
to reverse axis you have the following possibilties:

Config -> Ports&Pins -> Motor Outputs -> Dir low active
Config -> Homing/Limits -> Home Neg.

with a combination of both you should be able to bring everything
moving as expected.

579
you can try to set Config -> Home and Softlimits -> Home Off.
for X and Y axis to a value that lower left of table is Zero and not negative:

580
it is allways a bit confusing if you view your table.
movements are allways related from your millbit to the workpiece

so if your table moves to the left millbit related to the worpiece is moving to the right.

i try to explane from Keyboard arrow key's

key left -> X- -> table moves to the right -> millbit on workpiece moves to the left
key right -> X+ -> table moves to the left -> millbit on workpiece moves to the right
key down -> Y- -> table moves up -> millbit on workpiece moves down
key up -> Y+ -> table moves down -> millbit on workpiece moves up

for reference normaly is in your case:
for X table is far right (witch is workpiece related left) and
for Y table is far up (witch is workpiece related down)

after ref all your millbit has to be at the left lower Corner of the table