Mach3 & KMTronic USB relays

 

MACH3 CNC software and KMTronic USB relays

 



All in tree steps:

 

1. Connect USB relay to PC and install the drivers.

     For 1,2 and 4 channels relay boards:

http://www.info.kmtronic.com/ftdi-virtual-com-port-drivers-installation.html

     For 8 channels relay board:

http://www.info.kmtronic.com/usb-8-relay-box-drivers-instalation.html


2. Download DLL and place it in your Mach3 install folder (usually C:\Mach3)

http://www.info.kmtronic.com/software/Mach3/KMtronicDLL.zip


3. Add to your macro or button script ON or OFF command

Command's format:
a = Relay(5,1,"ON")  - where "5" is USB COM port, "1" is relay number, "ON" is command, which turns ON the relay connected to COM5
a = Relay(5,1,"OFF")  - where "5" is USB COM port, "1" is relay number, "OFF" is command, which turns OFF the  relay connected to COM5

Note- every script where you use commands has to start with this declaration:
Declare Function Relay Lib "KMSerial.dll" (ByVal comPort As Integer,ByVal numberRelay As Integer,ByVal command As String) As Boolean

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read 9215 times