midon design RS232Relay User manual

midon design
RS232Relay User Guide Version 3.02 Page 1 of 23
A Serial Relay Interface
RS232Relay
Figure 1 RS232Relay
RS232Relay User Guide Version 3.02
January 20, 2022

midon design
RS232Relay User Guide Version 3.02 Page 2 of 23
1. Table of Contents
1. Table of Contents ..........................................................................................2
1.1. List of Tables..........................................................................................3
1.2. List of Figures.........................................................................................3
2. Introduction....................................................................................................4
3. Installation......................................................................................................5
4. Configuring RS232Relay ...............................................................................8
4.1. MOM.......................................................................................................8
4.2. RLT.........................................................................................................8
4.3. TYP.........................................................................................................9
4.4. SPR........................................................................................................9
4.5. CLO........................................................................................................9
4.6. DEB......................................................................................................10
5. Using RS232Relay ......................................................................................11
5.1. RLx.......................................................................................................11
5.2. RLS ......................................................................................................11
5.3. PLx .......................................................................................................11
5.4. DIS .......................................................................................................11
5.5. RLT.......................................................................................................12
5.6. TYP.......................................................................................................12
5.7. RTC......................................................................................................12
5.8. HLP ......................................................................................................13
5.9. MEM.....................................................................................................13
5.10. VER...................................................................................................13
5.11. ZZZ ...................................................................................................14
5.12. Input Timeout....................................................................................14
6. RS232Relay Command Summary...............................................................15
7. Software Change History.............................................................................17
8. Trouble-Shooting Problems with RS232Relay.............................................18
9. Error Messages ...........................................................................................19
10. RS232Relay Schematic ...........................................................................20
11. Legal Disclaimer.......................................................................................23

midon design
RS232Relay User Guide Version 3.02 Page 3 of 23
1.1. List of Tables
Table 1 RS232 Cable Connections.......................................................................6
Table 2 RS232Relay Command List...................................................................15
Table 3 RS232Relay Software History................................................................17
Table 4 Common RS232Relay Problems and Resolutions.................................18
Table 5 RS232Relay Error Messages.................................................................19
1.2. List of Figures
Figure 1 RS232Relay............................................................................................1
Figure 2 Location of Connectors (Version C PCB)................................................5
Figure 3 Version D PCB........................................................................................6
Figure 4 Corrected Relay Contacts (Version C PCB ONLY).................................7
Figure 5 RS232Relay Schematic (Version C PCB).............................................20
Figure 6 RS232Relay Schematic (Version D PCB).............................................21
Figure 7 RS232Relay Schematic (Version E PCB).............................................22

midon design
RS232Relay User Guide Version 3.02 Page 4 of 23
2. Introduction
Thank you for your purchase of the RS232Relay. The following instructions will
assist you in configuring and operating the product.
RS232Relay provides an easy-to-use interconnection between your Personal
Computer (PC) and switched devices. The relays used on RS232Relay can be
connected to almost any load to perform “real-world” functions.
RS232Relay has the following features:
•4 dry contact relay outputs, each with a Form C contact, that is, a normally
open and a normally closed contact, each capable of handling 100 Volts
DC at up to 1.25 Amperes, or 120 Volts AC at 0.5 Amperes.
•Capable of Momentary, Pulsed or steady-state operation of the relays
oMomentary operation is useable from 1 second to 99 minutes
•On-board LED’s to show the state of the relays.
•Interfaces directly to your PC via a spare RS232 serial port, or via any
RS232 to USB converter
•Power input of 12 Volts AC or DC at 350 mA. Optionally, power can be
provided from a 5V USB power converter connected to J7 on the front
panel.

