Machsupport Forum
Third party software and hardware support forums. => PoKeys => Topic started by: JORATORCA on December 07, 2015, 03:37:20 PM
-
To build my pendant I need to control some of the 100 I / O virtual pins that PoKeys57U offers through a Mach3 VB script to signal me by lighting an LED, a particular state. The order is executed, by pressing in a matrix keyboard input through the "Mach IO pin 0" with the following routine:
'Rutina para leer el estado del botón shift y enclavarlo
Sub LeerShift()
OutputNumber = 30
If GetIODevInput(0, 0) =1 Then 'Si pulso el botón Shift
If SHIFT Then
SetIODevOutput(0,OutputNumber,0)
SHIFT = False
Else
SetIODevOutput(DevID,OutputNumber,1)
SHIFT = True
End If
End If
End Sub
This works well and I am able to recognize touch on the keyboard, but to send the order by the corresponding output ("IO pin Mach 30") Mach3 show me this message:
When I press "OK" and the window closes, the order is executed and the LED lights.
I tried to use the instructions for the command of the virtual pin contained in the handbook PoKeys57U but do not work (GetInput, SetOutput).
Can you help me solve this problem?
-
I can only say that this message is generated by Mach3 itself, not the plugin - we have no idea what is the purpose of it.
-
You know any other way to control virtual outputs using VB script?
-
I am personally pretty weak on the VB scripting functionality of Mach3, so would have to research it first...
But you may try to use the Mach3's IO's - there are special IO registers that should be accessible and you can map PoKeys pins to them ('Mach3 IO <n>' option in Plugin configuration, where <n> goes from 1 to 100).
-
Excuse the delay in replying. I've been away from my computer a few days.
Precisely what is trying to use the Mach3's IO's as as you recommend me. I was assigned to one of the outputs of PoKeys57U the "Mach3 IO pin 30", but I can not activate it with any of the functions contained in the manual pokeys: SetOutput (30.1) "Bool SetOutput (pinID byte, bool outputState)". Generates the error: Wrong number of arguments or invalid property assignment.
I also tried to run previously the function SetPinData (30.4) (I set the pin as a digital output "bool SetPinData (pinID byte, byte pinFunction)") but it generates another error: "Expected: ="
Looking at the forum, I saw that someone had run Mach3's IO's with the function: SetIODevOutput (DevID, OutputNumber 1). It works more or less. Before lighting the LED, the Mach3 error message of the attached image is displayed. When I accept, the LED changes state. I do not know what I'm doing wrong or if it is not possible to switch the Mach3's IO's by macropump and VB script.
I would appreciate any help on this. Excuse my poor English but I am native Spanish.
-
Someone can help me work with 100 I/O virtual pins that PoKeys57U offers through a Mach3 VB script?
I have successfully set the corresponding PoKeys pin, but I have not located any function with which to change state said pin. :-[ :-[
-
It appears that something was changed in Mach3 - the Function == ... Outputmask... was not there before. Have you tried reaching the Mach3 guys?
-
Finally I solved using "ActivateSignal (OUTPUT20)" and wasting some of the outputs of Mach3, but I do not like the solution.
I'm not sure how this works. Do I have to open another post in another forum? Where?
Thank you
-
Finally I solved using "ActivateSignal (OUTPUT20)" and wasting some of the outputs of Mach3, but I do not like the solution.
I'm not sure how this works. Do I have to open another post in another forum? Where?
Thank you
I don’t think it is all that important exactly where topics are posted but its perhaps nice to keep similar things together...
If its PoKeys related then start a new topic in the PoKeys section.
If its scripting (Cypress Enable) related then start a new topic in the VB and development of Wizards section.
Tweakie.