Hello Guest it is March 19, 2024, 04:47:07 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

111
Mach Screens / Re: simple numeric keyboard for input in DRO
« on: May 20, 2023, 10:14:11 AM »
not tested

Code: [Select]

Global value As String

'TPS 01.12.2017
'numerische Eingabe
Function NumericKeyboard(ByVal DRONum As Integer) As Double
Dim title As String
'value = GetOemDRO(DRONum)
title = Header


Begin Dialog UserDialog1 60,60, 195, 180, "Input:"  , .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 100, 10, 25, 25, "X", .butX
PushButton 100, 40, 25, 25, "Y", .butY
PushButton 100, 70, 25, 25, "Z", .butZ
PushButton 100, 100, 25, 25, "A", .butA

PushButton 130, 10, 25, 25, "F", .butF
PushButton 130, 40, 25, 25, "S", .butS
PushButton 130, 70, 25, 25, "M", .butM
PushButton 130, 100, 25, 25, "Sp", .butSp

PushButton 160, 10, 25, 25, "G", .butG

TextBox 10, 130, 175, 18, .FText
PushButton 10, 155, 40, 21,"OK", .OK
CancelButton 55, 155, 40, 21
End Dialog


Dim Dlg1 As UserDialog1

'Dlg1.FText = CStr(value)
Dlg1.FText = ""
x = Dialog( Dlg1 )

'NumericKeyboard = CDbl(Dlg1.FText)
If x <> 0 Then
'SetOEMDro(DRONum,CDbl(Dlg1.FText))
Code Dlg1.FText
End If
End Function

Function Enable( ControlID$, Action%, SuppValue%)

Select Case Action%
Case 1

Case 2 'Button wurde gerückt
If ControlID$ = "but0" Then
value = CStr(value) + "0"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but1" Then
value = CStr(value) + "1"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but2" Then
value = CStr(value) + "2"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but3" Then
value = CStr(value) + "3"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but4" Then
value = CStr(value) + "4"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but5" Then
value = CStr(value) + "5"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but6" Then
value = CStr(value) + "6"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but7" Then
value = CStr(value) + "7"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but8" Then
value = CStr(value) + "8"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "but9" Then
value = CStr(value) + "9"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butD" Then
   If InStr(1,value,".") = 0 Then
value = CStr(value) + "."
DlgText "FText", CStr(value)
Enable =1
   End If
End If
If ControlID$ = "butB" Then
value = Left(value,Len(value)-1)
DlgText "FText", CStr(value)
Enable =1
End If

If ControlID$ = "butX" Then
value = CStr(value) + "X"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butY" Then
value = CStr(value) + "Y"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butZ" Then
value = CStr(value) + "Z"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butA" Then
value = CStr(value) + "A"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butF" Then
value = CStr(value) + "F"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butS" Then
value = CStr(value) + "S"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butM" Then
value = CStr(value) + "M"
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butSp" Then
value = CStr(value) + " "
DlgText "FText", CStr(value)
Enable =1
End If
If ControlID$ = "butG" Then
value = CStr(value) + "G"
DlgText "FText", CStr(value)
Enable =1
End If


If ControlID$ = "OK" Then
Enable = -1
End If
Case 3 'Text verändert
'MsgBox Dlg1.FText
Case Else
End Select

'Wert zurückgeben
If Enable = -1 Then
Enable = value
End If

End Function   






112
Brains Development / Re: Execution M00 for Brains
« on: May 19, 2023, 02:13:12 PM »
OK inthis case you will need two signal's

-excenter in top position
-excenter in bottom position

-how will the excenter drive be controlled? simple On/OFF by relay?

-what will do the feed forward, if there is more then one stroke at a position ? Y-Axis?

-has it to do a small step backward's when the stroke goes up?

question's and more question's.

113
Brains Development / Re: Execution M00 for Brains
« on: May 18, 2023, 04:14:57 AM »
Hello Fred,

how is the stroke driven ? Hydraulic or excenter drive or?

usualy there is more then one stroke per a position,but does not matter ?

so the sequence would be

-ckeck stroke is up
-Y-axis to a save positon for turn
-turn A-axis
-Y-axis to the first position
-stroke down
-Y-axis back
-stroke up
-Y-axis to the next position
-stroke down
-Y-axis back
-stroke up

and so on until Y-axis depth is reached
then if necessary the same for next a position.

114
Brains Development / Re: Execution M00 for Brains
« on: May 16, 2023, 02:56:53 AM »
the link downloads a file named Mach3Mill_1.84.pdf. pls check your download folder.

anyway, i do not know a possibility to pause a program by digital input.

with a vb macro converter i mean a VB macro witch reads the original GCode and
creates new program with use of G31.

that's why i asked for a sample GCode file witch will be used on the machine.

115
Brains Development / Re: Execution M00 for Brains
« on: May 15, 2023, 02:13:57 PM »
if you have a look in here:

http://support.machsupport.com/de/downloads/files/using-mach3-mill/download

chapter 10.7.12 explains, what G31 will do.

basicly G31 will stop movement triggered by an input signal.
it will not continue after input signal goes off again.
this wil have to be done by logic within a macro, the benfit is that the movement will
be stopped imediately.

i don't know where your GCode is coming from, but someting like a GCode "converter",
VB macro, might be the way to go.

can you post a sample GCode to see how it looks like.   

116
Brains Development / Re: Execution M00 for Brains
« on: May 15, 2023, 12:38:42 PM »
i was affraid that this problem will come up, because code from macros is added into the queue.

so as Graham mentoined, G31 will be the road to go.

117
Brains Development / Re: Execution M00 for Brains
« on: May 15, 2023, 02:13:25 AM »
sorry, my fault:

Code: [Select]
If IsActive (OEMTRIG1) Then
      Code "M00"
      While (IsActive(Input1))
         Sleep(100)
      Wend
End If

118
Brains Development / Re: Execution M00 for Brains
« on: May 11, 2023, 02:15:40 AM »
Example:

1.assign your input in Config-> Ports & Pins -> Input Signals to OEM Trig #1 (keep the original assignment for input1)


2. Config->System hotkeys oemcodes -> external buttons OEM Code -> Trigger #1 - set 301

3. Config->General Config ->Initialisation string  M333, that means every time you reset M333.M1s is called

4. create  M333.M1s in your macro folder and add the VB code:
Code: [Select]
SetTriggerMacro(334)


so every time the OEMTrigger#1 comes True the VB Code within M334.M1S will run once.

code for M334.M1s wil be something like this

Code: [Select]
   If Oemtrigger(1) Then
      Code "M00"
      While (IsActive(Input1))
         Sleep(100)
      Wend
   End If

but as mentoined i think this will be to slow.

as Graham mentoined earlier G31 might be the right direction.


119
Brains Development / Re: Execution M00 for Brains
« on: May 10, 2023, 10:22:07 AM »
Hi Fred,

your code snipped will freeze the system because of your Do Loop.

you can try to use a OEMTrigger to run a macro.
how this is done i explained here:
https://www.machsupport.com/forum/index.php?topic=46414.msg293415#msg293415

but i am affraid that all this will be to slow anyhow.

without knowing exactly what the machine should do, it is very hard to think about possibilties.

120
Brains Development / Re: Execution M00 for Brains
« on: May 10, 2023, 02:27:25 AM »
have you tryed to use Buttonpress -> 1003- Stop File in your brain?
should do the same like M00.