Kadtronix RWFC User manual

RS232-to-Wiegand Format Converter (RWFC)
Quick-Reference Installation Guide
Revision 1.5 – 11/24/19
enneth Delahoussaye Consulting
web: www.kadtronix.com
email: kadtr[email protected]
Copyright © 2015 - 2019
All rights reserved
1

Table of Contents
1 - Revision History...........................................................................................................4
2 - Introduction...................................................................................................................5
3 - Setup............................................................................................................................. 7
4 - Hardware Insta ation....................................................................................................8
5 - Option Settings.............................................................................................................9
5.1 - Options..................................................................................................................9
5.1.1 - Output Format (switches 1, 2)........................................................................9
5.1.2 - RS232 Baud Rate (switch 3).........................................................................10
5.1.3 - Wiegand Pu up Vo tage (switch 4)...............................................................10
5.1.4 - Wiegand Pu se Width (switch 5)...................................................................11
5.1.5 - Port Power (switch 8)...................................................................................11
6 - TB-1 Wiring Connections...........................................................................................12
7 - Source Data.................................................................................................................13
8 - Windows Host Software..............................................................................................14
9 - ASCII Commands.......................................................................................................16
9.1 - Periphera Activation...........................................................................................18
9.1.1 - Activate Re ay..............................................................................................18
9.1.2 - Activate Piezo Beeper...................................................................................18
9.2 - Source Data Parsing.............................................................................................19
9.2.1 - Set Data Start Index......................................................................................20
9.2.2 - Set Data Length............................................................................................20
9.2.3 - Set Search Character.....................................................................................21
9.3 - Wiegand Formatting............................................................................................22
9.3.1 - Format C ear.................................................................................................24
9.3.2 - Set Format Identifier.....................................................................................24
9.3.3 - Set Parity Mask............................................................................................25
9.3.4 - Set User Code Fie d......................................................................................27
9.3.5 - Set Site Code Fie d.......................................................................................27
9.3.6 - Verify Format................................................................................................28
2

9.4 - Misce aneous Commands...................................................................................29
9.4.1 - Assign Defau t Site Code..............................................................................29
9.4.2 - Report Configuration Settings......................................................................29
9.4.3 - Enab e Output Status Messages....................................................................30
10 - Care and Maintenance...............................................................................................31
11 - Warranty....................................................................................................................32
12 - Contact Information..................................................................................................33
3

1 - Revision History
Rev.
Date Description
1.5 11/24/19 •Updated photo images.
1.4 01/25/18 •Added section describing the pu se-width option
setting.
1.3 12/19/16 •Updated introductory description of the section
describing misce aneous commands
1.2 11/15/16 •Updated description of Wiegand pu ups
•Revised section describing periphera activation
•Corrected photo reference
1.1 11/14/16 •C arified avai abi ity of the USB cab e
1.0 09/01/15 •Initia Re ease
4

2 - Introduction
The RS232-to-Wiegand Format Converter (RWFC) provides format conversion for host
computers and RS-232 devices inc uding magnetic stripe and barcode readers. It may
a so be used with specia ized devices such as B uetooth seria dong es. (If the source
device has on y USB port(s), a USB-to-RS232 adapter wi be required.)
The RWFC is a DCE (data communications equipment) device with DB9 fema e
connector. (P ease refer to the app icab e note be ow for additiona information.) It a so
features detachab e USB cab e and AC adapter. The RWFC is idea y suited for use in
access contro and other app ications where it may be necessary to interface a seria
device to a Wiegand-based system. It provides seam ess format conversion, accepting a
RS-232 source input and outputting a Wiegand stream of bits.
Consider these features:
•Accepts RS-232 data source inc uding magstripe or barcode reader
•Source can a so be a host PC with USB port (requires USB-to-RS232 adapter)
•A so accepts data from specia ized devices inc uding RS-232 wire ess dong es
•Outputs standard Wiegand format (26-bit or 8-bit burst)
•Optiona custom formats a so possib e (via Windows host software and/or RS-232
ASCII commands)
•DB-9 (ma e) connector
•Onboard re ay (for optiona activation of externa device or equipment
•Housed in attractive p astic enc osure
•AC adapter (12vdc)
5

Notes:
•Some RS-232 sources output extraneous characters that precede the actua data.
For instance, magnetic stripe readers are known to output additiona characters
which are used as track de imiters. Using the Windows host software, you can
configure the RWFC to ignore these characters.
•When connecting to another DCE device such as a magstripe card reader, a nu -
modem adapter is required. When connecting to a DTE (data termina equipment)
device such as a host computer, the adapter is not necessary.
•Source devices or systems without a compatib e RS-232 port wi require a
suitab e adapter. For instance, a PC or aptop with on y USB ports can uti ize a
USB-to-RS232 adapter.)
•A wire ess interface is possib e with the use of a seria B uetooth dong e. This
device has a RS-232 port which can be connected to the RWFC, permitting
Wiegand conversion of ASCII data received from a B uetooth-enab ed host.
6

