Wednesday, 11 December 2013 10:08

USB, RS232, RS485

Written by

 

 

 

 

Control KMtronic USB, RS485, RS232 relay boards via EXCEL files Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz

www.info.kmtronic.com/control-kmtronic-relays-via-excel.html


Control KMtronic USB, RS232 relay boards via BAT files Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz

www.info.kmtronic.com/control-kmtronic-relays-via-bat-files.html

 

Control KMtronic RS485 relay boards via BAT files Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz

www.info.kmtronic.com/control-kmtronic-rs485-relays-via-bat-files.html

 

Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz

www.info.kmtronic.com/usb-rs485-and-tcp-web-relay-boards-by-domoticz.html



KMTronic USB Relay Test software

http://info.kmtronic.com/kmtronic-usb-relay-test-software.html

 

KMtronic USB 8 Relay software

http://info.kmtronic.com/usb-8-relay-software.html

 

KMtronic One Relay Timer software

http://www.info.kmtronic.com/kmtronic-timer-software.html

 

RS485 Relays commands

http://info.kmtronic.com/kmtronic-rs485-relays-commands.html

 

DSP Robotics  FlowStone example

http://info.kmtronic.com/control-kmtronic-usb-relays-with-dsprobotics-flowstone.html

 

Labview example (thanks, Siva)

http://info.kmtronic.com/how-to-control-kmtronic-usb-relays-with-labview.html

 

MATLAB example (thanks, Dr. Dean Rose)

http://info.kmtronic.com/how-to-control-kmtronic-usb-relays-with-matlab.html

 

Windows Shortcut example for switching on and off  the KMTronic USB One Relay

http://info.kmtronic.com/windows-shortcut-example-for-kmtronic-usb-one-relay.html

 

Windows Command Line example

http://info.kmtronic.com/windows-command-line-example.html

Windows Command Line example 2 Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz

http://info.kmtronic.com/windows-command-line-example-2.html

 

Windows Startup Control

http://www.info.kmtronic.com/windows-startup-control-kmtronic-usb-relays.html


Abacom ProfiLAB example

USB_One_Relay_ProfiLAB.pdf

 

Controlling USB Relay via Microsoft Office PowerPoint   

Controlling_USB_Relay_via_Microsoft_Office_PowerPoint.pdf

http://info.kmtronic.com/controlling-usb-relay-controllers-via-microsoft-office-powerpoint.html

 

Mach3 CNC

http://info.kmtronic.com/mach3-and-kmtronic-usb-relays.html

 

GBTimelapse to control the Dynamic Perception MX2 Dolly using a USB relay

http://info.kmtronic.com/gbtimelapse-to-control-the-dynamic-perception-mx2-dolly-using-a-usb-relay.html

 

Macro Express   

http://info.kmtronic.com/controlling-usb-relay-via-macro-express.html

 

CVI/Labwindows

http://www.info.kmtronic.com/control-kmtronic-relays-with-cvilabwindows.html

 

Vixen lighting automation software

http://info.kmtronic.com/vixen-kmtronic-relays-control.html

 

Centrafuse AUTO

http://www.info.kmtronic.com/kmtronic-centrafuse-usb-relay.html

 

 

 

 

 

KMTronic USB One Relay Linux Test script

http://info.kmtronic.com/kmtronic-usb-one-relay-linux-test-script.html

 

Linux example

http://info.kmtronic.com/sample-linux-code.html

 

 

 

 

Macintosh example

USB_One_Relay_Macintosh.pdf

 

 

 

 

Controlling KMTronic Relays by Arduino ADK

http://info.kmtronic.com/controlling-kmtronic-relays-by-arduino-adk.html

 

 

 

 

Controlling RS485 Relays by Raspberry Pi  

http://info.kmtronic.com/controlling-rs485-relays-by-raspberry-pi.html

 

 

 

 

 

 

Sample VB NET 2010 software (inc. source code)

http://info.kmtronic.com/kmtronic-vb-net-2010-example.html

 

Sample Visual Basic code

USB_One_Relay_VB.pdf

VB_Relay_Example.zip

 

Sample C# NET 2010 software (inc. source code)

http://info.kmtronic.com/kmtronic-cs-net-2010-example.html

 

Sample C# code

USB_One_Relay_C#.pdf

 

Sample php files

USB_One_Relay_PHP.pdf

 

The Perl example(thanks, Pascal)  

http://info.kmtronic.com/how-to-control-kmtronic-usb-relays-using-perl-script.html

 

The python library(thanks, David)  

http://info.kmtronic.com/control-kmtronic-usb-relays-the-python-library.html

 

 

 

 

 

A USB relay for your D-Star repeater

http://info.kmtronic.com/a-usb-relay-for-your-d-star-repeater.html

 

Door lock using USB Relay

http://info.kmtronic.com/door-lock-using-usb-relay.html

 

Controlling KMTronic Relays by Loxone Home Automation Miniserver

http://info.kmtronic.com/controlling-kmtronic-relays-by-loxone-miniserver.html

 

Control4 RS232 8 Relay Board Driver License

http://info.kmtronic.com/control4-rs232-8-relay-board-driver-license.html

 

