What is on the tag?
The first 16 bytes of data in the tag (in what is known as block 4 in
the tag memory) contains the following
information (you don't need to know the numeric values shown, the Tag
Programmer will set that for you correctly):
0 = not an Engine or LashUp (look at
otherwise DCS Engine Number 1-99 (look at CarModel) or
the location and operation of the couplers
0 = no SXS
Sound, 1 = has SXS sound at clip 42 (Engines only)
if EngineNo is equal to
if EngineNo is not equal to
NOT_AN_ENGINE (Lead Engine for LashUps)
Many more are defined. See "Tag Programmer" Engine Model drop-down list
Length of engine/car in centimeters, coupler face
coupler face (include Tender). In the Tag Programmer, you enter this
distance in inches.
Distance from center of tag to coupler face in
centimeters. In the Tag
Programmer, you enter this distance in inches.
engines/cars with two tags, the distance must be same for both tags
Up to 6
digit engine/car number in ASCII (w/leading spaces). Example:
The second 16 bytes of data in the tag (in what is known as block 5 in
the tag memory) contains the name of engine or car (in
format you care to use).
example : "A&S SW1200 #1208"
The tag programmer uses the same Arduino/PN532 Reader as is used in the
tag detection system. When you start the program, you should see this
screen (although the values in each may be different as I've used this
copy of the program to write data to many tags)
First, set the RFID COM port value. This is the USB COM port that was
selected when you plugged the Arduino's USB cable into the PC. For my
computer it is COM7.
Then press the [Connect
The program connects up with the Arduino and shows its number (6) and
how many RFID tag readers are attached to it.
At this point, the program is a simple tag reader. You can pass any tag
over any connected reader and the program will display information
about that tag:
I passed a tag from P&LE engine#1561 (my DCS engine #8) over
the RFID tag reader #1 on Arduino detector board #6.
To get ready to write data to the tag, set the Detector Number
and Reader Number
spinners (in my screen shot, they are already set to 6 and 1 but that
will probably not be the case on your computer).
Next, create the 16 bytes of data to be written into block 4 on the
tag. Some of these fields, you can type in a number, select an item
from a drop-down list or type in words. Here is what each field means:
- Not an Engine/Engine Number - set to 0 if it is a car
rather than an engine otherwise set to the DCS engine number
- Tag Location - select from the drop-down list
- Engine Type - if it is an engine, select the engine type
from the drop-down list
- Coupler - select from the drop-down list.
- SXS - if it is an engine, select if it has the SXS sound
- Engine/Car Model - select the model from the drop-down list
- Railroad - select the Railroad name from the drop-down list
- Length in Inches - the distance in inches between the
- Tag Offset in Inches - the distance in inches from where
you mounted the tag to the nearest couple face
- Engine/Car Number - 6 characters that represent the actual
number on the side of the consist.
Then press [Write Block 4
The program will ask you to place the tag over the tag reader (actually
tag writer). When you do this, the tag will read up what ever is
already programmed in it. Then press the [OK
Next create the 16 characters of Engine/Car name to be written into
block 5 of that tag. Up to 16 characters and can be any
characters/numbers/special characters on your keyboard.
Then press [Write Block 5
The program will ask you to place
the tag over the tag reader (actually tag writer). When you do this,
the tag will read up what ever is already programmed in it. Then press
When you are done, press [Disconnect
and then [Exit
Some other features:
] will clear out the Message Buffer
] will cause the tag reader to read up block 5
instead of block 4 (which is the normally done)
] will erase all of the engine/car data from the tag
will take the information from the last tag read and put the data into
the input fields
causes the program to beep each time a tag is
place over a reader
places a time stamp into the Message Buffer
spinner causes the program to display more
information as it runs.
Right click in Message Buffer lets you
select and save all or part of the Message Buffer
Customizing the Tag Programmer for your Layout
You may have noticed that the dropdown lists presented by the Tag
Programmer only contain selections for my layout. Well, you can
customize the programmer for your layout.
The first time that you run Tag Programmer, it will create 5 files in
These files contain the selections presented by the dropdown lists.
Each line in each file is one selection. For example, here is the
Unknown or other
The first item in the file is the first selection presented in the
dropdown list. Internally, it will become selection 0. Before you start
programming your tags, you can edit this file (using a text editor like
notepad, metapad or notepad++) to add or change railroad
You can do same for the other 4 files. I would suspect that you would
not want to edit the EngineTypes.txt or TagLocations.txt files as they
are pretty well defined (but you still can if you want to). The CarModels.txt and EngineModels.txt are
good candidates for editing. Here are those files:
Unknown or other
Unknown or other
Not an Engine
Tag not on Truck
Tag on Front Truck
Tag on Rear Truck
Tag Location Unknown
Tag on Truck
Tag at Midpoint
As you program tags, just remember that the tag does not contain the
words in these files, it contains only the numerical index (starting at
0) of the item that you selected. So once you start editing these
files, don't change a previously used item unless you want that change
to be reflected in all tags.
Now, the most useful part of these files is each time that you edit
them, you should copy them to the folder that contains the Remote Train
Control (RTC) program. Then when you start the RTC program, it will
notice these files and it will use them for all of its decoding on the
Program Control windows.