Troubleshooting steps for RS232 control
Is the port sending strings?
First, make sure that your code and/or hardware are sending strings. Send a string by pressing a TP button to send a command; use Open Axcess, NetLinx Diagnostics or a terminal emulator. You should see the Tx (transmit) LED light. If you do not see the Tx LED, you must first correct your code, or configure the hardware properly. If your device does not use hardware handshaking; be sure handshaking is disabled in the port. Sending an 'HSOFF' command to the device port does this. See later in the document for a discussion of handshaking.
Cabling:
Once you have a good response from the Tx LED, short pins 2 and 3 on the DB-9 or phoenix connector on the port. Send a command and watch the Tx and Rx (receive) LEDs. You should see both LEDs light when each command is sent. If only the Tx LED is lighting, the unit is not really sending strings. Send the unit in for repair. If you get lights on both LEDs, move on to the next step.
Connect the cable that is going to the controlled device to the port, and disconnect it at the far end. Short the Tx and Rx pins together on the equipment end of the cable. This is usually pins 2 and 3, but verify with the cable specs to be sure. Again, you should see both Tx and Rx LEDs. If you do, remove the short and test again. The Rx LED should no longer light. If it continues, it indicates there is a short between Tx and Rx in the cable. Repair and re-test.
This test will verify the continuity of the Tx and Rx wires in the cable, but does not completely test the cable. The Ground conductor can only be tested using a meter. Disconnect the cable at both ends and connect an ohmmeter to the ground, and Rx pins. Short these conductors at the far end of the cable and watch the meter for continuity readings. Also verify there are no shorts between any of the conductors when the ends are disconnected.
AMX tries diligently to verify cable specs, but sometimes there are changes in equipment. It is not unusual that Tx and Rx wires must be reversed to get the proper polarity. Try reversing these wires, but replace them to the normal position if that does not help.
Settings:
Once we have verified the cabling, we need to verify the communication specifications. These include baud rate, parity, data bits, stop bits, and flow control. Some AMX devices use dipswitches to configure baud, data, and stop bits. Some use software configuration. Confirm the setting by double checking switch positions. Cycle the switches to be sure they are firmly in the correct position. For software configured ports, re-send the configuration commands. Also, confirm in the equipment manual what the settings are in the controlled device. Some devices can be changed, so be sure the default setting have not been altered.
You can test the actual output of the RS-232 port by connecting the port to a computer COM port and use a terminal emulator to display the transmitted string to the screen. For example, the Axcent 3 port #1 can be connected to the COM1 port of a laptop computer using a standard AMX programming cable (FG10-727). This would be wired; pin 2 to pin3; pin 3 to pin2; and pin 5 to pin 5. Send a string from the Axcent 3 to the terminal program in Studio, or HyperTerminal, configured at the correct settings for the controlled device. Does the string display on screen? Is the information the same as your code is sending? If the string is received as you see it in the code, the system is working properly. (You may need to change the display mode in the terminal program. In the Studio terminal, you can right click in the display area and choose Display from the menu. Select to display as ASCII, Decimal, or Hexadecimal, depending on how you would like to view the strings.)
The Controlled device:
We cannot describe the process for every device on the market, but you must verify the following by reviewing the manual for the device or contacting the manufacturer for details.
1. Baud rate setting is default (If it can be altered, verify current settings).
2. Cable pin configuration is the same as the actual cable.
3. Make certain COM port is enabled.
4. Check unit address (match with address in code).
5. Try sending strings from terminal.
6. If manufacturer provides control software, see if that works with the device.
Techniques:
There are some trouble-shooting techniques that can aid finding your problem:
Terminal SEND commands:
In terminal while connected to the master program port, you will find you have two types of commands that allow you to troubleshoot:
SEND_STRING and SEND_COMMAND
The SEND_STRING command will send the string that follows out of the noted port. The syntax is
SEND_STRING <#>,"<String>" Where <#> equals the device number (You cannot use the device name in terminal).
"<String>" equals the string you want to send.
SEND_COMMAND commands are port configuration commands like the command to set the baud rate, parity, and data and stop bits.
SEND_COMMAND <#>, ""SET BAUD 9600,N,8,1'"
Or the command to turn on hardware handshaking
SEND_COMMAND <#>, "'HSON'"
Terminal PASS mode:
In terminal while connected to the master program port, you can type
PASS <#>
Where <#> equals the device number (You cannot use the device name in terminal).
In this mode, whatever you type on the keyboard will be sent directly out the RS-232 port as you type it. Anything that is returned by the controlled device will be displayed on screen. Your keystrokes are not echoed on the screen in this mode. The port's setting dictates the baud rate, etc. This is very handy for ASCII based commands, but Decimal and Hex characters cannot be found on the keyboard. Exit PASS mode by holding down the [Shift] key and pressing the + twice, then release the shift and press Escape [Esc] twice (Shift +, +, Esc, Esc).
NetLinx Diagnostics, Control Device:
In this diagnostic window, you can send commands to, or strings out to any NetLinx RS-232 port by selecting the appropriate options, typing device number and the string or command in the control window, and pressing the "Send to Device" button.
Open Axcess:
For Axcess equipment, you can use the diagnostic window for each port. Click the box next to the desired port, and you can send commands to, or strings out any Axcess RS-232 port. Type in the string or command and press the appropriate button. You can also see both the sent and received strings in the labeled areas.
Flow Control:
Flow control dictates whether any handshaking is used. There are three possibilities: none (the most common), hardware, and software.
Hardware handshaking involves the use of two additional conductors to send a 'Request to Send' (RTS) signal between the devices. RTS is an output signal to the far end device that states it is OK to send data. The 'Clear to Send' (CTS) connection is an input signal that receives the RTS from the far end. When the RS-232 port is configured for hardware handshaking, no data will be sent until the port receives a 'high' signal on the CTS pin from the RTS pin at the far end. Similarly, no data will be returned unless the RTS pin goes 'high', indicating it is able to receive data. There is another level of Hardware handshaking using DTR and DSR, or Data Set Ready and Data Terminal Ready. These are primarily used by modems to communicate with PCs. These modes are not used in AMX gear, and you will find no connections for these signals.
Software handshaking uses data signals over the data wiring. This method is quite rare, and you should contact Tech Support if you have any questions regarding its use.