midon design
RS232Relay User Guide Version 3.02 Page 5 of 23
3. Installation
To complete this project, you will need to connect a 12 to 16 Volt (AC or DC)
transformer to connector J1 (see Figure 2 for the location of J1). The transformer
needs to supply at least 350mA. The polarity of the connection to J1 is not
important. J1 may be a 3 terminal connector and if so, the middle terminal is not
used. For Version D and later PCB’s, power may optionally be provided through
the USB connector J7 located on the front panel. Do not power up at this time.
Connect a standard serial cable (straight-through) between J2 and your PC.
Review Table 1 for which pins are used. Note: the USB connector J7 on
Version D and later PCB’s is provided for optional powering ONLY.
Figure 2 Location of Connectors (Version C PCB)

midon design
RS232Relay User Guide Version 3.02 Page 6 of 23
Figure 3 Version D PCB
Table 1 RS232 Cable Connections
Pin Number
Pin Name
Definition
1
Not used
2
TXD
Data from RS232Relay to your PC
3
RXD
Data from your PC to RS232Relay
4
Not used
5
GND
Ground
6
Not used
7
Not used
8
Not used
9
Not used

midon design
RS232Relay User Guide Version 3.02 Page 7 of 23
IMPORTANT:
Due to a Version C PCB error, the labels for J3, 4, 5 and 6 are incorrect. NO and
Care swapped on the PCB labels. Figure 3 shows how they should be
connected (J6 shown, but applies to all relay terminals). The NC contact is
correct on all connectors. This does NOT apply to Version D or later PCB’s
and the sequence of the relay connections are as shown on the PCB.
Figure 4 Corrected Relay Contacts (Version C PCB ONLY)

midon design
RS232Relay User Guide Version 3.02 Page 8 of 23
4. Configuring RS232Relay
Using Hyperterm, or any other terminal emulation program, configure the
connected serial port to 9600 BPS, No parity, 8 bits, 1 start bit and NO hardware
handshaking. Ensure that the port chosen matches the connected serial port.
Now, apply power to RS232Relay. The default start-up sequence will look like
this:
RS232Relay v3.02 2022-01-17
www.MidonDesign.com
www.n0dim.com
Serial # 2632C0000001436ECB2D
Debug = Off
Momentary Relay Action = Off
Relay Powerup Restore = Off
Relay #01= Off
Relay #02= Off
Relay #03= Off
Relay #04= Off
Clones: None Set
The following commands will establish the parameters you need to control your
relays.
4.1. MOM
Use the MOM command to determine if you want your relays to turn off a pre-
determined amount of time after turning on. The RLT command sets that time
interval, which can be anywhere from 1 second to 99 minutes. Setting MOM on
will enable the timer functionality.
Note that if the Momentary function is enabled, you will not be able to process
any further commands to any of the relays until after the first command has gone
through the time period established by the RLT command. If you need to
activate another relay in this period, use the RTC command to clear the timer
and then proceed as normal.
4.2. RLT
Set the time delay with the Relay Timer command. Input any number from 0 to
99. The time delay is measured in seconds (if TYP=S) or minutes (if TYP=M).
RLT is not a valid command if MOM is set to off.

midon design
RS232Relay User Guide Version 3.02 Page 9 of 23
Using a time of 0 will cause a near-instantaneous relay off whenever you turn a
relay on.
4.3. TYP
Use the TYP command to determine the type of time interval desired by the RLT
command. The options are S for Seconds and M for Minutes.
TYP is not a valid command if MOM is set to off.
4.4. SPR
Relay232 retains memory through a power failure, so if you want the relay states
to revert to what they were prior to a power failure, enable this capability with the
Set Power Restore On command (SPR on). This setting is defaulted to off.
4.5. CLO
The CLOne command provided for those cases when you may need more than a
SPDT (Single Pole Single Throw) contact closure for an external device. Cloning
a relay makes two relays operate exactly as if they were one unit and thus gives
you DPDT (Double Pole Double Throw) capabilities.
For example, if you want to use Relays 1 and 4 as a DPDT relay, use the
command:
CLO1=4
Anytime you then set or clear relay 1, relay 4 will also set or clear. The same is
true in reverse; operating Relay 4 will also operate Relay 1.
Cloning is only functional for 2 relays at a time. If you attempt to clone 3 or 4
relays together, only the first 2 will activate together.
RS232Relay ships with clones disabled. If you want to clear any clones you
have set, reset them all with the following command:
CLO0

