TABLE OF CONTENTS



_____________________________________________________________________

1. Getting the controller flags

 

The controller flags belong to the following three categories: 

 

  • Controller status (FS)
  • Motor status (FM)
  • Fault flags (FF)

 

,and can be queried with the FS, FM and FF parameters respectively. Each fault corresponds to a specific bit of the status word with the following sequence: 

 

Bit

Status (FF)

Motor (FM)

Fault (FF)

1

Serial

Amp limit

Over heat

2

Pulse

Stall

Over volt

3

Analog

Loop error

Under volt

4

Fets off

Safe stop

Short

5

Stall

Fwd limit

E stop

6

At limit

Rev limit

Motor/sensor

7

STO

Amp trig

MOSfail

8

Run script

Fets off

Sef config

9

Setup


STO fault

 

To check for a specific fault, the desired status word should be masked with the bit corresponding to the specific fault. For example, to read the loop error bit of the motor flags (FM) one should mask the FM with bit 3 (0b 00000100). A bitwise AND would be adequate to show if the specific fault is present.

 

Microbasic example: 

 

 

loopErrorFault getvalue(_FM,1'For channel 1

loopErrorFault = (loopErrorFault and 0b00000100'or 0x4 for Hex values 

 

if loopErrorFault

 

    ' Add fault code here

 

end if

 

 


___________________________________________________________________

2. VPM command

 

To troubleshoot motor or sensor problems, the Roboteq controller is equipped with a built-in function that allows the rotor to be rotated by supplying a low-frequency current without using the motor sensors.

 

The command syntax is the following:

 

!VPM cc nn

 

where cc is the channel and the nn is the number of electrical rotations. 

Please note that the VPM command uses the 'reference seek power' parameter to supply the required current to the motor. For the rotor to rotate properly, 'reference seek' should be set equal to the nominal motor current, and the motor must be unloaded.

 

Important Note

 

For the rotor to rotate properly, 'reference seek' should be set equal to the nominal motor current, and the motor must be unloaded.

 


VPM Command to Determine the Pole Pairs Number


The VPM command will supply a current of defined electrical cycles to the motor. If the number of electrical cycles is equal to the motor's pole pairs, then the rotor will perform exactly one rotation. Please note that this rotation will be evident prior to the gearbox. To determine the exact number of rotations after the gearbox, one should divide the number of electrical cycles by the gearbox ratio.

 

Example:

 

Let’s assume a motor with 5 pole pairs and a gearbox with a 9:1 ratio. Then, by sending a VPM command of 45 electrical cycles, the motor shaft should perform exactly one rotation after the gearbox.

 

!VPM 1 45

 

Observing a different result would imply that the pole pairs or the gearbox ratio have not been estimated correctly.

 

VPM Command to Troubleshoot Sensor Errors 


The VPM command is very helpful for troubleshooting sensor signals. The motor can be commanded to rotate for a specific number of cycles, and then the sensor signals can be logged for troubleshooting purposes.

 

The following considerations can be taken for the various motor sensors, when the rotor performs one full rotation (prior to the gearbox) : 

 

  • Encoder sensorsThe Encoder counts will be equal the Encoder resolution multiplied by 4 (due to the quadrature operation).
  • Hall sensorsThe Hall counts will be equal to the number of motor pole pairs multiplied by 6.
  • Sin/Cos or Resolver sensors: The sensor’s output should perform one exact period. If the sensor has more than one poles, the number of periods will be proportional to the sensor poles.
  • For SSI sensorsThe number of counts will be equal to the sensor’s resolution. 

Please note that since by using the VPM command, the exact position of the rotor is not being controlled, there will be an accepted amount of error to the sensor values. An error of 5% is accepted in most of the cases.




3. Checking the drive’s MOSFETs


Each phase of the motor is connected internally on the controller in a part of the power stage that is consisted by a top and bottom MOSFET. 

 

A diagram of a motor

Description automatically generated


When a MOSFET fails, usually it gets shorted and this can be easily detected my measuring the MOSFETs body diode. The diode can be measured by using a multimeter in diode mode. By connecting the negative lead of the multimeter to the negative part of the diode and the positive lead of the multimeter to the positive part, one can measure the voltage drop across the diode. If the voltage drop is close to 0 V, then we can conclude that the MOSFET is failed. The expected voltage across A MOSFETs diode is around 0.4 V.

 

A diagram of a motor phase

Description automatically generated

 

 

Important Note

                

                When measuring the controller MOSFETs the motor and power supply should be disconnected.
 

In total, the following MOSFET measurements can be taken for each channel. If any of the readings is below 0.1 V then the MOSFET can be considered shorted.

 

 

CHANNEL 1

CHANNEL 2



Multimeter

Measured voltage

Multimeter

Measured voltage


+

-


+

-



U1

Vmot


U2

Vmot



V1

Vmot


V2

Vmot



W1

Vmot


W2

Vmot



GND

U1


GND

U2



GND

V1


GND

V2



GND

W1


GND

W2



In drives featuring STO, the STT command can be used to assess the MOSFETs' health. First, the following command must be sent to run the MOSFET test:

 

!STT

 

Then, the test results can be queried with the following command:

 

?STT 1

 

A reply of 0 indicates that there is no MOSFET damage, while a 5 indicates that one or more motor drive MOSFETs are damaged.


A test script that can be used for checking the controller's MOSFETs can be found here.  



 

4. Sending Stream Commands

 

Any runtime variable of the motor drive can be queried in a cycled way by composing a stream command. The stream structure is as follows:

 

c #_/?Par cc_?Par cc_?Par cc_# t

 

Where 'Par' is the parameter name, 'cc' is the channel, and 't' is the sampling time in milliseconds. Many parameters can be added to the same stream, starting with a question mark (?) and ending with an underscore (_).

 

The following example will stream the Ramped Command, Motor Power, Motor current, Motor speed and Fault Flags of channel 1, every 10 ms:

 

# c_/?RMP 1_?P 1_?A 1_?S 1_?FF 1_# 10

 




 

5. Calculating the motor resistance

 

Multimeters are not sufficient for measuring motor resistance, which typically lies in the milliohm range, due to their limited accuracy. One way to approximate a motor's resistance accurately is by using a power supply with current-limiting capabilities. To do this, the power supply current should be set to a relatively low value, say 5 A. Then, two of the motor phases should be powered from the power supply. The power supply will regulate the motor voltage to limit the current to the configured value. Consequently, both the motor current and voltage will be known, enabling the calculation of motor resistance using Ohm's Law. Note that the calculated resistance will be the total resistance between the two phases (phase-to-phase), so to derive the phase resistance, this value should be divided by 2.

 

A diagram of a wire

Description automatically generated

Consider the following example, where the power supply current is set to 5 A and the voltage is regulated to 0.2 V. Then the motor resistance can be calculated as follows: 

 

R=(V/I)/2 = (0.2/5)/2 = 20 mOhm


 

6. Checking the Hall Sensor Signals 


The Hall sensors are placed inside a motor 120 degrees apart. When the magnetic rotor passes from the sensors it will energize them every 60 degrees within an electrical cycle. That means that we will have 6 Hall transitions every time the rotor follows the stator's magnetic field for an electrical cycle.


From the arrangement of the Hall sensors within the motor, we will encounter the following six states:


 

Hall AHall BHall CHall status
1001
1103
0102
0116
0014
1015


The Hall status is the binary to decimal transform of the Hall signals. E.g. 001 = 1, 100 = 4 etc. Hall C is the most significant bit.




To determine that the Hall sensors are working propery, the following conditions should apply:


  • The Duration of every Hall state is the same
  • All hall transitions from 1 to 6 are observed
  • The Hall status of 0 and 7 are missing, since they are not valid
  • The signals sequence is one of the following two, depending on the motor direction: 1-3-2-6-4-5- or 5-4-6-2-3-1


Different sensor failure modes can have different impact on the motor rotation. For example if the sensors are misaligned - and so the Hall states duration is not the same - the motor current might not be stable. If one of the Hall signals is missing - the Hall status will not get all the states from 1 to 6 - and the motor probably will not be able to rotate at all. 


example of misaligned Hall sensors



Example of Hall B signal missing



The Hall state can be monitored in the Diagnostics tab during motor/sensor setup.




 A test script that can be used to check the Hall sensor's alignmet can be found here


_________________________________________________________________________________________

7. Checking the Sin/Cos Sensor Signals 


Sin/Cos sensors provide two signals, one is a sinus and one is a cosine. The easiest way to check the validy of the signals is from the diagnostics tab, when performing the motor/sensor setup process.



During motor/sensor setup, check the following:


  • The two signals are a sinus and a coisine (signals should have a phase difference of 90 degrees).
  • The two signals are free from noise. 
  • The Sensor angle increases in a linear manner.
  • The sensor max value do not exceed 3V. If the senso'r output exceeds 3 V, the singal will be clipped by the motor drives internal clipping diodes and the angle calculation will not be correct.


Then, the sensor can be tested by sending the VPM command. By sending a value that is equal to the number of the motor pole pairs, the sin and cos signals should perform one exact period. If the number of periods is a multiple of one, then the senor number of poles should be changed accordingly (1 Pole stands for one period of signal over a full motors rotation)



For more information about the VPM command, refer to paragraph  2. VPM command.