Hello all together,
I have built a MPG which includes a 4x5 matrix-keyboard. All connected to Pokeys57CNC. All buttons, which are calling OEMButtons working fine.
Now I want to call some functions of the used Schmidt-Screen with the keyboard. When I put the things in macropump, the keys are detected and the functions work. But sometimes when using macropump, some or most buttons of the screen will not work. Also the keys mapped to OEMButtons are not responding (as example: Set X to 0). Looks like mach3 hangs when using macropump tried on Win10 64bit and Win7 32bit).
Now I tried to use OEMTrig#1 to call a macro which contains the function calls. In PoKeys Input-Settings I defined as example OEMLed 1501 and OEMTrig#1 when a key is pressed. Everything is fine and when I test it in a macro, the key press is detected.
code:
If GetOEMLED(1501) =1 Then
MsgBox("Button 1")
End If
But when I want more keys with different LEDs, only the last MsgBox appears. MsgBox Button 1 and Button 2 is not comming up.
OEMTrig-Macro:
If GetOEMLED(1501) =1 Then
MsgBox("Button 1")
ElseIf GetOEMLED(1511) =1 Then
MsgBox("Button 2")
ElseIf GetOEMLED(1512) =1 Then
MsgBox("Button 3")
End If
alternative also not working:
If GetOEMLED(1501) =1 Then
MsgBox("Button 1")
End If
If GetOEMLED(1511) =1 Then
MsgBox("Button 2")
End If
If GetOEMLED(1512) =1 Then
MsgBox("Button 3")
End If
What do I have to put in the macro, that it will work? Or is this not possible?
For reference the working macropump-code (PoKeys57CNC set to the virtual IOs "Mach3 IO #21-Mach3 IO#24):
If GetIODevInput(0,21) = 1 Then
MsgBox("Button 1")
End If
If GetIODevInput(0,22) = 1 Then
MsgBox("Button 2")
End If
If GetIODevInput(0,23) = 1 Then
MsgBox("Button 3")
End If
If GetIODevInput(0,24) = 1 Then
MsgBox("Button 4")
End If
Greetings
AlexRu