Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

KMTronic USB Relay

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
gooihup
Posts: 18
Joined: 19 Jan 2012, 05:09

KMTronic USB Relay

Post by gooihup » 22 May 2013, 17:18

I have a KMTronic USB Relay for the purpose of switching on and off a string of LED diodes.
http://www.kmtronic.com/usb-one-relay-box.html

Windows 7 communicates with the device via com4. I have installed and successfully tested the device using the manufacturer's test software. However, I'm not sure how to send the commands via Ventuz's serial node.

Manufacturer's instructions...
Communication Parameters :
8 Data, 1 Stop, No Parity
Baud rate : 9600

Commands :
“FF 01 00” (HEX) or “255 1 0” (DEC) - OFF command
“FF 01 01” (HEX) or “255 1 1” (DEC) - ON command
“FF 01 03” (HEX) or “255 1 3” (DEC) - Status request
NOTE : Each command consists in 3 binary bytes (shown in hexadecimal below) without any space!

So in the Ventuz SerialText node, I added to custom model "on" and "off" methods.
OutOn: FF 01 01
OutOff: FF 01 00

Pins RTS and DTR I have left unchecked.

Port: 2nd Device (COM4)
Baud: B9600
DataBits: D8
Parity: None
StopBits: One
Handshake: None
Encoding: ???
StartOfText: ???
EndOfText: ???

Question: For "Encoding", "StartOfText" and "EndOfText" I have tried every possible combination. None successful. Could it be the text in my SendOn & SendOff is incorrect? Should it be entered differently? Can anyone point me in the right direction?

There is a C# Net example here http://kmtronic.com/kmtronic-cs-net-2010-example.html but I am not familiar with programming languages so I thought it would be simpler to just use the SerialText node to control the switch.
Mervyn @ AccuCap

partyboarder
Posts: 13
Joined: 20 Jun 2013, 20:58

Re: KMTronic USB Relay

Post by partyboarder » 20 Jun 2013, 22:51

Hi there gooihup

what you are doing is sending characters "F","F"," ","0","1"," ","0","0"
which would be in HEX for example 46,46,20,30,31,20,30,30 and not FF,01,00
so you are actually sending 8 Values instead of your wanted 3

you need to change the encoding to ISO-8859-1 and send &#255;&#001;&#000; then play a little with the start/end
it will then send the right values. however the reply that you will get for the status request could be a little messy since the serialtext node doesn't seem to translate the encoding backwards.

have fun
Henning

alfred

Re: KMTronic USB Relay

Post by alfred » 23 Jun 2013, 12:38

Hey gooihup and Henning,
Do you want to control the string of LED diodes via Ventuz PC?
I need to trigger the content in a 65" LCD display via a touchtable, and at the same time, a string of LED diodes also needed to be controlled by the same touch table, for example on and off.
Can the KMTronic USB relay do what I need?

Thanks in advance!
Alfred

partyboarder
Posts: 13
Joined: 20 Jun 2013, 20:58

Re: KMTronic USB Relay

Post by partyboarder » 24 Jun 2013, 06:01

hi alfred

think of the kmtronic USB relay of a light switch in your living room. it has to purposes it can close one circuit while opening another.

http://sigma-shop.com/userfiles/product ... ct_225.jpg ( i just googled for a picture ... no affiliation with the webshop)
http://sigma-shop.com/product/7/usb-rel ... l-box.html

loot at the picture at the above link. there are three hook-ups

NC, C, NO

C is the common attaching point. you would hook up your your positive lead from the power supply to that.
NC mean "normally closed" .... meaning when in "idle" it is a closed circuit.
NO mean "normally open" ... means when in idle it is NOT a closed circuit. (using boolean algebra that would mean open circuit ;), who the hell is DeMorgan hehe . )

you would hook up your power supply to C and the LEDs to NO .... because then in "idle" (means not activated) the circuit would be open .... as in the LEDs would be dark
when issuing the command of FF 01 01 (HEX) to close the circuit ... the relay will open the NC side of the circuit and close the NO side - thus closing the circuit from the powersupply to the LED

judging from the datasheet of the KMtronic ... you can ether put the kmtronic relay between mains (120V/240V)and the powersupply or between the powersupply and the LEDs
it can do 24V with 15A or 110/240V with 10A .....

i would put it before the powersupply - second option - as it will also cut off the powersupply from any idle power consumption while being switched off

hope that helps

questions .... ask!
Henning

alfred

Re: KMTronic USB Relay

Post by alfred » 24 Jun 2013, 09:19

Hey Henning,
first of all, thanks for you detailed reply. After viewing your feedback, I still have some questions. 1)How to hook up power supply to C and LEDs to NO? 2)how to issuing the command;3)What is the “mains”


Thanks!
alfred

partyboarder
Posts: 13
Joined: 20 Jun 2013, 20:58

Re: KMTronic USB Relay

Post by partyboarder » 24 Jun 2013, 14:00

Hi Alfred

last question first .... mains is just another name for AC voltage meaning 240V/120V

In my first reply i wrote ... take a serial node .... use "&#255;&#001;&#000;" (remove the quotes), change the encoding to ISO-8859-1 and you are good to go

actually i thought a little about me saying put the switch before the power adapter .... in a private surrounding i would do that to save energy. but in a professional surrounding like an event i rather would put the switch between the power adapter and the LED. This way we only mess with low voltages and since the power adapter is most likely certified and no other certifications are needed. at least in germany.

now to the circuit.
you have a power adapter with two wires coming out of it. take the negative wire connect it to the cathode of the LED. Take the positive wire of the adapter and connect it to "C" of the switch. Take a new wire and connect NO to the anode of the LED. thats it. turn it on by sending &#255;&#001;&#000, turn it off by sending &#255;&#001;&#001. et voila.

have fun
Henning

gooihup
Posts: 18
Joined: 19 Jan 2012, 05:09

Re: KMTronic USB Relay

Post by gooihup » 09 Jul 2013, 09:54

Hi guys! Very sorry for not replying sooner. I didn't know this thread was getting any response.

Henning, thanks for your input. I have 2 units with me to test with. Gimme a moment to try what you have suggested. I will revert with the outcome, even though my project doesn't have such requirement anymore.

Alfred, if what Henning suggests works, I will be happy to assist with any testing on my devices, if you require so that you can decide if this is suitable for you.
Mervyn @ AccuCap

gooihup
Posts: 18
Joined: 19 Jan 2012, 05:09

Re: KMTronic USB Relay

Post by gooihup » 09 Jul 2013, 18:43

Success!

I have gotten it to work with the following:
Port: 2nd device (COM4)
Baud: B9600
DataBits D8
Parity: None
StopBits: One
Handshake: none
Encoding: ISO_8859_1
StartOfText: None
EndOfText: None
Custom Models...
OutOff: &#255;&#001;&#000;
OutOn: &#255;&#001;&#001;

I'm not at all familiar with how the encoding works, but thank you Henning for pointing me in the right direction. At least the devices I purchased don't go to waste.

Alfred, if you have any tests you want me to try on your behalf before you make your purchase, drop me an email at mervyn.tan@accucap.com.my... just in case I don't notice your message in this thread.
Mervyn @ AccuCap

Post Reply