Self Service Tablet Kiosk by Enigma Systems LLC

http://info.kmtronic.com/self-service-tablet-kiosk-by-enigma-systems-llc.html

 

 

 

 

 

 

 

 

 

Monday, 09 December 2013 14:26

Controlling USB One Relay by Raspberry Pi

Written by

 

 

 

 

 

http://www.info.kmtronic.com/software/Raspberry_PI/Raspberry_PI_KMTronic_USB_Relay.zip

 

 

 

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

 

 

 

Set baudrate to 9600b/s

 

 

Switch ON relay

 

 

 

Switch OFF relay

 

 

 

Status request

 

 

Friday, 29 November 2013 16:24

How to change default settings KMTronic LAN board

Written by

 

 

 

 

Turn OFF Wi-Fi Internet if you using Laptop PC.

 

Open ‘Network and Sharing Center’ and go to ‘Local Area Connection’ properties.

 

Set as show in next screenshots:

 

 

 

 


Connect to PC direct !!!

 

Open Explorer and type 192.168.1.199 and press Enter.

 

If all is right you will see Login menu board.

 

Type ‘admin’ ‘admin’ and go to Configuration page, change Board IP address, Gateway IP address and click Save Config.

 

 

 

 

 

Monday, 09 September 2013 13:31

DINo IN OUT

Written by

 

Master (Inputs) Code

 

#include "EtherShield.h"

uint8_t mymac[6] = {0xCF,0x70,0x7C,0xE4,0x8A,0xB9}; // Master MAC
uint8_t myip[4] = {192,168,1,26};  // Master IP
uint8_t udpmac[6] = {0xCF,0x70,0x7C,0xE4,0x8A,0xB8}; // Slave MAC
uint8_t udpip[4] = {192,168,1,25}; // Slave IP
#define DEST_PORT_L  0x34
#define DEST_PORT_H  0x12

const char iphdr[] PROGMEM ={0x45,0,0,0x82,0,0,0x40,0,0x20}; // 0x82 is the total len on ip, 0x20 is ttl (time to live)

#define BUFFER_SIZE 750
static uint8_t buf[BUFFER_SIZE+1];
char reply[]={0xFF, 0x00, 0x00, 0x00, 0x00};

EtherShield es=EtherShield();

uint16_t plen, dat_p, a;

static uint32_t timetosend;

///----------------------------------------------------------
void setup(){
 
  es.ES_enc28j60Init(mymac);
  es.ES_init_ip_arp_udp_tcp(mymac,myip, 80);

} // end setup
///----------------------------------------------------------
void loop(){
 
    // read packet, handle ping and wait for a tcp packet:
    dat_p=es.ES_packetloop_icmp_tcp(buf,es.ES_enc28j60PacketReceive(BUFFER_SIZE, buf));
           
    if(millis() - timetosend > 100) // every 10 seconds //
    {
    timetosend = millis();
    if ( check()  )
              {
                reply[1] = digitalRead(A5) ? 1 : 0;
                reply[2] = digitalRead(A4) ? 1 : 0;
                reply[3] = digitalRead(A3) ? 1 : 0;
                reply[4] = digitalRead(A2) ? 1 : 0;
                UDP_Send();
              }
    }
    
} // end loop


void UDP_Send( void ) {
  uint8_t i=0;
  uint16_t ck;
  // Setup the MAC addresses for ethernet header
  while(i<6){
    buf[ETH_DST_MAC +i]= udpmac[i];
    buf[ETH_SRC_MAC +i]= mymac[i];
    i++;
  }
  buf[ETH_TYPE_H_P] = ETHTYPE_IP_H_V;
  buf[ETH_TYPE_L_P] = ETHTYPE_IP_L_V;
  es.ES_fill_buf_p(&buf[IP_P],9,iphdr);

  // IP Header
  buf[IP_TOTLEN_L_P]=28+sizeof(reply);
  buf[IP_PROTO_P]=IP_PROTO_UDP_V;
  i=0;
  while(i<4){
    buf[IP_DST_P+i]=udpip[i];
    buf[IP_SRC_P+i]=myip[i];
    i++;
  }
  es.ES_fill_ip_hdr_checksum(buf);
  buf[UDP_DST_PORT_H_P]=DEST_PORT_H;
  buf[UDP_DST_PORT_L_P]=DEST_PORT_L;
  buf[UDP_SRC_PORT_H_P]=0x12;
  buf[UDP_SRC_PORT_L_P]=0x34; // lower 8 bit of src port
  buf[UDP_LEN_H_P]=0;
  buf[UDP_LEN_L_P]=8+sizeof(reply); // fixed len
  // zero the checksum
  buf[UDP_CHECKSUM_H_P]=0;
  buf[UDP_CHECKSUM_L_P]=0;
  // copy the data:
  i=0;
  // most fields are zero, here we zero everything and fill later
  uint8_t* b = (uint8_t*)&reply;
  while(i< sizeof( reply ) ){
    buf[UDP_DATA_P+i]=*b++;
    i++;
  }
  // Create correct checksum
  ck=es.ES_checksum(&buf[IP_SRC_P], 16 + sizeof( reply ),1);
  buf[UDP_CHECKSUM_H_P]=ck>>8;
  buf[UDP_CHECKSUM_L_P]=ck& 0xff;
  es.ES_enc28j60PacketSend(42 + sizeof( reply ), buf);
}


