para asignar el eje a mover con el MPG... Hay varias formas... La que yo uso.
Con un potenciometro (an2) y asignando en el script ...macropump el rango de valores ... activo segun posicion del pot el eje a mover. OSEA que muevo un pot para seleccionar el eje con el que se movera con el MPG .(NOTA si le das a TAB te aparecera la pantallita del MPG del mach3) . CON EL TECLADO DEL PC ... ALT + A asignas el MPG al motor 1 . Eso es ya tema de aprender el mach... y aqui no creo k sea lugar para ello.... Otra es asignar en teclas la funcion a realizar k creo k es la k buscas. (hay que mirar los OEMS codes y asignarlo a esa tecla) ... mira en la wikipedia.
y como es un tema demasiado extenso para poder resumirtelo te envio si se puede, una posible configuracion del macropump... que creo que ya deje en el fichero comprimido... es un fichero de texto con un programa en VB que el mach interpreta y ejecuta continuamente como un proceso mas.
Aun a riesgo de que el moderador me tire de la orejas ... aqui pongo un ejemplo de script hecho por mi ademas si activas la opcio speak habla jejeje
' Ajuste para usar FeeddRate desde el potenciometro en an1
Option Explicit
Dim pot1, MPGAxis, DISTpaso, State, Rpm, Jog As Integer
'Inputs 64 es el pot 1, 65 el pot 2, 66 el pot 3
'Leds 83 Jog ON/OFF
'Este script se ejecuta continuamente y cuando el boton de jog esta activado ejecuta las funciones
'De momento no se como hacer para que hable en español He leido algo sobre
' tener instalado el officce pero no lo he comprobado.
If(GetOemLed(83)) Then ' Si el led jog esta activado
if (Jog = 0) then jog =1 : Speak " Welcome to siliconio modbus joging. Enjoy"
'funcion de analogica 1
pot1 = GetInput(64) + 1
pot1 = (pot1 * 200.0 ) / 1024.0
setDRO (21,pot1) ' El rengo es del 1% al 200%
'Selector de MOTOR en analogica 2
MPGAxis = GetInput( 65 ) 'analog Input 2
Select Case MPGAxis
Case < 170
'do nothing
State = 0
Case < 341
If GetOEMLED( 14 ) = 0 Then 'If not Set to Continuous Jog Mode
DoOEMButton( 276 ) 'Set Jog To continuous
End If
If State <> 1 Then
Speak "Cohnteenoo oh"
End If
State = 1
Case < 511
If GetOEMLED( 15 ) = 0 Then 'If not Set to Step Jog Mode
DoOEMButton( 275 ) 'Set Jog To Step
End If
If State <> 2 Then
Speak "Passos"
End If
State = 2
Case < 681
If GetOEMLED( 57 ) = 0 Then 'If not Set to MPG Jog Mode
DoOEMButton( 327 ) 'set Jog to MPG
End If
If GetOEMLED( 59 ) = 0 Then
DoOEMButton( 185 ) 'set MPG Jog to X
End If
If State <> 3 Then
Speak "ehehquees"
End If
State = 3
Case < 851
If GetOEMLED( 57 ) = 0 Then 'If not Set to MPG Jog Mode
DoOEMButton( 327 ) 'set Jog to MPG
End If
If GetOEMLED( 60 ) = 0 Then
DoOEMButton( 186 ) 'set MPG Jog to Y
Speak "eeh"
End If
State = 4
Case >= 851
If GetOEMLED( 57 ) = 0 Then 'If not Set to MPG Jog Mode
DoOEMButton( 327 ) 'set Jog to MPG
End If
If GetOEMLED( 61 ) = 0 Then
DoOEMButton( 187 ) 'set MPG Jog to Z
Speak "zehtah"
End If
State = 5
End Select
'Selector de distancia por paso en analogica 3
DISTpaso = GetInput( 66 ) 'analog Input 3
Select Case DISTpaso
Case > 930 DoOEMButton( 191 ) ' (1) valor maximo de la tabla de pasos 1024/11 = 93 inc de valor para detectar
Case > 837 DoOEMButton( 192 ) ' (2) Ver las definiciones en general config para las distancias configuradas
Case > 744 DoOEMButton( 193 ) ' (3) Ver definiciones de OEM bUttons en el wiki
Case > 651 DoOEMButton( 194 ) ' (4)
Case > 558 DoOEMButton( 195 ) ' (5)
Case > 465 DoOEMButton( 196 ) ' (6)
Case > 372 DoOEMButton( 197 ) ' (7)
Case > 279 DoOEMButton( 198 ) ' (

Case > 196 DoOEMButton( 199 ) ' (9)
Case > 093 DoOEMButton( 200 ) ' (10) Valor mas pequeño de la tabla
End Select
' Pruebas para revoluciones de mandrino
' uso la analogica 3 para esta prueba
Rpm = GetInput(66) ' 0..1023 * 30 -> daria un maximo de unas 30.000 rpm resolucion 30 rpm
Rpm = Rpm * 3.5 '
SetSpinSpeed( rpm ) ' test para poner velocidad rpm
'************************************************************************************************************
' Fin del script VB Salida segun estado del boton JOG
'************************************************************************************************************
else
if (Jog = 1) then jog =0 : Speak "Bye."
End If