Software examples

Software examples (74)

Children categories

Thursday, 20 June 2013 07:01

UDP Bat File Control 4

Written by

 

 

 

 

 

File:

UDP_Relay_1_ON_OFF_keyboard_1.bat

 

Commands:

UDP_Relay.exe 192.168.1.199:12345 FF0101
pause
UDP_Relay.exe 192.168.1.199:12345 FF0100

 

 

 

 

Back

 

 

 

 

Thursday, 20 June 2013 06:59

UDP Bat File Control 3

Written by

 

 

 

 

File:

UDP_Relay_1_ON_OFF_5_SEC_.bat

 

Commands:

UDP_Relay.exe 192.168.1.199:12345 FF0101
timeout /t 5
UDP_Relay.exe 192.168.1.199:12345 FF0100

 

 

 

 

Back

 

 

 

 

Thursday, 20 June 2013 06:57

UDP Bat File Control 2

Written by

 

 

 

 

 

File:

UDP_Relay_1_OFF.bat

 

Commands:

UDP_Relay.exe 192.168.1.199:12345 FF0100

 

 

 

 

Back

 

 

 

 

Thursday, 20 June 2013 06:49

UDP Bat File Control 1

Written by

 

 

 

 

File:

UDP_Relay_1_ON.bat

 

Commands:

UDP_Relay.exe 192.168.1.199:12345 FF0101

 

 

 

 

Back

 

 

 

 

 

 

 

 

Download ZIP file:

KMTronic-UDP-Bat-File-Control-Examples.zip

 

Unzip in any folder

( in the example "D:\KMTronic )

 

All examples are configured to work with default settings
IP address: 192.168.1.199
UDP Port: 12345

 

 

 

UDP-Relay-1-OFF.bat

 


UDP-Relay-1-ON.bat

 


UDP-Relay-1-ON-OFF-5-SEC.bat

 


UDP-Relay-1-ON-OFF-keyboard-1.bat

 


UDP-Relay-1-ON-OFF-keyboard-2.bat

 


UDP-Relay-1-ON-OFF-keyboard-3.bat

 


UDP-Relay-1-ON-OFF-keyboard-4.bat

 


UDP-Relay-1-ON-OFF-keyboard-5.bat

 

 

 

 

 

 

 

Saturday, 15 June 2013 15:06

Control KMTronic relays with CVI/Labwindows

Written by

 

 

 

CVI/Labwindows

LabWindows/CVI National Instruments Corporation is a streamlined ANSI C integrated

development environment combined with the industry’s

most effective tools for building test and measurement applications.

 

www.NI.com/LwCVI/‎

 

 

-----------------------------------------------------------------------------------------------------

 

Commands

 

sprintf(sendbuf,"\xFF\x01\x01");  // relay number 1 is ON
viWrite (instr, sendbuf, 20, VI_NULL);                              

sprintf(sendbuf,"\xFF\x01\x00");  // relay number 1 is OFF
viWrite (instr, sendbuf, 20, VI_NULL);                              

 

-----------------------------------------------------------------------------------------------------

 

 

 

 

 

Saturday, 25 May 2013 13:07

Controlling LAN UDP Relay board via PHP

Written by

 

 

 

PHP examples

 

-----------------------------------------------------

 

PHP code for STATUS Read UDP Relay board connected to

IP: 192.168.1.199

PORT:12345

UDP COMMAND: FF0000

 

<?php

 

$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

$msg = "FF0000";
$len = strlen($msg);

socket_sendto($sock, $msg, $len, 0 ,'192.168.1.199', 12345);

socket_recvfrom($sock, $buf, 12, 0, $from, $port);
echo $buf;


socket_close($sock);

?>

 

-----------------------------------------------------

 

PHP code to turn ON first relay UDP Relay board connected to

IP: 192.168.1.199

PORT:12345

UDP COMMAND: FF0101

 

 

<?php

 

$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

$msg = "FF0101";
$len = strlen($msg);

socket_sendto($sock, $msg, $len, 0 ,'192.168.1.199', 12345);
socket_close($sock);

echo "Relay 1 is ON";

?>

 

 

-----------------------------------------------------

 

PHP code to turn OFF first relay UDP Relay board connected to

IP: 192.168.1.199

PORT:12345

UDP COMMAND: FF0100

 

 

<?php


$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

$msg = "FF0100";
$len = strlen($msg);

socket_sendto($sock, $msg, $len, 0 ,'192.168.1.199', 12345);
socket_close($sock);

echo "Relay 1 is OFF";

?>

 

 

-----------------------------------------------------

 

 

 

 

 

 

 

 

Download from

www.wireshark.org

 

Run and set filter "udp.port == 12345"

 

Send UDP command "FF0101" to Relay board and

see command and reply from board

 

 

 

 

Wednesday, 22 May 2013 07:45

Controlling UDP LAN Relays via Macro Express

Written by

 

 

 

Macro Express contains hundreds of commands to automate practically any function on your computer.

Just press a key and let the macro do all the repetitive work for you.

 

 

Download from:

http://www.macros.com/download.htm

 

 

Download KMTronic "UDP_Relay.exe" from:

http://www.info.kmtronic.com/software/UDP_Relays/KMTronic_UDP_Relay_Control.zip

 

 

Unzip in example in "D:\KMTronic_UDP_Control" folder

 

 

Connect UDP Relay

 

 

Run Macro Express and set:

 

This command will activate first channel UDP relay board connected to

IP:192.168.1.199 PORT:12345

 

UDP_Relay.exe commands:
UDP_Relay.exe <IP:PORT> <COMMAND>


Example:
UDP_Relay.exe 192.168.1.199:12345 FF0101 (this will turn ON relay channel 1)
UDP_Relay.exe 192.168.1.199:12345 FF0100 (this will turn OFF relay channel 1)

 

 

 

 

 

 

 

 

Page 4 of 6