int check()
{
        if (digitalRead(A5) != reply[1] ) return(1);
        if (digitalRead(A4) != reply[2] ) return(1);
        if (digitalRead(A3) != reply[3] ) return(1);
        if (digitalRead(A2) != reply[4] ) return(1);
        return 0;

}

 


 

 

Slave (Relays) code

 

#include "EtherShield.h"

uint8_t mymac[6] = {0xCF,0x70,0x7C,0xE4,0x8A,0xB8};
uint8_t myip[4] = {192,168,1,25};
uint16_t MYWWWPORT = 80;

#define BUFFER_SIZE 750
static uint8_t buf[BUFFER_SIZE+1];

EtherShield es=EtherShield();

uint16_t plen, dat_p;

///----------------------------------------------------------
void setup(){
Serial.begin(9600);
Setup_Pins();
es.ES_enc28j60Init(mymac);
es.ES_init_ip_arp_udp_tcp(mymac,myip, MYWWWPORT);

} // end setup


///----------------------------------------------------------
void loop(){

// read packet, handle ping and wait for a tcp packet:
dat_p=es.ES_packetloop_icmp_tcp(buf,es.ES_enc28j60PacketReceive(BUFFER_SIZE, buf));

if (buf[IP_PROTO_P]==IP_PROTO_UDP_V){
Relay_Control();
buf[IP_PROTO_P]=0;
}

} // end loop


///----------------------------------------------------------
void Setup_Pins(){

pinMode(5, OUTPUT); digitalWrite(5, 0);
pinMode(6, OUTPUT); digitalWrite(6, 0);
pinMode(7, OUTPUT); digitalWrite(7, 0);
pinMode(8, OUTPUT); digitalWrite(8, 0);

} // end Setup_Pins


///----------------------------------------------------------
void Relay_Control(){
Serial.print(buf[43], HEX);
//if (buf[42]==0xFF)
// {
//Serial.print(buf[43], HEX);
digitalWrite(8, buf[43]);
digitalWrite(7, buf[44]);
digitalWrite(6, buf[45]);
digitalWrite(5, buf[46]);
// }
} // end Relay_Control

 

 


 

Monday, 26 August 2013 08:40

Vixen KMtronic Relays Control

Written by

 

 

 

Vixen KMtronic Relays Control

 

 

 

Download and install Vixen Lightning from

http://www.vixenlights.com/

 

 

Download information and DLL:

http://www.info.kmtronic.com/Vixen_KMtronic_Relays_Control.zip

 

 

 

 

 

Wednesday, 07 August 2013 04:37

PLC 8 relay remote control net for Android

Written by

 

 

PLC 8 relay remote control net

Vincenzo Scozzaro

 

8 channels WEB Relay board

 

 

https://play.google.com/store/apps/details?id=com.zeno.plc8relayonoff

 

 

 

 

 

 

 

 

 

Tuesday, 30 July 2013 13:42

MyDomotica

Written by

 

 

MyDomotica

 

http://phsoftware.altervista.org/MyDomotica.html

 

 

 

 

 

 

 

Playstore app:
https://play.google.com/store/apps/details?id=com.phsoftware.mydomoticahd

 

 

Some functions:
Support up to 60 relay (is not important how many board)
Relay state
Connection automatic/manual
Use Gps for restricted area
Password security
Skin (2)
Can use realy from Ipcamera (some Foscam or clone)
Italian/english language
Voice command
etc

etc

 

 

 

 

 

 

 

 

Tuesday, 23 July 2013 06:48

USB 8 Relay software

Written by

 

 

KMTronic USB Relay software

 

 

 

Download from:

https://www.info.kmtronic.com/software/USB_Relays/KMTronic_usb_relay_software.zip

 

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.

 

You can download this from there:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992

 

The 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.

 

 

 

 

 

Tuesday, 09 July 2013 15:17

USB 8 Relay BOX Drivers Instalation

Written by

 

 

USB 8 Relay BOX

 

 

Download Drivers from:

https://info.kmtronic.com/software/USB_Relays/Driver_KMtronic_USB8relays_BOX_CDC.zip

 

UnZip in a separate folder ( in example D:\Driver_KMtronic_USB8relays_BOX_CDC )

 

 

Open Device Manager

 

Connect the board to PC

 

 

You will see USB CDC COM under "Other devices"

 

 

Click on USB CDC COM and next Update Driver...

 

 

Click on Browse my computer ...

 

 

Locate driver’s holder and click Next

 

Click on Install this driver ...

 

 

Wait until Windows install the driver

 

 

Windows will show confirmation message that drivers are installed

 

 

Close and open again Device Manager to check that USB COM is now installed

 

 

 

Windows 8

 

http://dangerismymiddlename.com/archives/8913

http://www.technipages.com/windows-8-disable-driver-signing.html

 

 

 

 

 

 

 

 

Page 10 of 33