3 - Setup
Setup primari y invo ves the fo owing operations:
•Attach the RS-232 source device
•Connect the Wiegand destination device
•Estab ish DIP switch option settings
•P ug in the AC adapter
If the source device is a host computer (PC or aptop) with no RS-232 ports, a USB
adapter cab e wi be necessary (avai ab e from Kadtronix). In this instance, perform the
fo owing additiona setup steps:
•Insta the Windows drivers (using the CD inc uded with the adapter cab e)
•Attach the DB9 end of the adapter cab e to the RWFC contro er
•Attach the USB end of the adapter cab e to an avai ab e port on the host PC
•Verify that Windows identifies the adapter and oads the drivers
Additiona setup & insta ation detai s are provided in subsequent sections of this manua .
7

4 - Hard are Installation
WARNING: Be sure that power is not applied until all wiring has been completed and
verified.
Perform the fo owing operations:
•Disconnect the AC power source
•Detach cover by removing the retaining screws.
•Assign desired options. (Refer to "Option Settings".)
•Locate the 14-position wiring termina connector. (Refer to "TB-1 Wiring
Connections".)
•Attach wires associated with the Wiegand output destination
•Connect the RS-232 source device at the DB9 connector. (The RWFC is a Data
Communications Equipment [DCE] device. If the source device is a so a DCE
device such as a magstripe card reader, a nu -modem adapter wi be needed.)
•Re-attach cover and secure with retaining screws
•Connect the barre p ug of the AC power adapter into the mating receptac e of
the RWFC.
•P ug the AC adapter unit into a suitab e wa out et.
8

5 - Option Settings
The RWFC contro er has an 8-position set of on-board DIP switches for configuring
misce aneous options. To access the switches, remove the retaining screws from the
enc osure and then carefu y detach the id. (Be sure to power off the device prior to
opening the enc osure.) The photo above depicts interior e ements of the RWFC device
inc uding option switches:
Note:
•The RWFC contro er must be powered off prior to making any DIP switch
changes.
5.1 - Options
The DIP switches permit configuration of the fo owing options:
•Output format
•Source baud rate
•Wiegand pu ups
5.1.1 - Output Format (s itches 1, 2)
This setting defines the Wiegand format conversion to perform. You may se ect a pre-
stored format type or define a custom format. Configure the switches as fo ows for the
desired output conversion type:
Conversion DSW1 Switches
26-bit Wiegand 1 = off, 2 = off (defau t)
8-bit burst 1 = off, 2 = on
Custom format 1 = on, 2 = off (see note be ow)
Reserved 1 = on, 2 = on
Note:
•Custom formatting is possib e via RS-232 commands. For custom formatting
detai s, refer to "ASCII Commands".
•The RWFC contro er must be powered off prior to making any DIP switch
changes.
9

5.1.2 - RS232 Baud Rate (s itch 3)
This setting estab ishes the data rate for communicating with the source device or host
computer (for performing optiona host commands). Configure the switches as fo ows
for the desired baud rate:
Baud Rate DSW1 Switch
9600 3 = off (defau t)
19200 3 = on
Notes:
•Additiona RS-232 settings: 8 data bits, no parity, 1 stop bit.
•The RWFC must be powered down & restarted before a new baud rate
assignment can take effect.
5.1.3 - Wiegand Pullup Voltage (s itch 4)
Wiegand-based systems typica y provide a pu up vo tage on data signa ines D0 & D1.
If there is no avai ab e pu up vo tage, the RWFC can be configured to provide it as
fo ows:
Pullup Voltage DSW1 Switch
Disab ed 4 = off (defau t)
Enab ed 4 = on
Note:
•By defau t, output data signa s D0 & D1 assume a high impedance state when
inactive. During a Wiegand output transaction, the signa s are driven to high
and/or ow output transitions as required to fu fi the data transmission. Once the
conversion has comp eted, the signa s return to the high impedance state.
•The high impedance state is especia y crucia when there are other device(s)
concurrent y connected on the D0 & D1 data ines. These may inc ude card
readers, access contro ers, or other compatib e Wiegand items. It is imperative
for any attached device to re ease the data ines (i.e., invoke the high impedance
state) after generating a Wiegand transaction so that other devices may enact
subsequent transactions.
•The RWFC uti izes 10k resistors to provide a pu up vo tage of 4 to 5vdc. If the
option is enab ed, a pu up vo tage is app ied when the data ines are inactive (i.e.,
high impedance).
•Do not attempt to enab e pu up vo tage if another device a ready provides it.
10

5.1.4 - Wiegand Pulse Width (s itch 5)
This setting estab ishes the desired timing for Wiegand pu ses. Configure the switches as
fo ows for the desired pu se width:
Pulse Width DSW1 Switch
50 microseconds 5 = off (defau t)
100 microseconds 5 = on
Notes:
•In most cases, the defau t setting wi suffice. However, in some instances, a
onger pu se width may be required for compatibi ity with the receiving device.
•Spacing between Wiegand pu ses is a ways 1 mi isecond, regard ess of the
se ected pu se width.
5.1.5 - Port Po er (s itch 8)
The RWFC offers the capabi ity to provide power through the DB-9 connector. This
option is usefu when the externa RS-232 device is port-powered. The output vo tage
eve wi be rough y ha f the input supp y vo tage. For a 12VDC input, the output port
power wi be approximate y 6VDC.
DB9 Power DSW1 Switch
Disab ed 8 = off (defau t)
Enab ed 8 = on
When port power is enab ed, a vo tage is app ied at DB9 signa outputs DSR (pin 6) and
CTS (pin 8). Since the RWFC is a Data Communications Equipment (DCE) device, a
nu -modem adapter is required when connecting to another DCE device such as a
magnetic stripe card reader. With the adapter app ied, the RWFC behaves ike a DTE
device and wi app y port power at signa s DTR (pin 4) and RTS (pin 7) as indicated in
the tab e be ow:
RWFC output power
Without nu -modem With nu -modem
DSR (pin 6) DTR (pin 4)
CTS (pin 8) RTS (pin 7)
Note: Un ess the RS-232 device is port-powered, this option shou d remain off (disab ed).
11

6 - TB-1 Wiring Connections
The RWFC contro er provides a 14-position termina b ock with the fo owing screw
termina connections.
Terminal Description
1 Ground
2 +12VDC in/out (25vdc max)
3 +5V out (200 mA max.)
4 N/A
5 Wiegand D0
6 Wiegand D1
7 Ground
8 Re ay contact (N/C)
9 Re ay contact (COM)
10 Re ay contact (N/O)
11 RS-232 Tx data (a so avai ab e at DB-9)
12 RS-232 Rx data (a so avai ab e at DB-9)
13 Ground
14 N/A
Note:
•On y a subset of the above connections wi be required in a given app ication.
•If supp ying your own power source at termina s 1 & 2, do not a so concurrent y
provide power with the ac adapter at the barre connector.
•The maximum a owab e input power is +25VDC.
12

7 - Source Data
The RWFC contro er receives source data on the RS-232 port (via DB9 connector). The
data is received as standard ASCII character digits. Once received and buffered, this data
is converted to the specified format and then prompt y transmitted on the Wiegand signa
output ines. As an examp e, consider the fo owing ASCII source string received from
the remote device:
00065520
Assuming 26-bit conversion and a defau t site code of 100, the fo owing composite data
wi be assemb ed and formatted by the RWFC for Wiegand output as shown be ow:
P Site Code User Code / ID Number P
00100 (64h) 00065520 (FFF0h)
10110010011111111111100001
As a second examp e, presume 8-bit burst conversion and the fo owing ASCII source
string from the remote device:
00000050
The fo owing composite data wi be formatted by the RWFC for Wiegand output as
shown be ow:
Burst Data Value
50 (32h)
0 0 1 1 0 0 1 0
Notes:
•Each received ASCII source string from the host is converted into a composite
binary integer prior to being output via Wiegand. For 26-bit Wiegand format, a
16-bit binary va ue is created (max va ue = 65535). For 8-bit burst mode, an 8-bit
va ue is created (max va ue = 255).
•Typica y, burst formats contain no site code or parity bits.
•ASCII source strings received from the remote device must be terminated with a
carriage-return character (13 dec. or 0D hexadecima ).
•The maximum a owab e source data string ength is 30 characters.
13

8 - Windo s Host Soft are
Avai ab e RWFC host software for Windows provides functiona ity for configuring
source parsing parameters as we as optiona custom formatting. It a so provides the
capabi ity to issue a user-defined source string for issuing a test Wiegand output. The
fo owing is a summary ist of software features
•Estab ish source parsing parameters
•Configure a defau t site code
•Bui d any desired custom format (up to 99 bits in ength)
•Create user-defined source string and issue Wiegand outputs for testing
14

These are the requirements for insta ing the host software on your PC or aptop
computer:
•Pentium or compatib e CPU
•8 MB RAM
•1 MB avai ab e hard disk space
•1 avai ab e RS-232 or USB port
•Windows XP or higher
Note:
•Format se ection (standard or custom) requires appropriate DIP switch
configuration setting. (Refer to “Output Format” for detai s.)
15

9 - ASCII Commands
The RWFC contro er receives optiona ASCII host commands on the RS-232 port (via
DB9 connector). Commands are subdivided into the fo owing types:
•Periphera activation
•Source data parsing
•Wiegand formatting
•Misce aneous commands
The RWFC is capab e of receiving not on y host commands but a so source data. (Refer
to “Source Data” for detai s.) The two types are easi y distinguishab e in that commands
are prepended with a specia three-byte header sequence. The command header is shown
be ow, indicated in both ASCII text and hexadecima representations:
Command Header
ASCII Text Numeric
(Hex)
\SOH \STX > 01 02 3E
A transactions (host commands and source data) must be appropriate y fo owed by a
termination character as shown be ow:
Terminator
ASCII Text Numeric (Hex)
\CR 0D
The examp e be ow i ustrates a comp ete command sequence and is shown in both
ASCII text and hexadecima representations:
Command Example
(Activate Relay)
ASCII Text Numeric (Hex)
\SOH \STX > ! 0 5 \CR 01 02 3E 21 30 35 0D
16

Notes:
•The command format contains no spaces. (Spaces are inc uded in the examp e
above on y for c arity.)
•A command sequences must be preceded by the specia 3-byte header.
(Subsequent command istings have omitted the header for the sake of c arity.)
•Commands which assign a parameter setting a so a ow you to po /retrieve the
current setting. To do this, simp y issue the command without parameters.
•A host commands (and source data) must be terminated with a carriage-return
character (13 dec. or 0D hexadecima ). (Subsequent command istings have
omitted the terminator for the sake of c arity.)
17

9.1 - Peripheral Activation
Periphera activation commands are used for activating optiona onboard periphera s
inc uding re ay and/or piezo beeper. Avai ab e commands are isted be ow:
•Activate Re ay
•Activate Piezo Beeper
9.1.1 - Activate Relay
The onboard re ay (if equipped) may be used to activate an externa device or specia ized
equipment. It can be commanded in one of two avai ab e methods: 1) activated for a
timed duration, or 2) activated on or off for an indefinite period. The command format is
defined be ow:
Command Syntax Example Comment
Activate Re ay !xxxxx !00005 Activate re ay for 5 seconds
RELAY=n RELAY=1 Activate re ay (on)
Note: Onboard re ay has a switching capacity of: 0.4A@125vac / 2A@30vdc.
Fie d designators:
•xxxxx = 5-digit re ay activation period in seconds
•n = activation designator: 0=off, 1=on
9.1.2 - Activate Piezo Beeper
The onboard piezo beeper (if equipped) may be used for audib e annunciation and can be
commanded in one of two avai ab e methods: 1) cyc ica y annunciate on and off for a
specified number of reptititions, or 2) annunciate once for a specified duration. The
command formats are defined be ow:
Command Syntax Example Comment
Activate Beeper &nn &15 Sound the beeper 1.5 seconds
&xrrr &x005 Cyc e the beeper (on & off) 5 times
Fie d designators:
•nn = 2-digit va ue indicating the activation period in hundreds of mi iseconds
•rrr = 3-digit va ue indicating the number of beeper repetitions to perform
18

