Pencom Design S1-RLY-EXT User manual

Software
The relay boards can be used with almost any software language that is able to use the PC
RS232 serial port. The relay board recognizes standard ASCII characters that are transmitted
from the host computer. Commands are case sensitive.
A H 1 <cr>
Board
Identification
Board Command
Relay
Number or Data
“<Board Identification><Board Command><Relay Number or Data><Carriage return>”
Board Identification
The Board ID is “A” For the
single or dual channel relay
boards, these boards will only
respond to this address.
Board Commands
H = Relay HIGH (ON)
L = Relay LOW (OFF)
R = Read relay status
W = Write data latch
M = Momentary Delay
T = Toggle relay
Relay Number or Data
(H or L) = Relay number 1 or 2 or 0
to turn ON all relays on the selected
board
(R) = receive a number 0 – 3
(W) = write a number 0 - 3
Board identification:
The board address is the first part of the command sent to the relay board it is set to “A” in
firmware and may not be changed for the single and dual channel relay boards.
Board Commands:
The board command is the second part of the serial data sent to the relay board. These
commands work in conjunction with the third part of the serial data that will be explained in
the following section.
H= Relay High (ON) – Sending an “H” will direct the board to turn ON the relay (making a
connection between the NO & COM contacts on the board).
L= Relay High (OFF) – Sending an “L” will direct the board to turn OFF the relay (breaking
the connection between the NO & COM contacts on the board).
W= Write data latch – Sending an “W” will write directly to the port. This command allows
you to turn multiple relays ON or OFF on the same board at the same time.
R= Read relay status – When this command is sent to the board, the board will respond back
to the PC with a decimal number, which corresponds to the status of the relays on the board.
This will be explained in more detail below:
M= Momentary Command – This command will briefly activate or deactivate a single relay
or all relays. The initial state of the relay will determine whether the relay toggles ON – OFF
– ON or OFF – ON – OFF. The momentary delay default is 30 milliseconds, but may be
changed from 10-50 milliseconds in the setup.
T = Toggle command - The toggle command will reverse the relay from it’s current position.
The initial state of the relay will determine whether the relay toggles ON or OFF.
Relay Number or Data:
The relay number or data command is the third part of the serial data that is sent to the relay
board(s) - this data is numerical. The data that is sent or received will relate directly to the
board commands that were explained in the previous section.
If the board command is “H” or “L”:
Send a number 1 or 2 which represents the relay number on the board and will turn ON or
OFF the individual relay specified. Sending a zero that will turn ON or OFF ALL relays
on this board.
If the board command is “W”:
Send a number from 0 to 3. When this number is converted into binary, it represents the
relay numbers on the board. This command allows you to turn multiple relays ON or
OFF at the same time with one command. Binary data is one’s and zero’s which
represents ON and OFF on the relay board (ON = 1 & OFF = 0). See table #1
Plug in the wall transformer or apply power to board (on-board transformer). Make sure the
board address in the software is set to “A”. This is the software default and is used in a single
or dual channel board configuration. Click ON #1 relay in the software program and there
should be an audible click from the relay selected, and the LED will illuminate.
NO
C
NC
N/L2L1
Ch1
Copyright (c) 2008 Pencom Design, Inc
2CH- RLY
T1
RS-232 IN
NO
C
NC
Ch2
GND
PC
Ground
Line
Neutral
Line or
Posi tive Voltage
Device to
Control
NegativeorNeutralW ire
Modular cable
Modul ar cable adapter
connected to the serial port
Figure2
Connecting Relay Outputs
At the right side of the board as shown above you will see one or two 3-contact terminal blocks
marked with NC, COM, NO these are the relay outputs. Relay channel numbers are marked
next to each terminal block. Warning do not touch any other components on the board since
static electricity from your fingers may damage these devices.
Strip the insulation back on your wire approx. ¼ inch. Wire the hot (or positive if DC) side of
the power to the COM pin, and the output to the device under control using the NO (normally
open) or NC (normally closed) pins depending on your application. Insert the stripped wire
into the side of the terminal block and tighten the screw to clamp the wire in place. The
terminal blocks are designed for 14-22 AWG wire size. Do not exceed the 10 amp current
rating of the relays. Most applications will use the normally open contacts. See the relay
datasheet available for download from our website.
Modular Cable Wiring
When routing modular cables, do not place them next to power cables as this will induce noise
on the lines and could cause RS232 communication problems.
Important use only reversed wired modular cables in Figure 3, NOT network/printer/data
cables-- that are straight wired which may damage the boards as shown in Figure 4. Note in
Figure 3, when you hold the modular connectors together on both ends of the wire with the
gold pins facing you the same color wires are on opposite sides (the color doesn't matter only
the position).
See figures 3 & 4 below to view diagrams of wiring differences:
DO NOT USE
Figure 4
Straight Connection for network or data use only
CORRECT
For Relay Boards
Figure 3
Reverse Connection for normal telephone lines.
Pencom Design, Inc. 2 Pencom Design, Inc. 3 Pencom Design, Inc. 4
Transmission distance, PC to relay Board:
Standard RS232 specifications 50 feet, minimum.
Relay outputs:
10 Amp 240VAC/28VDC SPDT 1 form C power relays.
Operating Temperature & Humidity:
0º to 70º Fahrenheit, 90% Relative
RoHS Compliant: Only units with a “-O” suffix in the part number.
Parts Listing
All Models Include:
1 – Custom wired RS232 9 pin Dsub to Modular Cable Adapter
(Part number: ADP-MOD)
1 – RJ-11 Modular telephone cable (reverse wired)
Part Number MC4-7.
Model: S1-RLY-INT & S2-RLY-INT
With internal power transformer 120VAC 50/60 Hz with terminal block connection.
Model: S1-RLY-INT-2 & S2-RLY-INT-2
With internal power transformer 230VAC 50/60 Hz with terminal block connection.
Model: S1-RLY-EXT & S2-RLY-EXT
1 - AC to 9VDC Wall Transformer adapter
Setup Instructions
Important: make sure you use the proper modular cables (reverse wired) when connecting the
relay board to the PC. A 7’ cable is supplied with the unit, but some customers require longer
cables to extend the distance from the PC. If you intend to extend the distance from the PC
purchase the cables with your unit to assure correct configuration.
Connect the computer, RS232 Modular cable adapter, modular cable, relay card, and wall
transformer as shown in Figure 1. If you have the internal transformer version reference Figure
2. Note if your version has a 230VAC input transformer connect one side of the 230V power
to L1 and the other side to L2/N on the terminal block, ground wire is connected to GND.
Note only one output connection is shown on the drawing although this is a dual channel unit.
The relays can control an AC or DC voltage.
PC
Modular cable
adapter
connec ted to the
serial port
Modular Cable
Figure 1
Wall
Tranformer
NO
C
NC
Ch1
Copyright (c) 20 08 PencomDe sign, Inc
RS- 232 IN
NO
C
NC
Ch2
Line or
Pos itive Voltag e
Devic e to
Control
Download, install, and run the relay test software on your Windows based personal computer.
Select the correct COM port in the software that’s connected to the relay board. The Relay
Test Program operation is explained in the help file.

