Hello Guest it is March 19, 2024, 03:16:30 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

1371
General Mach Discussion / Re: Auto Calculator Size
« on: March 18, 2019, 01:17:12 PM »
try:

#Expand <\..\..\macros\plasma\numerickeyboard>

1372
General Mach Discussion / Re: Auto Calculator Size
« on: March 18, 2019, 01:44:06 AM »
this is the way how to use it:

Hello,

here a simple solution with "on board" possibilities (VB script) to do Inputs to DRO (touch Screen).

put the following code into a macro in your macrofolder:


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, 105, 180, "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

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


Dim Dlg1 As UserDialog1

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

NumericKeyboard = CDbl(Dlg1.FText)
SetOEMDro(DRONum,CDbl(Dlg1.FText))
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$ = "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   




ok lets say you put into C:\mach3\macros\yourprofile\numerickeyboard.m1s

if you put following code into a transparent button over the a-axis dro
the code do edit x-axis would be:


Code: [Select]

Sub Main
call NumericKeyboard(800)

End Sub


#Expand <\..\..\macros\yourprofile\numerickeyboard>



call NumericKeyboard(800)

the number is the OEMDro you want to edit.

1373
General Mach Discussion / Re: Auto Calculator Size
« on: March 17, 2019, 02:28:27 PM »
hello Roy,

have a look here: https://www.machsupport.com/forum/index.php?topic=39117.0

or here: https://www.machsupport.com/forum/index.php?topic=36213.msg247828#msg247828

there is some code code i did for an other user, witch can be easy modified for your Needs.

1374
VB and the development of wizards / Re: VB Script for Tool Zero
« on: March 13, 2019, 12:44:31 PM »
Show us your code,
Sound like Loop in code.

1375
General Mach Discussion / Re: OEM codes for buttons, DRO's and LED's
« on: March 01, 2019, 01:42:21 AM »
see attachment

1376
General Mach Discussion / Re: OEM codes for buttons, DRO's and LED's
« on: February 28, 2019, 12:50:14 PM »
just type in the number, not all of them are in the pull down list.

1377
General Mach Discussion / Re: Newbie need help
« on: February 26, 2019, 02:21:04 AM »
enter a

MSGBox "i am in probescript"

at the beginning of your script to see that it us getting called.

Config -> General Config -> seciton Startup Modals -> Initialization String -> use init string on all "resets" -> should be enabled

1378
Mach Screens / Re: Password for custom screenset
« on: February 25, 2019, 01:49:20 PM »
witch part of Klaus answer is so hard to understand

there is no way to put a password on your screenset

or:

You can only protect your macros by saving them as precompiled (*.mcc).

.mcc is compiled Version of a .m1s




???
 :-[ :-[


1379
General Mach Discussion / Re: Newbie need help
« on: February 25, 2019, 01:43:24 PM »
ok, seams to be to difficult to use the search function

1.
Config -> Ports&Pins -> Input signals -> asign OEM Trig#1 to the right Input Signal (no emlation, no hotkey)
2.
Config  -> System Horkey Setup ->Trigger #OEM code -> set 1 to 301
3.
create a macro M304.M1S

macro code:

Code: [Select]
SetTriggerMacro(301)

4.
Config -> General Config -> seciton Startup Modals -> Initialization String -> Add the following: M304

5.
restart Mach3

6.
create a macro M301.M1s


macro code:

Code: [Select]
If IsActive (OEMTRIG1) Then         
Code("M whaeveryouwhant")
End If






1380
General Mach Discussion / Re: Newbie need help
« on: February 25, 2019, 01:49:51 AM »
Auto Tool Zero is not a single OEM function, it is a couple of code lines.

so OEMTrigger and Triggermacro will be be your friends (search keywords).