Thursday, May 14, 2015
Wednesday, April 29, 2015
KMtronic ModBus Relays
COM port settings:
Baud Rate: 9600
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control: None
MODBUS commands:
01 (0x01) Read Coil (check relay status)
The coils in the response message are packed as one coil per bit of the data field.
Status is indicated as 1= ON and 0= OFF.
Status request commands:
>> 01 01 00 00 00 01 (CS) (CS) - Request for status relay 1
>> 01 01 00 01 00 01 (CS) (CS) - Request for status relay 2
>> 01 01 00 02 00 01 (CS) (CS) - Request for status relay 3
>> 01 01 00 03 00 01 (CS) (CS) - Request for status relay 4
>> 01 01 00 04 00 01 (CS) (CS) - Request for status relay 5
>> 01 01 00 05 00 01 (CS) (CS) - Request for status relay 6
>> 01 01 00 06 00 01 (CS) (CS) - Request for status relay 7
>> 01 01 00 07 00 01 (CS) (CS) - Request for status relay 8
Response relay board:
<< 01 01 01 00 (CS) (CS) - relay is OFF
or
<< 01 01 01 01 (CS) (CS) - relay is ON
05 (0x05) Write Single Coil (turn relay ON/OFF)
The normal response is an echo of the request, returned after the coil state has been written.
ON commands:
>> 01 05 00 00 FF 00 (CS) (CS) - Turn relay 1 ON
<< 01 05 00 00 FF 00 (CS) (CS) - Respond that relay 1 is turned ON
>> 01 05 00 01 FF 00 (CS) (CS) - Turn relay 2 ON
<< 01 05 00 01 FF 00 (CS) (CS) - Respond that relay 2 is turned ON
>> 01 05 00 02 FF 00 (CS) (CS) - Turn relay 3 ON
<< 01 05 00 02 FF 00 (CS) (CS) - Respond that relay 3 is turned ON
>> 01 05 00 03 FF 00 (CS) (CS) - Turn relay 4 ON
<< 01 05 00 03 FF 00 (CS) (CS) - Respond that relay 4 is turned ON
>> 01 05 00 04 FF 00 (CS) (CS) - Turn relay 5 ON
<< 01 05 00 04 FF 00 (CS) (CS) - Respond that relay 5 is turned ON
>> 01 05 00 05 FF 00 (CS) (CS) - Turn relay 6 ON
<< 01 05 00 05 FF 00 (CS) (CS) - Respond that relay 6 is turned ON
>> 01 05 00 06 FF 00 (CS) (CS) - Turn relay 7 ON
<< 01 05 00 06 FF 00 (CS) (CS) - Respond that relay 7 is turned ON
>> 01 05 00 07 FF 00 (CS) (CS) - Turn relay 8 ON
<< 01 05 00 07 FF 00 (CS) (CS) - Respond that relay 8 is turned ON
OFF commands:
>> 01 05 00 00 00 00 (CS) (CS) - Turn relay 1 OFF
<< 01 05 00 00 00 00 (CS) (CS) - Respond that relay 1 is turned OFF
>> 01 05 00 01 00 00 (CS) (CS) - Turn relay 2 OFF
<< 01 05 00 01 00 00 (CS) (CS) - Respond that relay 2 is turned OFF
>> 01 05 00 02 00 00 (CS) (CS) - Turn relay 3 OFF
<< 01 05 00 02 00 00 (CS) (CS) - Respond that relay 3 is turned OFF
>> 01 05 00 03 00 00 (CS) (CS) - Turn relay 4 OFF
<< 01 05 00 03 00 00 (CS) (CS) - Respond that relay 4 is turned OFF
>> 01 05 00 04 00 00 (CS) (CS) - Turn relay 5 OFF
<< 01 05 00 04 00 00 (CS) (CS) - Respond that relay 5 is turned OFF
>> 01 05 00 05 00 00 (CS) (CS) - Turn relay 6 OFF
<< 01 05 00 05 00 00 (CS) (CS) - Respond that relay 6 is turned OFF
>> 01 05 00 06 00 00 (CS) (CS) - Turn relay 7 OFF
<< 01 05 00 06 00 00 (CS) (CS) - Respond that relay 7 is turned OFF
>> 01 05 00 07 00 00 (CS) (CS) - Turn relay 8 OFF
<< 01 05 00 07 00 00 (CS) (CS) - Respond that relay 8 is turned OFF
MODBUS Test Software:
Download test software from:
http://www.kmtronic.com/software/ModBus/KMtronic_ModBus_Tester.zip