Introduction
Thank you for buying our RS232 controlled Relay board.
The goal of Pencom Design is to provide top quality equipment at low cost. All of our
products are designed and tested in-house to meet our high quality standards.
Features
Low cost universal 1 or 2 channel serial relay board with heavy duty 10 Amp 240VAC/28VDC
SPDT power relays.
Easy hook up using standard modular telephone cable. A 9-pin serial to modular cable adapter
and cable is included to connect the PC with the device.
Almost any software language that is able to write to the PC serial port and concatenate the
string can communicate with this relay board – NO special drivers needed. Simple ASCII
commands to control the relays. 4800-38400 (9600 default) baud, 8 bits, no parity, 1 stop bit.
Each relay will latch ON or OFF depending on what command is sent and will maintain this
position until power is removed or changed again in software.
Two different Board design versions available, both can be mounting in the customers
enclosure, or a plastic enclosure ( P/N RLY-ENC-EXT) is available separately for the –EXT
version only.
•Circuit board with an external wall transformer. (-EXT)
•Circuit board with internal on-board mounted transformer. (-INT)
A windows based, relay testing software is available to verify operation, and program the
optional features on the boards of our 1 & 2 channel relay boards before writing your own
software program. See our website to download the software or order on disk.
Applications
•Industrial control applications •Process control systems
•Automatic test equipment (ATE) •Power switching applications
•Lighting control equipment
Specifications
Dimensions:
External transformer version: 3.04” Wide X 4.20” Length X 1.012” High
Internal transformer Version: 3.04” Wide X 4.20” Length X 1.500” High
Connections:
1 RJ-12 Modular phone jack for RS232 input to relay board from PC.
1 or 2 3 contact Terminal blocks for output connections for 14-22 AWG wire.
1 Power Jack for DC wall transformer (external transformer version)
1 120VAC or (230VAC) 3-pin Terminal Block (internal transformer version)
Power Requirements:
9 Volts DC @ 300 MA wall transformer (Model: S1 & S2, “-EXT” versions)
120 VAC 50/60 HZ internal transformer (Model: S1 & S2, “-INT” versions)
230 VAC 50/60 HZ internal transformer (Model: S1 & S2, “-INT-2” versions)
Private Static Sub ShowData(Data As String)
'Eliminate line feeds.
Do
i=InStr(Data,Chr$(10))
If iThen
Data =Left$(Data,i- 1) & Mid$(Data,i+ 1)
End If
Loop While i
'Eliminate carriage returns.
Do
i=InStr(Data,Chr$(13))
If iThen
Data =Left$(Data,i- 1) & Mid$(Data,i+ 1)
End If
Loop While i
'Display data in a text box
TxtData.Text = Data
End Sub
There are numerous software languages that can utilize the PC for serial communications.
Information is readily available on the internet and in books explaining how to output to the
serial ports, in other languages. We are only showing you one example using the popular
graphical language Visual Basic. It’s an easy language to learn and has many powerful
features.
Additional information is available online at www.pencomdesign.com/support
Pencom Design, Inc. 5 Pencom Design, Inc. 1
If the board command is
“R”
Send any number from 0 to 255 (it doesn’t matter it will be ignored). The relay board will
immediately respond with a decimal number from 0 to 3 representing which relays are
active in the same method as explained above.
If the board command is “M”
Send a number from 1 to 8 which represents the relay number available on the board, and it
will momentarily active (or deactivate) the individual relay specified. You may also send a
zero which will momentarily active (or deactivate) ALL relays on this board. The initial
state of the relay will determine whether it is turned ON or OFF.
If the board command is “T”:
Send a number from 1 to 8 which represents the relay number available on the board, it will
reverse the relay from it’s current position on the individual relay. Sending a zero which
will toggle ALL relays on this board.
The board command structure is explained in more detail in application note #156 available for
download from our website.
Visual Basic Example
This example transmits data out to the relay board using the MSComm function to turn ON
Relay #2.
MSComm1.Output = "A" & "H" & "2" & Chr$(13)
1. “A” = Board address
2. “H” = Board Command (relay = high)
3. “2” = Relay Number as a string (quotes required), if using it in an equation use str(2).
4. Chr$(13) = carriage return, this must be sent after each command string.
5. The ampersand “&” operator is used to force string concatenation of the expressions.
Setup the Mscomm properties as follows:
DTREnable = False InBufferSize = 1024 Rthreshold = 1
EOFEnable = False InputLength = 0 RTSEnable = False
NullDiscard = True InputMode = 1 Sthreshold = 1
HandShaking = 0 OutBufferSize = 512 Settings 9600,8,n,1
The following code receives the data from the relay board on the “R” (Read command).
Private Sub MSComm1_OnComm()
‘Receive data on the serial port
Select Case MSComm1.CommEvent
Case comEvReceive
Dim buffer As Variant
Dim Data As String
buffer = MSComm1.Input
ShowData (StrConv(buffer,vbUnicode))
End Select
End Sub
Copyright
2008, Pencom Design, Inc. 08012251 Rev D 1-14-08
Pencom Design, Inc. 6
Pencom Design, Inc. •PO Box 870 •Trumbauersville, PA 18970 •(215) 538-2932 •www.pencomdesign.com
Single/Dual Channel Serial Relay Board
Single Channel Versions:
Model: S1-RLY-EXT
Model: S1-RLY-INT
Model: S1-RLY-INT-2
Dual Channel Versions:
Model: S2-RLY-EXT (Shown)
Model: S2-RLY-INT
Model: S2-RLY-INT-2
Relay # Decimal Relays
2 1 Equivalent Active
0 0 0 Both Relays OFF
0 1 1 Relay #1 ON
1 0 2 Relay #2 ON
1 1 3 Both Relays ON
“W” command Example:
To turn ON relay 2 and leave relay 1 OFF
you would send decimal number 2.
To turn ON relay 1 and leave relay 2 OFF
you would send decimal number 1.
Table 1
This manual suits for next models
5
Other Pencom Design Control Unit manuals
Popular Control Unit manuals by other brands

resideo
resideo Braukmann D05F-EF installation instructions

Nero
Nero Radio 8113 IР65 manual

powersoft
powersoft DigiMod IS integration kit Technical note

GEM
GEM 653 Installation, operating and maintenance instructions

Erica Synths
Erica Synths Black Series GUIDE ON ASSEMBLY

Siemens
Siemens Flowrite 599 Series Technical instructions