9.2 - Source Data Parsing
Source data parsing a ows the RWFC to proper y ocate and extract data characters from
the received ASCII seria data string. It is necessary when the string contains extraneous
or unused characters which are to be ignored such as headers, trai ers, prepended zeros,
etc. (For instance, magnetic stripe readers are known to output additiona characters
which are used as track de imiters.) There are two avai ab e data parsing methods for
hand ing this situation:
•Set data start index & ength
•Set search character
Notes:
•The search character may be used in combination with the data start index.
When a search character is defined, the start index takes precedence. That is,
searching for the specified character wi not begin unti a minimum number of
source character(s) have been received, identified by: start index + 1.
•The start index defines the expected ocation of the desired data (or the
minimum position within the composite source string to invoke an optiona
search character, if defined).
•The RWFC can accept a composite source string of virtua y any ength.
However, the number of extracted data characters shou d be imited to 10
digits. (This is the maximum ength which can be converted and stored into a
four-byte unsigned integer, i.e., 4,294,967,295.)
•Extracted data character(s) must contain on y numeric digits '0' - '9'.
Avai ab e commands are isted be ow:
•Set Data Start Index
•Set Data Length
•Set Search Character
P ease note that each command must be terminated with a carriage-return character (13
dec. or 0D hexadecima ).
19

9.2.1 - Set Data Start Index
This command sets the start index for ocating the ID/data segment (sub-string) within
the received ASCII source string. It is used in conjunction with Set Data Length to ocate
and extract pertinent data characters from the string. (The defau t index is 0, meaning the
first character is the presumed to be the beginning ocation for the data.) The command
format is defined be ow:
Command Syntax Example Comment
Set Start Index SDSnn SDS09 Set the start index at character 9
Fie d designators:
•nn = start index
9.2.2 - Set Data Length
This command sets the ength (in character digits) of the ID/data segment (sub-string). It
specifies the number of re evant characters within the received ASCII source string. It is
used in conjunction with Set Data Start Index to ocate and extract pertinent data
characters from the string. The command format is defined be ow:
Command Syntax Example Comment
Set Data Length SDLnn SDL08 Set a 8-digit data ength
Fie d designators:
•nn = data ength (digits)
Notes:
•This command does not designate the ength of the source string. Instead, it
specifies the ength of the ID/data segment within the source string, though both
parameters may be identica .
•The maximum a owab e data ength is 10 digits.
•The maximum source data string ength is 30 characters.
20
Table of contents