This section presents additional detailed reference material for the supported Panasonic, Tamagawa and Bosch serial absolute and incremental encoders. This information includes an explanation of special maintenance communication commands and a description of the alarm conditions that can be generated by the encoder hardware. This information is typically not necessary for setting up the encoder or for normal operations.
Encoder Startup Operation
For encoders with 17-bit counts per turn, the single turn data is valid as soon as the controller powers up and always provides accurate information on the motor's commutation reference angle. However, 10000 count serial incremental encoders operate in a different, more complicated fashion when they first power up.
When a 10000 count serial incremental encoder first starts, its single turn encoder counter is a random value with respect to the motor's commutation angle. Until the encoder is rotated and encounters the first internal zero index, the "preload" flags in the alarm and status words are asserted and the controller reads internal hall sensors values via the serial data stream. These hall readings are used by the controller to approximately set the motor's commutation reference angle. When the first zero index is encountered, the "preload" flags are set to 0 and, internally, the encoder encounter spontaneously changes value to be accurately aligned with the motor's commutation reference angle.
All of these special operations and changes in the encoder reading are automatically handled by the FPGA firmware and servo code and are not visible at the GPL level. However, this does require substantially more FPGA resources than the 17-bit encoders and the commutation angle will not be accurately set until the first internal zero index is encountered.
Encoder Low-Level Commands
This section describes the low-level commands that can be issued to the encoder. During normal operating modes, these commands should never have to be manually issued. The control system automatically issues these commands as necessary for accessing the multi-turn and single turn encoder count data and for retrieving the alarm codes.
The available commands specifically for the Panasonic and Bosch 17-Bit encoders are described in the following table:
DataID 14063 |
Type |
Description - Panasonic / Bosch Commands |
---|---|---|
4 |
Synchronous |
(Default) Get the single turn data and the alarm codes. |
5 |
Synchronous |
Get the single turn data, multi-turn data and the alarm codes. |
10 |
Asynchronous |
Get the single turn data, encoder ID and the alarm codes. |
9 |
Asynchronous |
Clear the battery and counter overflow errors. |
11 |
Asynchronous |
Clear the multi-turn data and latched errors. |
14 |
Asynchronous |
Clear all latched errors. |
The available commands specifically for the Panasonic 10000 Count encoders are described in the following table:
DataID 14063 Command # |
Type | Description - Panasonic / Bosch Commands |
---|---|---|
5 |
Synchronous |
(Default) Get 24-bit position and single turn data. |
10 |
Asynchronous |
Get the single turn data, encoder ID. |
11 |
Asynchronous |
Clear all latched errors, get 24-bit position data. |
14 |
Asynchronous |
Clear all latched errors, get encoder ID. |
The available commands specifically for the Tamagawa encoders are described in the following table:
DataID 14063 Command # | Type | Description - Tamagawa Commands |
---|---|---|
0 |
Asynchronous |
Get the single turn data. |
1 |
Asynchronous |
Get the multi-turn data. |
2 |
Asynchronous |
Get the encoder ID. |
3 |
Synchronous |
(Default) Get the single turn data, multi-turn data, encoder ID and the alarm codes. |
7 |
Asynchronous |
Clear all latched errors. |
12 |
Asynchronous |
Clear the multi-turn data and latched errors. |
To execute these commands, you must access the console interface by either connecting a terminal to the first serial port or launching the Remote Console from the web Control Panels. To perform any of these commands, issue the following instructions using the console port, where the <robot> and <axis> numbers count from 1:
PC 14500,<robot> = <axis>
PC 14063 = <command #>
Command #5 is automatically executed by the system to obtain the multi-turn data during the homing operation. During normal execution, the controller is continuously issuing Command #4 (or Command #5) to read the single-turn position and the alarm status.
Commands #9 to #14 are used for clearing the various encoder alarm conditions or to facilitate initializing the encoder during the manufacturing process or during field service.
In addition, the system supports the following limited set of Generic Commands that are redundant with the DataID 14063 commands, but will work for all serial encoders.
DataID 14065 |
Type |
Description - Generic Commands |
---|---|---|
1 |
Asynchronous |
Clear all latched errors. |
2 |
Asynchronous |
Clear battery and counter overflow errors. |
3 |
Asynchronous |
Clear the multi-turn data and latched errors. |
Encoder Alarm Conditions - Response and Recovery
These serial absolute and incremental encoders can generate a number of hardware alarm conditions. The specific error condition is indicated in "Encoder alarm" (DataID 12251). The interpretation of the alarm bits returned in this system parameter is a function of the type of encoder.
The following table contains a detailed description of each alarm for ALL 17-BIT encoders.
Bit | Name | Cause | Description |
---|---|---|---|
0 |
Over-speed |
This alarm occurs when the encoder power is OFF and its shaft speed and/or acceleration exceed specified limits. This alarm is returned the next time the encoder power is enabled. When this alarm occurs it’s likely that the multi-turn encoder data is no longer correct. |
System Action: If the motor is turned ON and calibrated, it can continue to be used so long as the multi-turn data is not accessed. If homing is initiated, the operation will probably fail until this fault condition is manually cleared. |
1 |
Reduced encoder resolution |
When the controller is first restarted, this alarm is generated if the encoder is turning faster than 100 RPM. When this occurs, the accuracy of the single turn data drops to only 5 bits of resolution. When the encoder shaft speed drops below 100 RPM the single turn data is restored to 17 bits (full resolution) and this flag is automatically cleared. |
System Action: After boot up, before using the encoder data, the servo checks to ensure that this flag is cleared. If it remains set for consecutive reads, an encoder error is issued to prevent the motor power from being enabled. |
2 |
Counter error |
At any time when the controller is on: |
System Action: For either
a type 1 or type 2 encoder
count error, the servo will issue a standard error message, which
is equivalent of an “index error”, and motor high
power is disabled. |
3 |
Multi-turn counter overflow |
If the multi-turn data overflows, then this bit is set. If the overflow occurs when the encoder power is turned off, this alarm will be returned after the encoder is powered up. The multi-turn data will keep accumulating regardless of this alarm. The multi-turn counter counts between 0 and 65535. |
Action: A multi-turn data overflow (or underflow) has no effect on the servo run-time operation. However, during homing, if this fault is detected then the homing operation will fail. NOTE: During normal encoder setup, the multi-turn data is interpreted by the servo as a signed value and its actual count range is between -32768 and 32767. So, this error should never occur for a typical robot. |
4 |
|
(reserved) |
|
5 |
Multiple turn read error |
If the encoder multi-turn data cannot be properly accessed when the controller is restarted, this bit is set. |
System Action: There is no effect on turning on motor power. However, the motor homing operation will fail. |
6 |
System down |
For Panasonic, if the encoder’s built-in capacitor voltage drops below 2.5 +/- 0.2V then this flag is set and the multi-turn data is most likely corrupted. |
System Action: When this alarm occurs, the servo issues a severe error and motor power is disabled immediately. Motor power is prevented from being turned on. |
7 |
Battery alarm |
If the external battery voltage drops below 3.1 +/- 0.1V then this alarm is set. This occurs regardless of the encoder power state. Note that when the battery is disconnected this alarm will be asserted. |
System Action: When a battery low warning is issued, the multi-turn data is still valid as long as the encoder’s internal capacitor maintains a proper voltage level. See alarm bit #6. |
8 |
Communication time out |
When the controller is first started, this error will be generated if the controller is not able to communicate with the encoder. |
System Action: After
boot up, the servo communicates with the encoder to extract information
stored in the encoder. If the servo is unable to successfully
communicate, this error is signaled. |
The following table contains a detailed description of each alarm for 10000 COUNT INCREMENTAL encoders.
Bit | Name | Cause | Description |
---|---|---|---|
0-2 |
Hall sensor value |
|
These bits do NOT indicate an alarm or error condition. They return the internal hall sensor value that is used to commutate the motor until the first zero index is encountered. |
3 |
Wrong count per rev |
The wrong number of counts per revolution have been detected when an internal index signal is encountered. If the error is greater than +/- 0.108 degrees, this bit will be set. |
System Action: The servo generates a standard error message, which is equivalent to an index error, and motor power is disabled. |
4 |
Hall phase count error |
The number of encoder counts between hall sensor phases is less than 255. |
System Action: The servo will issue a severe error message. The error is equivalent to a hall sensor failure and motor power is disabled. |
5 |
First index not found |
The internal zero index signal was not detected even though the "pre-load" status flag has been cleared by the encoder. |
System Action: The servo generates a standard error message, which is equivalent to an index error, and motor power is disabled. |
6 |
Hall phase output error |
This alarm bit is set if all of the bits of the internal hall sensor output are "1"'s or "0"'s. |
System Action: The servo will issue a severe error message. The error is equivalent to a hall sensor failure and motor power is disabled. |
7 |
Pre-load status |
This bit is set to 1 when the encoder is first powered on. It will be reset to 0 when the first internal zero index is detected. |
This is a status bit and will be normally reset after the first revolution of the motor. |
8 |
Communication time out |
This is the same signal as documented above for the absolute encoders. |
This is the same signal as documented above for the absolute encoders. |
Clearing Alarm Conditions
Although alarm conditions are not very common, when they occur, some alarm conditions stay latched until they are manually cleared. To clear a latched alarm, you must access the console interface by either connecting a terminal to the first serial port or launching the Remote Console from the web Control Panels.
To clear most encoder latched errors, execute the following commands where the <robot> and <axis> numbers count from 1:
PC 14500,<robot> = <axis>
PC 14063 = 14 ' For Panasonic encoders
or
PC 14063 = 7 ' For Tamagawa encoders
or
PC 14065 = 1 ' For all serial encoders
To reset the multi-turn counter and reset the latched errors, execute the following commands:
PC 14500,<robot> = <axis>
PC 14063 = 11 ' For Panasonic encoders
or
PC 14063 = 12 ' For Tamagawa encoders
or
PC 14065 = 3 ' For all serial encoders
If a battery alarm is signaled due to the external battery having a low charge, keep in mind that the alarm will probably be set on all encoders and each encoder's alarm condition must be individually reset.
External Encoder Battery Replacement
When the Guidance Controller is not powered on, the absolute encoder retains the multi-turn counter using power from either an internal or an external battery. The external battery is connected to the controller's MCIM and supplies power to all connected absolute encoders. The internal battery in each encoder has power for approximately 1 hour when fully charged and is designed to supply power while the external battery is being changed.
To change the external battery, perform the following steps:
- Log the current multi-turn data for all axes.
- Power down the encoders and replace the battery. As stated above, you have approximately 1 hour to restore the external battery power.
- Power the encoders back up and manually clear the encoder alarm conditions for all axes.
- Read the multi-turn data back to make sure they are the same as before. If not, then it’s likely that the multi-turn data is corrupted and the homing offset must be set again