midon design
RS232Relay User Guide Version 3.02 Page 10 of 23
4.6. DEB
Midon Design strives to ensure the highest quality of our software and hardware.
However, there are times when problems do occur. The DEBug command is
used to enable diagnostics so that Midon Design can trouble-shoot any problems
you may encounter. Normally the debug function is off, but if you have problems,
set debug on and send us any outputs from RS232Relay. This will speed up
assisting you. DEB parameters are On or Off.

midon design
RS232Relay User Guide Version 3.02 Page 11 of 23
5. Using RS232Relay
Other useful commands are available to interact with RS232Relay.
5.1. RLx
You control the relays directly from your PC using the RLx commands. The
syntax is:
RLx {on|off}
Where x can be “A”, “1”, “2”, “3” or “4”
RLA will turn on or off all the relays.
In Momentary mode, you cannot issue further RLx commands when a timer
sequence is in process. Use the RTC command to cancel the relay timer if you
need to do additional operations on the relays.
5.2. RLS
The Relay Status command will display the current relay states.
5.3. PLx
Use the PLx command to pulse any relay for approximately one second. This
can be used independently of the relay timer. The syntax is:
PLx
Where x can be “1”, “2”, “3” or “4”
The PLx command will return the selected relay to the state that it was in before
the command.
5.4. DIS
The DIS commands displays your system status, including all settings and the
current state of the relays.
The output will look something like this with MOM off:
RS232Relay v1.04 2009-09-01

midon design
RS232Relay User Guide Version 3.02 Page 12 of 23
www.MidonDesign.com
www.n0dim.com
Serial # 2632C0000001436ECB2D
Debug = Off
Momentary Relay Action = Off
Relay Powerup Restore = Off
Relay #01= Off
Relay #02= Off
Relay #03= Off
Relay #04= Off
Clones: None Set
With momentary mode set to on, the output will look like this:
RS232Relay v1.04 2009-09-01
www.MidonDesign.com
www.n0dim.com
Serial # 2632C0000001436ECB2D
Debug = Off
Momentary Relay Action = On
Relay Timer = 01 Seconds
Relay Powerup Restore = Off
Relay #01= Off
Relay #02= Off
Relay #03= Off
Relay #04= Off
Clones: None Set
5.5. RLT
The ReLay Timer command sets the amount of time until a relay is de-activated
after a RLxOn command has been issued. This parameter is only in use when
MOMentary mode is On. The TYP command determines if the time will be
measured in minutes or seconds.
5.6. TYP
The TYPe command is used to set the parameter for the relay timer. Valid inputs
are “S” for seconds or “M” for minutes.
5.7. RTC
The Relay Timer Cancel command will stop the timer when Momentary operation
is active. This may be useful if you need to change a relay when one has
already been set in momentary mode. This command is not valid if Momentary
mode is not enabled.

midon design
RS232Relay User Guide Version 3.02 Page 13 of 23
5.8. HLP
The HLP command displays a simple list of all available commands, like this:
>hlp
CLO
DEB
DIS
HLP
MEM
MOM
PL1
PL2
PL3
PL4
RLA
RL1
RL2
RL3
RL4
RLS
RLT
RTC
SER
SPR
TYP
VER
ZZZ
5.9. MEM
The MEMory command is available if you want to inspect any of the memory in
the RS232Relay program or data store. It can also be used, under direction of
our technicians, to modify data when trouble-shooting. USE THIS COMMAND
WITH GREAT CAUTION.
5.10. VER
The VERsion command outputs the software version and serial number of
RS232Relay. A related command is SER, which will display just the serial
number.

midon design
RS232Relay User Guide Version 3.02 Page 14 of 23
5.11. ZZZ
The ZZZ command will do a reset of RS232Relay, similar to power cycling the
unit but without the need to remove power. You should not normally need to use
this command.
5.12. Input Timeout
To avoid problems with erroneous characters, or noise on the serial input, there
is an input timeout for any commands. If more than 10 seconds elapse without a
valid input after a command has been started, the operation will abort with the
following error message:
? Input Timeout

