Hello Guest it is March 29, 2024, 04:20:00 AM

Author Topic: USB and RS485 relays for Mach3  (Read 9221 times)

0 Members and 1 Guest are viewing this topic.

USB and RS485 relays for Mach3
« on: February 09, 2012, 09:38:10 AM »
Hi all,

I'm from KMtronic LTD, Bulgaria (http://www.sigma-shop.com). We specialize in computer controlled USB and RS485 relays.
One day a friend of mine asked me to find a way control it from Mach3.

Our relays are using BIN(HEX) format RS232 commands and at this moment they do not support MODBUS protocol.
I spent some time and found very nice article wrote by Mr. Henrik Olsson about Serial communication with Mach3 using external DLL.
To make everything simpler, we add function to this Serial DLL for easier control relays.

All in tree steps:

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

   http://www.ftdichip.com/Drivers/VCP.htm

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

   http://www.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 number 1 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 number 1 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






We have USB relays with one, two, eight and more relay channels.

Photos:








I will thankful  for any suggestions or recommendations from Mach3 users because this is a new area for us.

Thank you in advance,
Krasen
RF433 and LAN relays for Mach3
« Reply #1 on: February 23, 2015, 04:43:54 AM »
We add new relay boards for MACH3 users:

8 channels Modbus/TCP Relay board



RF433MHz Relay Boards



Regards