T-JOY Joystick Controller T-CON3 – Stand Alone Device Controller
Customers may use either of the above products or a computer with RS232 serial communications to
control various combinations of the de vi ces bel o w.
T-LA Series – Linear Actuators T-CD Series – 2 Phase Stepper Motor Controllers
T-LS Series – Linear Stages T-LLS Series – Long Travel Linear Slides
T-MM Series – Motorized Mirror Mounts T-NM Series – Steppers with built-in Controllers
For more information on any of these products or to sign up for our quarterly email newsletter with product
updates and promotions, please visit
The following specifications apply to all T-Series devices:
Power Supply:
12V nominal (10V to 16V acceptable) DC unregulated supply on 2.1 mm, center
positive power connector.
Communications:
RS232, 9600 baud, no parity, one stop bit on 6-pin mini din cable, male towards the
computer, female towards the next unit
1.2 T-JOY Specifications
The following specifications are specific to T-JOY devices
Current Draw: 50 mA
Joystick Controllable Axes: 3
User Configurable Buttons: 5
Visual Feedback: Power LED (green) and Com LED (yellow)
Dimensions: 200 x 122 x 102 mm (L x W x H)
Weight: 350g
Compatibility
Device Firmware version Compatibility
T-CON All None
All T-Series
except T-CON
All T-Series
except T-CON
All T-Series
except T-CON
* T-Series devices with firmware version 5.00 to 5.03 may be used with the T-JOY, however their
command set lacks two useful instructions that were added in version 5.04: Save Current Postion, and Go
To Saved Position. These instructions are particularly useful in conjunction with the T-JOY since any
button on the T-JOY may be programmed to issue these instructions to all connected units in order to store
and recall a position in 3 dimensional space.
1.00 to 4.99 None
5.00 to 5.03 Partial *
5.04 and up Full
2 FIRMWARE VERSION INFORMATION
The version of firmware installed on any Zaber T-Series device can be determined by issuing command
#51. A three-digit number will be returned. Assume 2 decimal places (ex a reply of 504 indicates firmware
version 5.04). This user’s manual applies only to T-JOY devices with firmware version 5.04 and up. This is
the most recent version as of this printing; however newer firmware versions may have since been released.
Due to the addition of new features, newer versions of firmware may not be 100% compatible with older
versions. For more information on firmware versions that may have been released since the printing of this
manual, please check the support section of Zaber’s website where user’s manuals for all versions of
firmware are posted for download.
3 CAUTION
Zaber devices are precision instruments and must be handled with care. Avoid using excessive force or
rapid motion when manipulating the joyst i ck or butt o ns. D o not f orce t he con necto rs; when properly
aligned, only a gentle force should be needed to achieve connection.
When you first receive your T-JOY, you may wish to perform a few simple steps to familiarize yourself
with its operation. First you will need a power supply. If you did not order one with your device, you will
require a power supply with output voltage between 10 and 16V DC. The power input accepts a standard
2.1mm center positive connector. Most unregulated 12V AC-to-DC adapters output around 16V under light
current draw, dropping to 12V at their rated current. Some may output higher voltages and will not be
suitable. The chosen power supply must also be rated to handle the maximum total current draw of the
devices connected to it. For example, if you have one T-JOY joystick and 2 T-LA28A actuators daisychained together with a single power supply, you will need at least 690 mA (50mA for the joystick and 320
mA for each actuator). The current draw of each device is given in the specifications section of the user’s
manual for the device. When powering long chains of devices, we recommend connecting a power supply
to every second or third device in the chain to reduce the current through the data cables.
Once you have a working power supply, you can test the operation of the T-JOY. Connect the power
supply to the joystick and ensure that the green LED turns on indicating power. Move the joystick from left
to right, forward and back, and rotate the handle counterclockwise and clockwise. Also try pressing the
buttons. As you perform each of these actions you should notice the yellow LED blinking indicating
communications are taking place. Each blink corresponds to a single instruction being sent by the joystick.
This is the extent of the testing you can perform without connecting other devices to interpret and execute
the instructions being sent by the T-JOY, or connecting a computer to communicate with the T-JOY.
During normal operation, the T-JOY joystick does not need to be connected to a computer, however, it
must be connected to a computer initially in order to change it’s settings (for example to change button
functions from the defaults or to change what additional devices will be controlled by each axis of the
joystick). Devices that will be used with the joystick must also be connected so that the computer may issue
a renumber instruction which assigns all connected devices a unique unit number. This is necessary so that
the T-JOY can direct instructions to the appropriate device to control the correct axis of motion.
Step 1. Plug the Mini-DIN to D-Sub serial adapter into your
computer’s serial port and plug the longer T-JOY data cable (male
end) into the adapter. You may need to use a cable extension to reach
your computer.
There is no need to power-down or reboot the computer. USB-toRS232 converters are available if you have no RS232 serial port.
Step 2. Connect at least one additional T-Series device to the shorter
T-JOY data cable (female end). Connect the power plug of your
power supply (2.1mm center positive) to the power connector of the
T-JOY. The green LED should light on the T-JOY and any connected
T-Series devices (note: not all T-Series devices have LEDs).
Depending on the number of devices connected, you may need to
connect additional power supplies. We recommend connecting a
power supply to every second or third unit to reduce current draw
through the data cables.
Step 3. Install a demo program from the included CD, or download
one from the support section of our website http://www.zaber.com.
Follow the instructions in the readme file to install and run the
program.
As a simple first test, try entering these instructions:
Unit Cmd Data Description
0 2 0 Renumber all units
2 1 0 Home unit number 2
Your communications settings must be: 9600 baud, no hand shaking, 8 data bits, no parity, one stop bit.
The amber LED will light when there is activity on the RS232 lines. When the yellow LED on the T-JOY
blinks it indicates either the computer has sent an instruction, or the T-JOY has sent an instruction (due to
movement of the joystick or the buttons). We recommend using the sample Visual Basic 6 program
included with Zaber products. It also contains source code that you can use as an example for writing your
own code to control your specific system.
Important: After daisy-chaining new devices to the T-JOY, or rearranging the order of the devices, you
must assign each unit a unique identifier by issuing a renumber instruction after all the units in the chain are
powered up. You must not transmit any instructions while the daisy-chain is renumbering or the
renumbering routine may be corrupted. Renumbering takes less than a second, after which you may start
issuing instructions to the T-JOY and any additional devices in the daisy-chain.
All instructions consist of a group of 6 bytes. They must be transmitted with less than 10 ms between each
byte. If the unit has received less than 6 bytes and then a period longer than 10 ms passes, it ignores the
bytes already received. We recommended that your software behave similarly when receiving data from the
devices, especially in a noisy environment like a pulsed laser lab.
The following table shows the instruction format:
Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6
Unit # Command # Data (Least
Significant
Byte, LSB)
The first byte is the unit number in the chain. After renumbering, unit number 1 is the closest unit to the
computer and unit number 2 is next and so forth. If an instruction is sent to unit number 0 (byte1 = 0) all
the units in the chain will execute the accompanying command simultaneously.
The second byte is the command number. Bytes 3, 4, 5, and 6 are data. How the data bytes are interpreted
depends on the command. Complete details are given in the command reference on the following page.
Examples:Renumber all units: 0, 2, 0, 0, 0, 0 Home unit number 2: 2, 1, 0, 0, 0, 0
If you are using Zaber’s demo software, you will only see 3 entry fields: Unit#, Command#, and Data. The
Unit# and Command# fields accept integer values while the value you enter into the Data field can be
signed. The value in the data field is converted by the software to generate bytes 3, 4, 5 and 6 and then all 6
bytes are sent to the unit in sequence.
Most instructions cause the unit to reply with a return code. It is also a group of 6 bytes. The first byte is the
unit number. Byte 2 is the instruction just completed or 255 (0xFF) if an error occurs. Bytes 3, 4, 5 and 6
are data bytes in the same format as the instruction data byte.
The command quick references below provides a list of available T-JOY commands at a glance. A Detailed
description of each command is given in the following section.
Note that a computer may also be used to control additional units in the daisy-chain. For a list of
instructions applicable to other devices, please consult the appropriate user’s manual.
Command Reference for the T-JOY:
# Command Data Bytes Reply Data Page
0 Reset Ignored None 10
2 Renumber* 0 or desired Device Address Device ID 10
25 Set Active Axis* 1, 2, or 3 or 0 to select all Echo of Command Data 11
26 Set Axis Unit Number* Unit number to control Echo of Command Data 12
27 Set Axis Inversion* 1, -1, or 0 to toggle 1 or -1 13
28 Set Axis Velocity Profile* 1, 2, 3, or 0 to toggle 1, 2, or 3 14
29 Set Axis Velocity Scale* Maximum Velocity
0 to disable axis
30 Set Key Trigger* Trigger number Echo of Command Data 16
31 Return Key Trigger Trigger number Stored function (the
33 Calibration* 0, 1, or 2 Echo of Command Data 21
36 Restore Default Settings* 0 Echo of Command Data 22
40 Set Device Mode* Mode Configuration (see
below)
48 Set Alias* Alias Unit Number Echo of Command Data 24
50 Return Device ID Ignored Device ID 25
51 Return Firmware Version Ignored Firmware Version 25
52 Return Power Supply voltage Ignored Power Supply Voltage 25
53 Return Setting Setting Number Setting Value 25
55 Echo Data User defined Echo of Command Data 26
* The settings for these commands are saved in non-volatile memory, i.e. the setting persists even if the
device is powered down. To restore all settings to factory default, use command 36.
0 (1s) Disable Auto-reply Disable ALL replies except to command 50 and
higher.
1 (2s) Reserved This bit is reserved. Do not modify.
2 (4s) Reserved This bit is reserved. Do not modify.
3 (8s) Reserved This bit is reserved. Do not modify.
4 (16s) Reserved This bit is reserved. Do not modify.
5 (32s) Reserved This bit is reserved. Do not modify.
6 (64s) Enable Logical Channels
Communication Mode
Enable the Logical Channels Communication
Mode (see manual for more details).
7 (128s) Reserved This bit is reserved. Do not modify.
8 (256s) Reserved This bit is reserved. Do not modify.
9 (512s) Reserved This bit is reserved. Do not modify.
10 (1,024s) Reserved This bit is reserved. Do not modify.
11 (2,048s) Reserved This bit is reserved. Do not modify.
12 (4,096s) Reserved This bit is reserved. Do not modify.
13 (8,192s) Reserved This bit is reserved. Do not modify.
14 (16,384s) Disable Power (Green) LED Disables the power LED during operations.
15 (32,768s) Disable Serial (Yellow) LED Disables the serial LED during operations.
Note that these commands apply only to T-JOY series firmware versions 5.00 and up. To determine which
version of firmware you have simply issue the “return firmware version” (command 51). Many of the
commands described below will work with other firmware versions, however behavior may differ. See the
appropriate user’s manual for the version of firmware on your device.
8.1 Reset (#0)
Firmware Version: Version 5.00 and up
Command Number: 0
Data Bytes: Ignored
Reply Data: None
This sets the device to its power-up condition. It has the same effect as unplugging and restarting the unit.
All non-volatile settings (i.e. Unit Number, Joystick Calibration, etc.) are saved and are not affected by
reset or power-down.
8.2 Renumber (#2)
Firmware Version: Version 5.00 and up
Command Number: 2
Data Bytes: If issued to all units: Ign ored.
If issued to a single unit: new number.
Reply Data: Each unit affected replies with its device ID after renumbering.
Note: The unit number is stored in non-volatile memory and will persist after power-
down or reset.
If issued with a 0 in Byte 1, the data bytes are ignored and all units will renumber. The unit closest to the
computer becomes number 1. The next unit becomes number 2 and so forth. If issued with a number other
than 0 in byte 1, the specified unit will reassign itself the unit number specified in the data bytes.
Renumbering takes less than a second during which time the computer must not send any further data. The
unit number is stored in non-volatile memory so you can renumber once and not worry about issuing the
renumber instruction on each power-up. Even if the order of devices in the daisy-chain is physically
changed, the unit numbers most recently assigned to each device will persist.
Firmware Version: Version 5.04 and up
Command Number: 25
Data Bytes: 1, 2, or 3 to select the corresponding axis to be the active axis
Reply Data: Reply data is simply an echo of command data.
Note: The active axis affects the behavior of commands 26 through 29. This setting is
stored in non-volatile memory and will persist after power-down or reset.
This instruction selects one of the three axes of manipulation to be the active axis. Subsequent “Set
Axis…” instructions will apply only to the active axis. The “Set Axis…” instructions are:
- Set Axis Unit Number (#26)
- Set Axis Inversion (#27)
- Set Axis Velocity Profile (#28)
- Set Axis Velocity Scale (#29)
The three axes on the joystick are defined as follows:
Axis #1
Right is the positive direction of manipulation.
Left is the negative direction of manipulation.
Axis #2
Forward is the positive direction of manipulation.
Back is the negative direction of manipulation.
Axis #3
Clockwise is the positive direction of manipulation.
Counter-clockwise is the negative direction of
manipulation.
For example, to set the maximum velocity of axis number 2, first issue the Set Active Axis (#25) command
with data of 2 to make axis number 2 the active axis. Then issue the Set Axis Velocity Scale (#29)
command using the desired maximum velocity as data. Subsequent “Set Axis…” commands will also apply
to the axis number 2 until the user sets a different axis to be the active axis, or powers off the joystick.
The joystick’s current active axis can be returned by issuing the Return Setting (#53) command, with data
of 25.
Firmware Version: Version 5.04 and up
Command Number: 26
Data Bytes: Byte 3 is the unit number. Valid numbers are between 0 and 254.
Reply Data: Reply data is simply an echo of the command data.
Note: This setting affects only the active axis. See the Set Active Axis (#25) command
for instruction on how to select an axis. This setting is stored in non-volatile
memory and will persist after power-down or reset.
This command sets what unit number you wish to control using the active axis. For example, suppose you
would like to assemble a 3-axis system where:
- Joystick axis 1 (right / left) controls unit #3.
- Joystick axis 2 (forward / back) controls unit #4, but with the motion inverted.
- Joystick axis 3 (clockwise / counterclockwise) controls unit #2.
First, connect the joystick and the three additional T-Series units (we have shown three T-LS units below)
in a daisy-chain as follows:
Issue the Renumber (#2) command from the computer. After renumbering (less than 1 second) the joystick
will become unit #1, and the remaining units will become units #2, #3, and #4. Now commands may be
issued to the joystick to set the desired behavior. The command sequence is as follows:
Unit Command Data Explanation of command
0 2 0 Renumber. After connecting the daisy chain as shown above,
issue this command to all units. Each unit should reply. The TJOY3 will be unit #1, and subsequent units will be #2, #3 and
#4.
1 25 1 Set axis number 1 to be the active axis. Subsequent “Set
Axis…” commands will apply to the active axis.
1 26 3 Set the activ e axis (#1) to control unit #3.
1 25 2 Set axis number 2 to be the active axis.
1 26 4 Set the activ e axis (#2) to control unit #4.
1 27 -1 Set the active axis (#2) to be inverted. Forward will become the
negative direction, and backward will become the positive
direction.
1 25 3 Set axis number 3 to be the active axis.
1 26 2 Set the current axis (#3) to control unit #2.
Command #36, may be used to restore factory default settings. The factory default settings for axis control
are as follows:
- Axis #1 controls Unit #2
- Axis #2 controls Unit #3
- Axis #3 controls Unit #4
8.5 Set Axis Inversion (#27)
Firmware Version: Version 5.04 and up
Command Number: 27
Data Bytes: 1 to set the current axis to non -inv erted
-1 to set the current axis to inverted
0 to toggle between invert and non-invert
Reply Data: 1 or -1, indicating the inversion status of the active axis.
Note: This setting affects only the active axis. See the Set Active Axis (#25) command
for instruction on how to select an axis. This setting is stored in non-volatile
memory and will persist after power-down or reset.
Sometimes it is desirable to invert one or more axes to create a more intuitive user interface. The Set Axis
Inversion (#27) command allows the user to set the inversion status of the active axis. Each axis can be
inverted independently of the other two axis. See command #26 for an example of how to invert a
particular axis.
Direction of Manipulation of Joystick Direction of Motion of Affected Unit
Axis Manipulation Non-inverted Inverted
1 Left (negative) Negative Positive
1 Right (positive) Positive Negative
2 Back (negative) Negative Positive
2 Forward (positive) Positive Negative
3 Counter-Clockwise (negative) Negative Positive
3 Clockwise (positive) Positive Negative
What constitutes positive or negative motion depends on the device; see the user’s manual for the device in
question. The default axis inversion setting for all joystick axes is non-inverted (data = 1).
Firmware Version: Version 5.04 and up
Command Number: 28
Data Bytes: 1 to use linear profile
2 to use squared profile
3 to use cubed profile
0 to toggle through the different profiles
Reply Data: 1, 2, or 3 depending on the current velocity profile.
Note: This setting affects only the active axis. See the Set Active Axis (#25) command
for instruction on how to select an axis. This setting is stored in non-volatile
memory and will persist after power-down or reset.
This setting allows the user to select the desired relationship between the angular displacement of the activ e
joystick axis and the velocity of the unit controlled by that axis.
When the joystick is displaced from the neutral position, the T-JOY3 reads the angular position and
calculates how fast and in which direction the corresponding units should be instructed to move. There are
three different profiles that can be selected:
- 1 – Linear
- 2 – Squared (factory default)
- 3 – Cubed
The maximum velocity is set by the Set Axis Velocity Scale (#29) command. Squared and cubed curves
offer finer control at slow speeds, but still allow maximum velocity when the joystick is fully deflected.
Firmware Version: Version 5.04 and up
Command Number: 29
Data Bytes: Desired maximum velocity of the T-Series unit controlled by the active axis.
If data is 0, then the active axis will be disabled.
Reply Data: The reply data is simply an echo of the command data.
Note: This setting affects only the active axis. See the Set Active Axis (#25) command
for instruction on how to select an axis. This setting is stored in non-volatile
memory and will persist after power-down or reset.
This command is used to set the velocity scale of the active axis. The data represents the desired maximum
velocity corresponding to full displacement of the joystick. When the joystick is moved away from the
neutral position, the displacement is translated into Move At Constant Velocity instruction which is sent to
the unit associated with the displaced axis. See the user’s manual for the device in question for more
information on the Move At Constant Velocity instruction.
The velocity scale setting works in conjunction with the velocity profile setting. See the Set Axis Velocity
Profile (#28) command for more detail.
Setting the velocity scale to 0, will disable the active axis. This prevents the joystick from sending any
instructions in response to displacement of that axis. This is useful when the user wants to execute a
program from the computer, and does not want the joystick to be accidentally moved.
The default velocity scale for all three axes is 2922.
Firmware Version: Version 5.04 and up
Command Number: 30
Data Bytes: Indicates the event number with which the next instruction should be associated.
Reply Data: The reply data is simply an echo of the command data.
Note: The next command received after command 30 is saved in non-volatile memory
and will persist as the event-triggered instruction associated with the indicated
key event even after power-down or reset.
This command is used to program the keys on the joystick to send any arbitrary instruction. There are five
keys on the joystick. There are 4 key events that the joystick will detect:
- Key Event 1 - Key depressed
- Key Event 2 - Key released before hold time
- Key Event 3 - Key not yet released when hold time elapses
- Key Event 4 - Key released after hold time
These key events are displayed graphically below. The hold time is preset to 1 second and cannot be
changed by the user.
Each of the 4 key events may be programmed to trigger a single instruction. It can be seen that pressing and
releasing a key will result in a sequence of key events that will be either 1-2 or 1-3-4 depending when the
key is released. Instructions associated with key events are called event-triggered instructions. When any
key event occurs, an event-triggered instruction will be sent by the T-JOY unit to all T-Series units
downstream (away from the computer) in the daisy-chain.
If an event-triggered instruction is addressed to unit 0 (all units) or is addressed to the unit number of the TJOY, then the T-JOY will execute the instruction itself. If the instruction is addressed to unit 255, then the
T-JOY will neither send nor execute the instruction. This provides a method for disabling a key event.
The Load Event-Triggered Instruction (#30) command is used to specify the key event that you wish to
attach an instruction to. The data value required is:
Data = Key * 10 + Event
Where:
Key is a number from 1 to 5 corresponding to the Key location
Event is a number from 1 to 4 corresponding to the Key Event
The instruction received immediately after the Load Event-Triggered Instruction (#30) command will be
the event-triggered instruction associated with the specified key event. Note that this next instruction will
not be executed by the T-JOY, but will be stored for execution whenever the corresponding key event is
detected. This instruction will also pass un-hindered to any units that may be downstream (away from the
computer) from the T-JOY. For this reason, we recommended disconnecting downstream units from the
joystick before loading or returning event-triggered instructions.
The following table shows the data value necessary
to select a particular key event with which to
associate the next instruction.
4 1 41 (255, 255, 0) 4 2 42 (0, 18, 1) Go to stored position 1
4 3 43 (0, 16, 1) Store current position 1
4 4 44 (255, 255, 0) 5 1 51 (255, 255, 0) 5 2 52 (0, 18, 2) Go to stored position 2
5 3 53 (0, 16, 2) Store current position 2
5 4 54 (255, 255, 0) -
Having four different key events for each key makes the T-JOY very flexible. Here are a few examples.
Example 1: Programming a single key to store and return to a position:
Each key can be programmed to provide different functionality depending on how long the key is held
down. Key event 3 can be programmed to trigger the “Store Current Position” instruction, and key event 2
can be programmed to trigger the “Go To Stored Position” instru ction. With such a setup, the user can use
the joystick to move an XYZ stage to a desired position, then hold down the key for more than 1 second to
store the current position of the stage. After moving the stage around some more, the user can return to the
stored position by quickly pressing and releasing the same key. For a description of the “Store Current
Position” and “Go To Stored Position” instructions, please see the user’s manual of the product in question.
Assuming that the joystick is unit #1, the programming sequence to program key 3 to provide this
functionality would be as follows:
Unit Command Data Explanation of command
1 30 31 Program key 3, event 1 to trigger the instruction…
255 0 0 …“do nothing”
1 30 32 Program key 3, event 2 to trigger the instruction…
0 18 6 …“All units, Go To Stored Position, in slot #6”
1 30 33 Program key 3, event 3 to trigger the instruction…
0 16 6 …“All units, Store Current Position, in slot #6”
1 30 34 Program key 3, event 4 to trigger the instruction…
Example 2: Programming two keys to control the motion of an additional unit:
You can program two keys to control the motion of an additional unit. In the following sequence of
commands, key 1 and key 2 are programmed to control unit 5, an additional unit beyond units 2, 3, and 4
which are controlled by joystick manipulation. After executing this sequence of instructions, key 1 can be
used to move unit 5 in the positive direction, slowly at first, but faster if you hold the key down for longer
than 1 second. Key 2 will exhibit the identical behavior but with motion in the negative direction. When
either key is released the motion will stop. Assuming that the joystick is unit #1, the programming sequence
is as follows:
Unit Command Data Explanation of command
1 30 11 Program key 1, event 1 to trigger the instruction…
5 22 1000 …“Unit 5, Move at Constant Velocity, 1000”
1 30 12 Program key 1, event 2 to trigger the instruction…
5 23 0 …“Unit 5, Stop”
1 30 13 Program key 1, event 3 to trigger the instruction…
5 22 4000 …“Unit 5, Move at Constant Velocity, 4000”
1 30 14 Program key 1, event 4 to trigger the instruction…
1 23 0 …“Unit 5, Stop”
1 30 21 Program key 2, event 1 to trigger the instruction…
5 22 -1000 …“Unit 5, Move at Constant Velocity, -1000”
1 30 22 Program key 2, event 2 to trigger the instruction…
5 23 0 …“Unit 5, Stop”
1 30 23 Program key 2, event 3 to trigger the instruction…
5 22 -4000 …“Unit 5, Move at Constant Velocity, -4000”
1 30 24 Program key 2, event 4 to trigger the instruction…
5 23 0 …“Unit 5, Stop”
Example 3: Programming keys to trigger an action on the computer
Sometimes you may want a key event on the joystick to trigger more complicated tasks than just sending a
single instruction. You may also wish to have a key event on the joystick trigger certain actions on the
computer (if one is connected). The Echo Data (#55) command exists for this purpose.
When the T-JOY receives the Echo Data (#55) command with any arbitrary data, the T-JOY will send a
reply that is simply an echo of the instruction, including data. If you program one of the joystick ’s key
events to trigger an Echo Data command addressed to the unit number of the joystick itself, then when the
key event occurs, the joystick will do two things: 1. it will send the Echo Data instruction to downstream
units and 2. it will attempt to process the instruction itself. If the instruction is addressed to the unit number
of the T-JOY, then none of the downstream units will respond to it. The T-JOY however will send an Echo
Data reply (with the same data as the instruction) to the computer.
The user can write an application to run on the computer which will interpret the Echo Data reply as an
indication that a key event has occurred. Different key events can trigger Echo Data instructions with
different data so the user’s application on the computer can detect individual key events and take
appropriate action (whatever the user decides that may be).
8.9 Return Event-Triggered Instruction (#31)
Firmware Version: Version 5.04 and up
Command Number: 31
Data Bytes: Indicates the event number for which to return the associated instruction.
Reply Data: The reply data is the event-triggered instruction (unit, command, data) associated
with the event specified by the data.
Note:
This command is used to return to the user the event-triggered instruction currently associated with a
particular key-event. See the Load Event-Triggered Instruction (#30) for more information on definition of
key events and event-triggered instructions.
To return the event-triggered instruction associated with a pa rticular key event, issue the Return EventTriggered Instruction (#31) command to the joystick with data as follows:
Data = Key * 10 + Trigger
Where:
Key is a number from 1 to 5 corresponding to the key location
Event is a number from 1 to 4 corresponding to the key event
The reply will be comprised of the unit, command and data of the event-triggered instruction associated
with the specified key event. Note that as far as the computer is concerned, the reply will appear to co me
from whatever unit the event-triggered instruction is addressed to, which may not be the joystick. We
recommend that all additional units be disconnected from the joystick before loading or returning eventtriggered instructions to avoid confusion.
Firmware Version: Version 5.04 and up
Command Number: 33
Data Bytes: Specifies the calibration mode:
1 – calibrate limits
2 – calibrate dead-bands
0 – stop calibrating, save calibration data, and return to normal operation.
Reply Data: The reply is simply an echo of the instruction.
Note: Calibration settings are a special case in that they are not affected by a Restore
Settings (#36) instruction. There are no factory default calibration settings that
will work well on all T-JOY units, and it would be a tedious matter to re-calibrate
after every Restore Settings (#36) instruction. The calibration settings are stored
in non-volatile memory and will persist after power-down or reset.
This instruction is used to calibrate the joystick. There are two sets of calibration variables: limits and deadbands. Limits define the maximum angular displacement of all axes of manipulation. Dead-bands define
the area around the neutral position of the joystick where no action should occurs. Dead-bands are useful to
adjust the sensitivity of the joystick to vibration or accidental movement from the neutral position.
The T-JOY is pre-calibrated before shipping so that it should work well right out of the box. Note that
restoring default settings using command #36 will have no affect on the joystick calibration. There is no
default calibration since each joystick has slightly different properties that prevent a single set of settings
from working well on all devices.
The joystick should work well as calibrated. We do not recommend re-calibrating it unless you encounter
problems such as motion occurring while the joystick is in the neutral position, or an inability to reach
maximum velocity even with the joystick fully displaced.
To calibrate the limits, follow these steps:
- Issue command 33, data 1 to put joystick in “calibrate limits” mode
- Move joystick all the way to the left and all the way to the right
- Move joystick all the way back and all the way forward
- Turn joystick knob all the way counter-clockwise and all the way clockwise
- Issue command 33, data 0 to save the measured limit parameters
To calibrate the dead-band, follow these steps:
- Issue command 33, data 2 to put joystick in “calibrate dead-band” mode
- Wiggle joystick slightly to the left and right of the neutral position. Try to move only within the
limits of the slack. Do not move past the point where resistance begins.
- Wiggle joystick slightly backward and forward of the neutral position
- Turn joystick knob slightly counter-clockwise and clockwise from the neutral position
- Issue command 33, data 0 to save the measured limit parameters
8.11 Restore / Lock / Unlock Settings (#36)
Firmware Version: Version 5.00 and up
Command Number: 36
Data Bytes: 0 – restore settings to factory defaults
2768033 – lock settings
3308672 – unlock settings
Reply Data: Reply data is simply an echo of the command data
Note: All settings affected by this instruction are stored in non-volatile memory and
will persist after power-down or reset.
This command should be issued with Data of 0 to return the device to factory default settings. This
command is very useful for troubleshooting. If the unit does not appear to function properly, it may be
because some of the settings have been changed. Command 36 will restore the settings to default values.
Locking Settings
Sometimes it is desirable to lock all non-volatile settings to prevent them from being changed
inadvertently. After changing all the settings as desired, they can be locked by issuing command 36 with
data of “2768033” (the lock password). Subsequent attempts to change any non-volatile settings , including
attempts to issue command 36 with data of 0, will cause the unit to reply with an error code of 3600
(settings locked).
Unlocking Settings
Settings can be unlocked by issuing command 36 with data of “3308672” (the unlock password).
Firmware Version: Version 5.00 and up
Command Number: 40
Data Bytes: Each bit of the data bytes enables or disables a specific option.
Reply Data: Reply data is simply an echo of the command data
Note: All settings are stored in non-volatile memory and will persist after power-down
or reset.
This command allows setting several options. Each option is controlled by a single bit within the da ta
bytes. Most software you will encounter, including most of our demo software, represents all 4 data bytes
as a single decimal value rather than specifying each bit individually. To determine what decimal value to
use requires a basic understanding of how the data is represented in binary. The data bytes may be
considered as a single 32-bit binary value. The least significant bit is bit_0, the next is bit_1, the next is
bit_2, and so on up to the most significant bit_31. Each bit may have a value of either 1 or 0.
The corresponding decimal representation of this 32-bit data is given by:
Decimal value = (bit_0 * 1) + (bit_1 * 2) + (bit_3 * 4) + … + (bit_n * 2
Each bit controls a single mode option as described in the table below. To determine the data value to use
with the Set Device Mode command, simply determine the desired value of each bit (1 or 0), and calculate
the decimal value using the above formula. Note that not all 32 bits are currently used. Any unused or
reserved bits should be left as 0.
For example, suppose you want all mode bits to be 0 except for bit_0 (disable autoreply), bit_14 (disable
power LED), and bit_15 (disable serial LED). The Set Device Mode instruction should be sent with data
calculated as follows:
Data value = 2
0
+ 214 + 2
15
= 1 + 16384 + 32768
= 49153
Note that each instance of the Set Device Mode command overwrites ALL previous mode bits. Repeated
commands do not have a cumulative effect. For example, suppose you send a Set Device Mode command
with data of 1 to disable auto-replies. If you then send another Set Device Mode command with data of
16384 to disable the power LED, you will re-enable auto-replies since bit_0 in the 2
The T-JOY has a default mode setting of 0 (all bits are 0).
Bit_n 2
n
Description
n
) + … + (bit_31 * 2
nd
instruction is 0.
31
)
bit_0 1
Disable Auto-reply
A value of 1 disables ALL replies except those to “return” commands (co m mands 50
and higher). The default value is 0 on all devices.
bit_1 2
bit_2 4
bit_3 8
bit_4 16
bit_5 32
A value of 1 enables the Logical Channels Mode. In this mode of communication, only
bytes 3 thru 5 are used for data. Byte 6 is used as an ID byte that the user can set to any
value they wish. It will be returned unchanged in the reply. Logic Channel Mode allows
the user application to monitor communication packets individually to implement error
detection and recovery. The default value is 0 on all device s.
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Disable Power LED
A value of 1 turns off the green power LED. It will still blink briefly, immediately after
powerup.
Disable Serial LED
A value of 1 turns off the yellow serial LED.
8.13 Set Alias (#48)
Firmware Version: Version 5.00 and up
Command Number: 48
Data Bytes: Byte 3 is the alias unit number. Valid numbers are between 0 and 254. To avoid
confusion, it is best to choose an alias greater than the number of units connected.
However this is not required.
Reply Data: Reply data is simply an echo of the command data
Note: This setting is stored in non-volatile memory and will persist after power-down
or reset.
This creates an alternate unit number for a device (in addition to its actual unit number). By setting several
unit’s aliases to the same value, you can control groups of units with a single instruction. When you send an
instruction using an alias unit number, all devices with that alias will execute the instruction and reply
using their actual unit numbers. To remove an alias, simply set it to zero.
Firmware Version: Version 5.00 and up
Command Number: 50
Data Bytes: Ignored
Reply Data: Device ID
This causes the unit to return an identification code indicating the type of device connected. See Appendix
A for a table of Device IDs.
8.15 Return Firmware Version (#51)
Firmware Version: Version 5.00 and up
Command Number: 51
Data Bytes: Ignored
Reply Data: Firmware version
This causes the unit to return its firmware version number. A decimal is assumed before the last two digits.
For example, reply data of 502 indicates firmware version 5.02.
8.16 Return Power Supply Voltage (#52)
Firmware Version: Version 5.00 and up
Command Number: 52
Data Bytes: Ignored
Reply Data: Power supply voltage.
This causes the unit to return the voltage level of its power source. A decimal is assumed before the last
digit. For example, reply data of 127 indicates 12.7 V. Note that the voltage is only an approximation.
8.17 Return Setting (#53)
Firmware Version: Version 5.00 and up
Command Number: 53
Data Bytes: Setting Number
Reply Data: Setting number in Byte 2. Current setting value in data bytes.
This causes the unit to return the current value of the setting number specified in Byte3. The unit will reply
with the setting number in Byte2, as if a command to change the setting had just been issued but the setting
will not be changed.
Firmware Version: Version 5.04 and up
Command Number: 55
Data Bytes: Any arbitrary user-defined data
Reply Data: The reply is simply an echo of the command.
This causes the unit to echo back the same data that was sent.
This instruction is a useful one to use as an event-triggered instruction ass ociated with a key event. It can
be used to allow the computer (if one is connected) to detect a key press on the joystick. For more details
see the Load Event-Triggered Instruction (#30) command.
In general, a T-series device will reply to an instruction using the same command number as the instruction
itself. However, there are occasions when the device may transmit data without first receiving a request
from the controlling computer. This type of reply may be considered to be a triggered reply as opposed to a
requested reply. In this case the device uses a “reply-only” command number to distinguish the reply from
those requested by the controlling computer. The meanings of these replies and their corresponding data are
given below.
9.1 Reply #255 – Error
Firmware Version: Version 5.00 and up
Reply Number: 255
Reply Data: Error code
An error has occurred. The error code returned in the data indicates the type of error. The unit may send an
error code as a reply to an invalid instruction, or it may autonomously send an error code as a triggered
reply (i.e. not in response to an instruction). Please see the next section on error codes for a full table of
possible error codes.
Whenever a T-Series device returns 255 in byte 2 of a reply, it indicates an error has occurred. The data
(byte 3 – 6) will contain the error code, which identifies the cause of the problem. The error code is
typically the command number of the instruction that caused the error, but not always. The following is a
table of all possible error codes for the T-JOY:
Error Code Description
14 Power supply voltage too low.
15 Power supply voltage too high.
25 Set Active Axis – Data out of range. Must be 1, 2, or 3.
26 Set Axis Unit Number – Data out of range. Must be between 0 and 254 inclusive.
27 Set Axis Inversion – Data out of range. Must be 0, 1, or -1.
28 Set Axis Velocity Profile – Data out of range. Must be 0, 1, 2, or 3.
29 Set Axis Velocity Scale – Data ou t of range. Must be between 0 and 65535.
30 Load Event-Triggered Instruction – Data out of range. See command #30 for vali d ran ge.
31 Return Even t-Triggered Instruction – Data out of range. See command #31 and #30 for
valid range.
33 Calibration – Data out of range. Must be 0, 1, or 2.
36 Restore / Lock / Unlock Setting s – Data out of range. Must be 0, 2768033, or 330 8672
40 Set Mode - One or more of the Mode Bits is invalid.
48 Set Alias – Data out of range. Must be between 1 and 254 inclusive.
53 Return setting – Data out of range. Must be a valid setting number.
64 Command number not valid in this firmware version
255 Another command is currently executing and cannot be pre-empted by the new command.
Please wait till the old command is finished executing, or issue a command with pre-
emptive priority.
3600 Settings locked. The most recent instruction required changing setting values, but the
settings are locked. See command 36 for details on locking an d unlocking settings.
11 LED INDICATORS
The green LED is on whenever there is power to the device. A constant blinking (2Hz) of the green LED
indicates that the power supply voltage is out of range. The green LED may be disabled by a mode bit (see
command #40).
The amber LED flashes when there is traffic on the RS232 line, either when receiving an instruction from
the computer or when sending an instruction downstream. The amber LED also flashes each time a key
event occurs unless the event has been disabled. See the
Load Event-Triggered Instruction (#30) command for more details on disabling key events.
12 TROUBLESHOOTING
12.1 T-Series General Troubleshooting Tips
Symptom Check
Green LED does not come on Check the A/C wall plug, the 12V adapter and its connection to the device.
If the power is coming over the data cable, check the mini din connector
for bent or broken pins.
Green LED flashes The power supply voltage is outside the range of 10 to 16V. It may either
be too low or too high. Some unregulated 12 V adapters may produce in
excess of 16 V. If the number of devices connected on a single 12 V
adapter exceeds its current capability, the voltage may drop below 10 V.
You may experience this problem when many motors on a single supply
move together. The load may exceed the maximum current available,
causing the voltage to drop. If you experience this problem with a single
device on a single unregulated 12V supply rated at over 300 mA, then the
problem is probably that the supply voltage is too high.
Communications do not seem
to work, the amber light does
not come on or flash
The amber light comes on
briefly when sending a
command, but the device
does not reply.
The unit does not send replies
but otherwise works.
The unit sometimes returns
fewer than 6 bytes.
Make sure that you are on the correct com port. Check the baud rate, hand
shaking, parity, stop bit, etc. Check the cable and adapter for bent or
broken pins. Make sure you do not have a null modem adapter or cable in
the line. The serial to mini-din adapter comes in many varieties and many
have different pin connections. Check the adapter for continuity on the
proper pins by consulting the adapter pin-out diagram below. If you
encounter the problem when trying to control the device with your own
software, try using one of the demo programs from our website to verify
that the hardware is functioning properly.
Check baud rate, hand shaking, parity, stop bit, etc. Make sure that your
software does not transmit any control characters like line feed, spaces or
something else. The unit numbers may not be what you think they are.
Issue a renumber command, make sure that the computer does not transmit
anything else while the units renumber. Check that you transmit 6 bytes
and that the unit number and command are valid. If you encounter the
problem when trying to control the device with your own software, try
using one of the demo programs from our website to verify that the
hardware
If you encounter the problem when trying to control the device with your
own software, try using a demo program from our website to verify that
the hardware is functioning properly. Make sure that the receiving part of
your code or commercial package is correct. Check baud rate, etc. Check
connectors for bent or broken pins.
This problem usually indicates a problem with the settings for your serial
port. Some serial ports are set to automatically recognize and remove
specific control characters such as carriage returns when they appear in the
RS232 receive buffer. When this happens, it appears as though the device
has not sent enough bytes, but really the controlling computer has just
removed some before you could read them. You will need to change the
serial port settings to fix the problem.
Moving the joystick causes
no motion. The green LED is
on, and the yellow LED
blinks when I move the
joystick.
The joystick may not be configured correctly to control the units daisychained to it. i.e. the joystick may be trying to communicate to a unit
number that is different than the unit numbers of the devices connected.
Try the following steps:
- Verify that each unit in the daisy chain works individually.
- Plug all the units in a daisy-chain with the joystick being the first
unit next to the computer, and issue a renumber instruction.
- Verify again that the computer can communicate with each unit
independently.
- Check the unit numbers associated with each axis of the joystick
to see that they address the correct unit in the daisy-chain.
- Try moving the joystick again.
Moving the joystick causes
no motion. The green LED is
on, but the yellow LED stays
off.
One of the following conditions could cause this symptom:
- The joystick axis could have been disabled, by setting the
velocity scale to 0. Solution: re-enable the joystick axis by setting
the velocity scale to a non-zero value.
- You may be in calibration mode. When the T-JOY is in
calibration mode it does not send instructions to other units.
Solution: turn off calibration, recalibrate, or power off/on.
- Calibration may be wrong. If the dead-bands and limits were
reversed, it could make the joystick unresponsive. So lution:
recalibrate.
The tables below show the pin-outs of communications connections on the device and on the serial adapter.
Device Pin Configuration
Female PS2 Pin-outs
(Towards next unit)
1 Not Connected Not Connected
2 Receive (from next unit) Transmit (toward computer)
3 Ground Ground
4 +12V Power +12V Power
5 Not Connected Not Connected
6 Transmit (to next unit) Receive (from computer)
Serial Adaptor Pin Configuration
Mini-Din 6 DB9 Function
2 2 Device Transmit, Computer Receive
All Zaber products are backed by a one-month satisfaction guarantee. If for any reason you are not satisfied
with your purchase, send it back to Zaber Technologies Inc. within one month of the purchase date for a
complete refund.
T-JOY devices are also guaranteed for one year. During this period Zaber will repair or replace faulty units
free of charge. Customers are responsible for shipment back to Zaber.
For complete details of our warranty and other policies please see our website.
15 REPAIRS AND RETURNS
If your unit needs repairs, or you wish to return it for a refund within one month of purchase, please:
- Contact us to obtain an RMA form and RMA number.
- Follow the instructions on the RMA form.
- Pack the unit well and ship it to us.
- Email us the tracking number of the shipment (i.e. FedEx or UPS)
16 EMAIL UPDATES
If you would like to receive our quarterly email newsletter with product updates and promotions, please
sign up online at
http://www.zaber.com (news section).
17 DISCLAIMER
Zaber’s devices are not intended for use in any critical medical, aviation, or military applications or
situations where product malfunction or failure could cause personal injury, death, or damage to equipment.
Zaber disclaims any and all liability for injury or other damages resulting from the use of its products.
18 TECHNICAL SUPPORT AND CONTACT
You can contact Zaber Technologies Inc. for technical assistance by on one of the following methods:
Phone: 1-604-276-8033 (direct)
1-888-276-8033 (toll free in North America)