midon design
RS232Relay User Guide Version 3.02 Page 15 of 23
6. RS232Relay Command Summary
Table 2 RS232Relay Command List
Command
Description
Syntax
CLO
Clone a relay to another
CLOx=y
Where x = 1 to 4, y = 1 to 4 and
the equal sign is provided by the
unit
DEB
Enable or disable debug outputs. Use
only when directed to by Midon Design
DEB<on|off>
DIS
Display all settings of RS232Relay
DIS
HLP
Display a list of available commands
HLP
MEM
Display and change specific memory
locations. Use only when directed to
by Midon Design
MEM <start location><cr>
MOM
Set or disable Momentary relay
function
MOM <on|off>
PLx
Pulses any relay or all relays from
current state to the opposite state
PLx
Where x = 1 to 4
RLT
Set the timer duration for the relay wait
period
RLT xx
Where x = 00 to 99 minutes (or
seconds) of wait period
RLx
Actuate a specific relay
RLx <on|off>
Where x = 1 to 4 or A for All
RLS
Display the Relay states
RLS
RTC
Relay Timer Cancel –stop the timer
when in momentary mode
RTC
SER
Display the serial number
SER
SPR
Enable or disable power on restore of
relay states
SPR <on|off>

midon design
RS232Relay User Guide Version 3.02 Page 16 of 23
Command
Description
Syntax
TYP
Set the type of time interval desired by
the relay timer
TYP <S|M>
Where S = Seconds or M =
Minutes
VER
Displays the current version of the
software loaded
VER
ZZZ
Resets RS232Relay
ZZZ

midon design
RS232Relay User Guide Version 3.02 Page 17 of 23
7. Software Change History
Table 3 RS232Relay Software History
Version
Date
Major Changes from Previous Loads
3.02
2022/01/18
•Modified to match PCB Version E.
3.01
2020/04/26
•Modified to match PCB Version D and NEW
processor.
1.04
2009/09/01
•Final production version of software

midon design
RS232Relay User Guide Version 3.02 Page 18 of 23
8. Trouble-Shooting Problems with RS232Relay
The most common problems associated with using RS232Relay are listed in the
following table. If these instructions do not result in better results with your
RS232Relay, please feel free to contact Midon Design at
[email protected]. We would be more than happy to assist you.
Table 4 Common RS232Relay Problems and Resolutions
Problem
Possible Causes
I cannot display RS232Relay output
on my PC
Ensure that you are connected with
the proper settings (9600 bps, no
parity) and that you are using a
straight-through, not a null-modem,
serial cable
I cannot see what I type on
Hyperterm (or other terminal
software)
This is normal for Hyperterm versions
that come pre-packaged with some
versions of Windows. Upgrade to a
commercial version of Hyperterm or
use different terminal emulator
software. Some versions will allow
you to set the “echo local characters”
functionality. Review your specific
software’s help instructions to
determine if it has that capability.
Relays turn off (or on) by themselves
You have enabled Momentary mode.
If this is not desired, disable
Momentary mode with the MOM Off
command.

midon design
RS232Relay User Guide Version 3.02 Page 19 of 23
9. Error Messages
Table 5 RS232Relay Error Messages
Message
Description
? Entry error
You have made a syntax error in entering a
command or a parameter
? Input Timeout
A parameter was not received within 10 seconds of
starting a command
? Wait until timer expired
You are in Momentary mode and tried to change a
relay before the timer expired. Use the RTC
command to cancel the timer and try again, or wait
for the timer to expire.
? Command not valid
Momentary Relay Action = Off
You are trying to use a relay timer command while
MOM is off. Enable MOM.

midon design
RS232Relay User Guide Version 3.02 Page 20 of 23
10. RS232Relay Schematic
Figure 5 RS232Relay Schematic (Version C PCB)
Table of contents
Other midon design Recording Equipment manuals