Select COM port where the Relay is installed (in this example it is COM Port 4) and click to OPEN button.
Write (copy/paste) command without Check Sum (CS) and click on SEND button. Software calculate Check Sum and send command to relay board.
In this example last command is:
"01 01 00 00 00 01 FD CA" - Request for status relay 1. "FD CA" is Check Sum
"01 01 01 01 90 48" - Reply from relay board that status relay 1 is ON. "90 48" is Check Sum
NOTE: You don't need to enter checksum manually. The software automatically calculates checksum and adds it to the main command.
RS485 Commands
Baud Rate: 9600
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control: None
MODBUS commands:
01 (0x01) Read Coil (check relay status)
The coils in the response message are packed as one coil per bit of the data field.
Status is indicated as 1= ON and 0= OFF.
Status request commands:
>> 01 01 00 00 00 01 (CS) (CS) - Request for status relay 1
>> 01 01 00 01 00 01 (CS) (CS) - Request for status relay 2
>> 01 01 00 02 00 01 (CS) (CS) - Request for status relay 3
>> 01 01 00 03 00 01 (CS) (CS) - Request for status relay 4
>> 01 01 00 04 00 01 (CS) (CS) - Request for status relay 5
>> 01 01 00 05 00 01 (CS) (CS) - Request for status relay 6
>> 01 01 00 06 00 01 (CS) (CS) - Request for status relay 7
>> 01 01 00 07 00 01 (CS) (CS) - Request for status relay 8
Response relay board:
<< 01 01 01 00 (CS) (CS) - relay is OFF
or
<< 01 01 01 01 (CS) (CS) - relay is ON
05 (0x05) Write Single Coil (turn relay ON/OFF)
The normal response is an echo of the request, returned after the coil state has been written.
ON commands:
>> 01 05 00 00 FF 00 (CS) (CS) - Turn relay 1 ON
<< 01 05 00 00 FF 00 (CS) (CS) - Respond that relay 1 is turned ON
>> 01 05 00 01 FF 00 (CS) (CS) - Turn relay 2 ON
<< 01 05 00 01 FF 00 (CS) (CS) - Respond that relay 2 is turned ON
>> 01 05 00 02 FF 00 (CS) (CS) - Turn relay 3 ON
<< 01 05 00 02 FF 00 (CS) (CS) - Respond that relay 3 is turned ON
>> 01 05 00 03 FF 00 (CS) (CS) - Turn relay 4 ON
<< 01 05 00 03 FF 00 (CS) (CS) - Respond that relay 4 is turned ON
>> 01 05 00 04 FF 00 (CS) (CS) - Turn relay 5 ON
<< 01 05 00 04 FF 00 (CS) (CS) - Respond that relay 5 is turned ON
>> 01 05 00 05 FF 00 (CS) (CS) - Turn relay 6 ON
<< 01 05 00 05 FF 00 (CS) (CS) - Respond that relay 6 is turned ON
>> 01 05 00 06 FF 00 (CS) (CS) - Turn relay 7 ON
<< 01 05 00 06 FF 00 (CS) (CS) - Respond that relay 7 is turned ON
>> 01 05 00 07 FF 00 (CS) (CS) - Turn relay 8 ON
<< 01 05 00 07 FF 00 (CS) (CS) - Respond that relay 8 is turned ON
OFF commands:
>> 01 05 00 00 00 00 (CS) (CS) - Turn relay 1 OFF
<< 01 05 00 00 00 00 (CS) (CS) - Respond that relay 1 is turned OFF
>> 01 05 00 01 00 00 (CS) (CS) - Turn relay 2 OFF
<< 01 05 00 01 00 00 (CS) (CS) - Respond that relay 2 is turned OFF
>> 01 05 00 02 00 00 (CS) (CS) - Turn relay 3 OFF
<< 01 05 00 02 00 00 (CS) (CS) - Respond that relay 3 is turned OFF
>> 01 05 00 03 00 00 (CS) (CS) - Turn relay 4 OFF
<< 01 05 00 03 00 00 (CS) (CS) - Respond that relay 4 is turned OFF
>> 01 05 00 04 00 00 (CS) (CS) - Turn relay 5 OFF
<< 01 05 00 04 00 00 (CS) (CS) - Respond that relay 5 is turned OFF
>> 01 05 00 05 00 00 (CS) (CS) - Turn relay 6 OFF
<< 01 05 00 05 00 00 (CS) (CS) - Respond that relay 6 is turned OFF
>> 01 05 00 06 00 00 (CS) (CS) - Turn relay 7 OFF
<< 01 05 00 06 00 00 (CS) (CS) - Respond that relay 7 is turned OFF
>> 01 05 00 07 00 00 (CS) (CS) - Turn relay 8 OFF
<< 01 05 00 07 00 00 (CS) (CS) - Respond that relay 8 is turned OFF
MODBUS Test Software:
Download test software from:
http://www.kmtronic.com/software/ModBus/KMtronic_ModBus_Tester.zip
Select COM port where the Relay is installed (in this example it is COM Port 4) and click to OPEN button.
Write (copy/paste) command without Check Sum (CS) and click on SEND button. Software calculate Check Sum and send command to relay board.
In this example last command is:
"01 01 00 00 00 01 FD CA" - Request for status relay 1. "FD CA" is Check Sum
"01 01 01 01 90 48" - Reply from relay board that status relay 1 is ON. "90 48" is Check Sum
NOTE: You don't need to enter checksum manually. The software automatically calculates checksum and adds it to the main command.
RS485 Commands
More information
How to control KMtronic USB relays from Mach3
Mach3 is PC-based CNC software
http://www.machsupport.com/
How to connect KMtronic 2 relay board for your Mach3 CNC project
http://kmtronic.com/how-to-connect-kmtronic-2-relay-board-to-your-mach3-cnc-project.html
How to control KMtronic USB relays from Mach3
http://kmtronic.com/mach3-and-kmtronic-usb-relays.html
KMtronic USB relays & Mach3 - step by step
http://kmtronic.com/kmtronic-usb-relays-from-mach3-step-by-step.html
More information
How to upload HEX files directly to Arduino
The program is called XLoader and you can download at
Now you need to attach the Arduino board (select device)
Select the COM port in my case is COM3. Then you have to navigate to the HEX file and select it.
Click upload and you are ready.
More information
USB Relay Controller - Two Channels
A general purpose USB Relay controller for connection to a PC's USB
port using VCP (Virtual COM port). Control devices using your PC. USB
Relay controller allows a PC to control external devices using simple
RS232 commands. Relay is fully powered from the USB bus. Free download
USB relay board control software.
• Fully powered from USB • For 12V/24V DC 15A or 120V/220V AC at 10A max. • Can be used with LabVIEW, ProfiLab, DAQFactory, TestPoint, DASYLab, VEE
100 mm / 62 mm / 26 mm
- Home automation
- Industrial automation
Manual - http://www.sigma-shop.com/manuals/USB_Two_Relay manual.pdf
Drivers - http://www.ftdichip.com/Drivers/VCP.htm
Windows Server 2008 R2, Windows 7, Windows 7 x64, Windows Server 2008,
Windows Server 2008 x64, Windows Vista, Windows Vista x64, Windows Server 2003,
Windows Server 2003 x64, Windows XP, Windows XP x64, Windows 2000, Windows ME,
Windows 98, Linux, Mac OS X, Mac OS 9, Mac OS 8, Windows CE.NET (Version 4.2 and greater)
8 Data, 1 Stop, No Parity
Baud rate : 9600
- FIRST relay commands:
"FF 01 00" - OFF command
"FF 01 01" - ON command
- SECOND relay commands:
"FF 02 00" - OFF command
"FF 02 01" - ON command
More information
Tuesday, April 28, 2015
USB to RS485 FTDI Interface Converter - BOX
This converter provides two way serial communications signal conversion between the RS485 to and from a personal computer USB port using virtual serial COM port.
Features:
- Self-powered from USB.
Links:
Manual - http://sigma-shop.com/manuals/usb_rs485_box_manual.pdf
Drivers - http://www.ftdichip.com/Drivers/VCP.htm
Drivers are available to work with the following operating systems:
Windows Vista x64, Windows XP x64, Windows Server 2003 x64,
Windows Vista, Windows XP, Windows Server 2003, Windows 2000,
Windows ME, Windows 98, Linux, Mac OS X, Mac OS 9, Mac OS 8,
Windows CE.NET (Version 4.2 and greater)
The drivers listed above are all available to download for free from the FTDI website. Various 3rd Party Drivers are also available for various other operating systems - see the FTDI website for details.
More information
KMtronic Timer software
USB One Channel Relay
KMtronic Timer software
Download USB Relay Test software :
Unzip it to your own folder.
If you get this message you see the following error
that means that you do not have the latest version of Microsoft .NET Framework installed on your computer.
Microsoft .NET Framework has to be installed on your computer in order to use the software.
Microsoft .NET Framework has to be installed on your computer in order to use the software.
You can download this from there:
Software will detect all COM ports you have and there must be one more (Virtual COM port).
Choose COM port. Click on “OPEN” button and using “ON” and “OFF” buttons you can control relay.
More information
Thursday, April 23, 2015
Windows Shortcut example for KMTronic USB One Relay
Windows command line application (for COM5)
Quick help:
usbrelay.exe -c:<COM port> -r:<RELAY>#<STATE> -b:<BROADCAST> -q
-c: Com port
-r: Relay(s), State(s)
-b: Broadcast/output on successful sent
-q Silence mode
Example:
usbrelay.exe -c:5 -r:1#1 (this will turn on relay)
usbrelay.exe -c:5 -r:1#0 (this will turn off relay)
ZIP file including:
- USBRelay.exe
- Relay_OFF and Relay_ON Shortcut files
- Relay_OFF and Relay_ON Shortcut files
Step by step instruction:
1. Download the drivers
2. Connect USB relay and install drivers
3. Check in Device Manager COM port where the Relay is installed (in this example it is COM Port 5)
1. Download the drivers
2. Connect USB relay and install drivers
3. Check in Device Manager COM port where the Relay is installed (in this example it is COM Port 5)
4. Download and unzip “KMTronic_Command_Line_Application.zip”
- In this example Shortcut files are configured to works with COM Port 5
- If your COM port is differed you must change Shortcut files
- In this example Shortcut files are configured to works with COM Port 5
- If your COM port is differed you must change Shortcut files
Right-click on Relay_OFF and choose Properties. Change the COM port to yours and click OK.
This is only example Shortcut command.
You must change path to the folder where you download Usbrelay.exe
Example: C:\Downloads\usbrelay\usbrelay.exe -c:5 -r:1#1
Repeat the same procedure with Relay_ON.
Now click to Relay_ON and Relay_OFF and relay must turn ON/OFF
You must change path to the folder where you download Usbrelay.exe
Example: C:\Downloads\usbrelay\usbrelay.exe -c:5 -r:1#1
Repeat the same procedure with Relay_ON.
Now click to Relay_ON and Relay_OFF and relay must turn ON/OFF
(Author: Jan)
How to control KMTronic USB relays with MATLAB
MATLAB - The Language Of Technical Computing
MATLAB® is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.
----------------------------------------------------------------------
MATLAB example (thanks Dr Dean Rose)
----------------------------------------------------------------------
How to control KMTronic USB relays with LabVIEW
LabVIEW System Design Software
LabVIEW is a graphical programming environment used by millions of
engineers and scientists to develop sophisticated measurement, test, and
control systems using intuitive graphical icons and wires that resemble
a flowchart. It offers unrivaled integration with thousands of hardware
devices and provides hundreds of built-in libraries for advanced
analysis and data visualization – all for creating virtual
instrumentation. The LabVIEW platform is scalable across multiple
targets and OSs, and, since its introduction in 1986, it has become an
industry leader.
----------------------------------------------------------------------
LabView example (thanks Siva)
Control KMTronic USB relays with DSPRobotics FlowStone
The programming language for engineers
Homepage
So what is FlowStone?
FlowStone is a Graphical real time industrial computer programming language.
What can FlowStone do?
FlowStone allows you to create your own standalone applications for real time Digital Signal Processing,
Robotics, Mechatronics, HMI, SCADA and many more.
FlowStone example
( thanks DSPRobotics )
Support Forum
KMtronic USB 8 Relay software
Download from:
Unzip it to your own folder.
If you get this message you see the following error
that means that you do not have the latest version of Microsoft .NET Framework installed on your computer.
Microsoft .NET Framework has to be installed on your computer in order to use the software.
Microsoft .NET Framework has to be installed on your computer in order to use the software.
You can download this from there:
Software will detect all COM ports you have and there must be one more (Virtual COM port).
Choose COM port. Click on “OPEN” button and using “ON” and “OFF” buttons you can control relay.
KMTronic USB Relay Test software
Download test software from:
-------------------------
USB One Relay commands:
FF 01 00 - OFF command
FF 01 01 - ON command
FF 01 03 - Status request command
> FF 01 xx - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF
-------------------------
USB Two Relay commands:
FF 01 00 - First relay OFF command
FF 01 01 - First relay ON command
FF 02 00 - Second relay OFF command
FF 02 01 - Second relay ON command
FF 01 03 - First relay Status request command
> FF 01 xx - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF
FF 02 03 - First relay Status request command
> FF 02 xx - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF
-------------------------
USB Four Relay commands:
FF 01 00 - First relay OFF command
FF 01 01 - First relay ON command
FF 02 00 - Second relay OFF command
FF 02 01 - Second relay ON command
FF 03 00 - Third relay OFF command
FF 03 01 - Third relay ON command
FF 04 00 - Fourth relay OFF command
FF 04 01 - Fourth relay ON command
FF 09 00 - Status request command
> xx xx xx xx - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF
First byte is status first relay, Fourth byte is status fourth relay
-------------------------
USB (RS232) Eight Relay commands:
FF 01 00 - First relay OFF command
FF 01 01 - First relay ON command
FF 02 00 - Second relay OFF command
FF 02 01 - Second relay ON command
.......
FF 08 00 - Eight relay OFF command
FF 08 01 - Eight relay ON command
FF 09 00 - Status request command
> xx xx xx xx xx xx xx xx - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF
First byte is status first relay, Eight byte is status eight relay
RS485 Relays commands
Wednesday, April 22, 2015
Power One Aurora Inverter Web Data Logger
USB to RS485 FTDI interface Board Power One Aurora Inverter
Web Data Logger
Web Data Logger
This converter provides two way serial communications signal conversion between the RS485 to and from a personal computer USB portusing virtual serial COM port. Self-powered from USB.
Manufacturer:
KMTronic LTD
Aurora Web Data Logger open source
(Italian language)
(Italian language)
KMtronic RF433MHz 8 Channel Relay Controller
The complete includes:
1 x RF433MHz 8 Channels RELAY board (12V)
1 x RF433MHz 8 Channels RELAY board (12V)
Manufacturer:
KMTronic LTD
KMTronic LTD
Required power:
12VDC / minimum 600 mA.
Specifications:
Relays have Normally Open (NO) and Normally Closed (NC)
Contacts each capable of switching max:
- 12VDC/10A
- 24VDC/10A
- 125VAC/10A
- 250VAC/7A
Dimensions:
KMTronic_8Relay_Dimension.pdf
Commands:
FIRST channel commands:
OFF command : FF 01 00 (HEX) or 255 1 0 (DEC)
ON command : FF 01 01 (HEX) or 255 1 1 (DEC)
...
EIGHT channel commands:
OFF command : FF 08 00 (HEX) or 255 8 0 (DEC)
ON command : FF 08 01 (HEX) or 255 8 1 (DEC)
ID:
from 01 to15 manually through a DIP Switch
KMTronic USB RFID 125 kHz Access Control Reader Module 6H FORMAT
Complete including:
- One USB RFID Reader
- One RFID Blue Eye Key Fob Tag with label (unique 10 digit ID)
- Two EM4200 ISO RFID cards
Manufacturer:
KMTronic LTD
Features:
Fully assembled and tested.
Powered from USB
Communication: 9600 bps serial through virtual USB COM port
LED and Buzzer indication
FT232RL chip for USB to Serial converter
The RFID reader is designed to work with all EM41xx/EM42xx family 125 kHz RFID tags including cards, buttons, capsules, disks, key fobs, and other compatible chips
Supply:
Powered from USB
Powered from USB
Dimensions:
92 mm / 58 mm / 22 mm
Read Distance:
2 ~ 7 cm (dependant on tag)
Installation: - Access control
- Automatic identification
- Robotics
- Inventory tracking
- Payment systems
- Industrial automation
Drivers:
http://www.ftdichip.com/Drivers/VCP.htm
Drivers are available to work with the following operating systems:
ALL WINDOWS's, Linux, Mac OS X, Mac OS 9, Mac OS 8, Windows CE.NET (Version 4.2 and greater)
Communication Parameters:
USB to Serial adapter:
8 Data, 1 Stop, No Parity
Baud rate : 9600
Output:
3 bytes tag number in HEX format
Example number: A3E142
Converted in DEC format is 0010740034
3 bytes tag number in HEX format
Example number: A3E142
Converted in DEC format is 0010740034
DIY Raspberry Pi Door Lock Example
Arduino ADK Example
Subscribe to:
Posts (Atom)