S” data register – Applied Motion RS-232 User Manual
Page 255

255
920-0002 Rev. I
2/2013
Host Command Reference
Hex Value
Status Code bit definition
1000
Wizard running (Timing Wizard is running)
2000
Checking encoder (Timing Wizard is running)
4000
Q Program is running
8000
Initializing (happens at power up)
Example: The drive is running a stored Q program (hex value 4000), it’s in position (hex value 0008), and it’s
waiting for the input specified by the WI command (hex value 0080). The Status Code for this condition is 4088,
and when the host sends the “SC” command the drive will respond with “SC=4088”.
“s” data register
Another way to retrieve the Status Code is to use the “s” data register. If the host sends the RLs command,
the response from the drive will be the decimal equivalent of the 16-bit Status Code word. The diagram below
shows the 16 bit assignments for the Status Code (which of course match the hexadecimal values above).
Example: The drive is running a stored Q program (bit 14), it’s in position (bit 3), and it’s waiting for the
input specified by the WI command (bit 7). The resulting Status Code binary word is 0100 0000 1000 1000. The
decimal equivalent of this word 16,520, so the response from the drive to the RLs command will be “RLs=16520”.
A useful tool for converting between binary, decimal, and hexadecimal.
If you’re using a Windows-based PC as a host with your drive (which you’ll definitely be doing at some
point during the project), you can use the Calculator utility that comes with Windows to convert Alarm and Status
Codes between binary, decimal, and hexadecimal values. This utility is usually found in Start Menu, Programs,
Accessories. Once open, make sure to choose Scientific view from the View menu of Calculator. This view
provides radio buttons for Hex, Dec, and Bin.
To figure out what your Alarm or Status Code is telling you, first select the appropriate radio button (Hex for
the AL or SC commands, Dec for the “f” and “s” registers), then enter the response from the drive. Now you can
toggle between Hex, Dec, and Bin to compare the values to the tables and diagrams above. Note: Calculator
does not show leading zeros in a binary number, so you may see less than 16 bits when you select Bin. That’s
OK, just start counting from the right with Bit 0 and you’ll be able to determine the conditions set in the codes.