Commanding a Motor Speed Toque or Position in a KMS reference project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Commanding a Motor Speed Toque or Position in a KMS reference project

Commanding a Motor Speed Toque or Position in a KMS reference project

Introduction:

KMS has a built in Motion Sequence Builder tool that gives you a very quick way of commanding various motor control scenarios.  If your motor control device requires external control of the speed, position or torque you will need to adapt the provided KMS reference design to your needs. 

 

I recommend you start by using the Motion Sequence Builder to create a plan and variables that resemble your application. Examples provided include a blender, a ceiling fan and a washing machine for speed control and a security camera panning example for position control.

 

After completing the KMS GUI motor commissioning and experimenting with your motion plan, you will want to drive your motor within your application without the GUI and outside the bounds of the motion plan.  Now to create your own control system, to commanded speed, torque or position driven from another source. 

 

This document covers the basics of performing those commands. In these example you will be interacting with the User block.  The User block aggregates the main motor operating states capable of being called by the user. This is intended to provide an easy, consistent code interface for the user to be able to command a specific operating state and perform certain common configurations of the desired state.

 

Knowing the State of the Motor:

Before you tell the motor to go-to-speed, or go-to-position, or command a torque, you need to know that the motor is ready to accept your command.  I strongly suggest you read Chapter 2 of the KMS API reference manual.  Some of the text below is copied from there.

 

States that can be accessed via the User block include:

  • Idle
  • Fault
  • Self-commissioning (SCM)
  • Inertia Estimation (Inertia)
  • PWM Duty Control
  • Voltage Control
  • Current Control (Current)
  • Speed Control (Speed)
  • Position Control (Position) [Sensored Position]
  • Motion Sequence (Plan)
  • Braking (Brake)
  • Encoder Alignment (Align) [Sensored Velocity or Sensored Position]

 

Once in a state you can update the speed or position or torque directly.  Prior to entering the user state that commands speed, position or torque you need to take the input and covert it to the proper units.

 

Where to put your Control Code:

 

In the main loop, the code snippet below checks the state of the DC bus and the Fault indicator.

 

/* DC BUS Charging Indicator */

  if(DRV_getDcbBusVoltage()<DRV_getDcbBusUnderVoltageThreshold()||DRV_getIsFaultActive())

        {

            BUS_VOLTAGE_LEDOFF;

        }

        else

        {

            BUS_VOLTAGE_LEDON;

        }

        /* FAULT Indicator */

        if (DRV_getIsFaultActive()) // Pulled Up Switch is Active Low

        {

            FAULT_LEDON;

        }

        else

        {

            FAULT_LEDOFF;

        }                    

 

You can put your control code in this loop or better yet you can put your control code in the interrupt service routine that executes at the slow tick rate.

 

/**

 * @fn      SWI_IRQHandler(void)

 * @brief   Run slow isr task

 *

 * @return  None

 * @ingroup SLOW_ISR

 */

void SWI_IRQHandler(void)

{

    static timestamp_t SlowIsrStartLast = 0;

    /*!< Previous Start of ISR timestamp for measuring period  */

 

    timestamp_t startCycleCount = GetProfilerCycles();

    CpuUtilization.SlowIsrPeriod = startCycleCount -SlowIsrStartLast;

    SlowIsrStartLast = startCycleCount;

 

    /* Clear source of ISR */

    NVIC_ClearPendingIRQ(SWI_IRQn);

 

    /* Update drive module */

    DRV_updateSlowTick();

 

    /* Diagnostic counter */

    slowTicks++;;‍‍‍‍‍‍

    /* insert control code here  for example test for state*/

    /*LED1 to indicate motor in Plan mode */

    if(user.state == USER_RUN_PLAN)

    {

        LED4_ON;

    }

    else

    {

        LED4_OFF;

    }

 

 

Conversion:

The conveyor example below has two inputs derived from the ADC result register. In the next code listing, the inputs values are scaled and converted to LQ format. These controls are demonstrated in the conveyor belt demonstration shown in the video Kinetis Motor Control Made Easy. The two potentiometers shown in the picture are fed into an ADC channel. 

 conveyor_controls.png

 

   /*poll external outputs*/

    /*GPIO have HW enabled anti-glitch and Pullup*/

    /*1 = on 0 = off */

    userPlanVariables.On_Off=!((bool)GPIO_DRV_ReadPinInput(kGpioOnOff));

    /*high = 1, low = 0 */

    userPlanVariables.Low_High=(bool)GPIO_DRV_ReadPinInput(kGpioHighLow);

   

    /*in High speed operation need slightly higher bandwidth */

    if(userPlanVariables.Low_High == 0)

    {

        userPlanVariables.Bandwidth_High = _LQ20(70.0);

        userPlanVariables.Bandwidth_Low = _LQ20(10.0);

       

    }

    else

    {

        userPlanVariables.Bandwidth_High = _LQ20(100.0);

        userPlanVariables.Bandwidth_Low = _LQ20(15.0);

    }

    /*Value Scaled to 0-1 in LQ Format Q12->GlobalLQ*/
 userPlanVariables.Bandwidth_Scale=_LQXtoLQY(adc0Results[0],12,GLOBAL_LQ);
 position
.config.lq20Bw_radps = _LQ20mpyLQX( userPlanVariables.Bandwidth_High - userPlanVariables.Bandwidth_Low , 20U, userPlanVariables.Bandwidth_Scale ,GLOBAL_LQ) \
 
+ userPlanVariables.Bandwidth_Low;
/*Value Scaled to 0-1 in LQ Format with light exponential weighting .5821*(e^x-1)*/
 userPlanVariables
.Jerk_Scale=_LQmpy(_LQXtoLQY(_LQ20exp(_LQXtoLQY(adc1Results[0],12,20U)),20,GLOBAL_LQ)-_LQ(1.0),\
 
_LQ(0.581992));‍‍‍‍‍‍‍

 

You cannot just set the target speed like this using and integer value for RPM.  

user.command.targetSpeed = 100;

The KMS code uses QMath in the calculations. Conversion of a float or integer to a LQ type is easy to do using the API calls. Check out Chapter 24 Math for the details on the QMath library.

 

In KMS all values are normalized fixed-point.  So setting user.command.targetSpeed to 100 sets the target speed to a very small value (<< 1RPM).

 

You need to convert from RPM into the normalized fixed point used by KMS. 

user.command.targetSpeed = _LQ(100.0 / FULL_SCALE_SPEED_RPM);

 

In the above line, FULL_SCALE_SPEED_RPM represents the maximum possible speed in the system.  Dividing the input speed of 100.0 by this value will convert your input into a normalized value.  Since KMS is also fixed point, we need to convert this normalized floating-point number to fixed point.  The macro _LQ will convert from floating point into fixed point at the default Qness.  The variable user.command.targetSpeed is defined as an _lq variable.  This means it is a 32-bit container with a Qness of 24 (24 bits after the decimal point).  By default all _lq variables default to Q24 unless otherwise noted in the variable name.  

 

Commanding Speed:

In the KMS_API RM, the user block is defined. The user.state definitions are in the user.h file.

If you want to idle the motor you would write:

user.stateUSER_IDLE;

To set the user state to run speed you would write:

user.stateUSER_RUN_SPEED;

 

Here is a list of all the USER_States for speed control.

/**
 * @enum USER_state_e
 * @brief USER state-machine states
 */

typedef enum
{
 USER_IDLE
= 0, /**< 0: USER IDLE state */
 USER_FAULT
= 1, /**< 1: USER FAULT state */
 USER_SCM
= 2, /**< 2: USER self-commissioning state */
 USER_INERTIA
= 3, /**< 3: USER inertia estimation state */
 USER_RUN_DUTY
= 4, /**< 4: DSM run PWM duty control state */
 USER_RUN_VOLTAGE
= 5, /**< 5: DSM run voltage control state */
 USER_RUN_CURRENT
= 6, /**< 6: USER run current control state */
 USER_RUN_SPEED
= 7, /**< 7: USER run speed control state */
 USER_RUN_PLAN
= 8, /**< 8: USER run a motion plan state */
 USER_BRAKE
= 9, /**< 9: USER braking state */
} USER_state_e;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 

If you use the feedback_3ph.c as an example piece of code, the raw ADC reading is converted to a _sq with the use of the function (_sq): tempSQ = (_sq)(adcResults->phaseBCurrent - v->calib.offsetIb);

Likewise, the conversion of the RAW ADC result to LQ is accomplished using the (_lq) function.

In the following code example an ADC input is used to control the speed. The code below, takes the ADC results and converts it to an _lq type by means of the following statement:

adc0Results[0] = (_lq) adc0RawResults[0];

 

/* code start */
// declare these as global variables in main.c
_lq adcSpeed
= 0;
_lq adcSpeedAccum
= 0;
_lq adcSpeedAvg
= 0;
uint16_t speedUpdateCounter
= 0;
 
// this code takes the ADC reading, downshifts it by 4 to remove noise and uses that as a percentage of the maximum applicaton speed (in this case 20krpm)
adcSpeed
= _LQmpyLQX((adc0Results[0] >> 4), 8, _LQ(20000.0/FULL_SCALE_SPEED_RPM), 24);
adcSpeed
= _LQsat(adcSpeed, _LQ(1.0), _LQ(0.0));
 
// this code averages the adc reading over 125 samples before setting it to user.command.targetSpeed
// it will also handle setting the control mode if the commanded speed is larger than 0
if(adcSpeed > _LQ(0.0))
{
                user
.state= USER_RUN_SPEED;
               
if(speedUpdateCounter >= 125)
               
{
                     speedUpdateCounter
= 0;
                     adcSpeedAvg
=(adcSpeedAccum/125)&0x00FF0000;
                     user
.command.targetSpeed = adcSpeedAvg;
                     adcSpeedAccum
= 0;
               
}
               
else
               
{
                     adcSpeedAccum
= adcSpeed + adcSpeedAccum;
                     speedUpdateCounter
++;
                
}
}
else
{
        user
.state= USER_IDLE;
        adcSpeedAccum
= 0;
        adcSpeedAvg = 0;
        speedUpdateCounter
= 0;
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Setting command Values:

Before you change a user.state there are parameters like acceleration and jerk you can modify. Prior to change the state you can update any number of other command values list in the function below. The list gives a quick look at the parameters you can update prior to changing the motor state. Each of the command values listed can be updated prior to this call. As you can see, setting the speed value in the line containing command.targetSpeed is just one of five values sent to the drive command.

 

After setting these parameters, you command a state change to USER_RUN_SPEED

user.stateUSER_RUN_SPEED;

 

The user state “USER_RUN_SPEED” executes this function which start the motor on the new trajectory.

/**
 * @fn USER_runSpeedState(USER_t *pUSER, SPEED_t *speed, DRV_control_e controlType, \
 * TRF_rVector16_t startupStatorRefCurrent, _sq fwIdRef)
 * @brief Runs the Speed Control USER state
 * @param pUSER - pointer to the USER block
 * @return none
 */

static void USER_runSpeedState(USER_t *pUSER)
{
 
/* For trajectory, just send command values to DRV*/
 pUSER
->output.drvCommand.targetSpeed = pUSER->command.targetSpeed;
 pUSER
->output.drvCommand.limitAcc = pUSER->command.limitAcc;
 pUSER
->output.drvCommand.lq20LimitJerk = pUSER->command.lq20LimitJerk;
 pUSER
->output.drvCommand.IqRefMax = pUSER->command.IqRefMax;
 pUSER
->output.drvCommand.IqRefMin = pUSER->command.IqRefMin;
/* Run trajectory generator in this state */
 pUSER
->output.drvCommand.runTrajectory = true;
return;
} /* end of USER_runSpeedState() */‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 

 

Commanding Torque:

If you wanted to command torque (current), then you would initialize the command values identified in the code below. In addition to command .statorRefCurrent, you can specify a command.targetSpeed. 

/**
 * @fn USER_runCurrentState(USER_t *pUSER)
 * @brief Runs the Current control USER state
 * @param pUSER - pointer to the USER block
 * @return none
 */

static void USER_runCurrentState(USER_t *pUSER)
{
 pUSER
->output.drvCommand.targetSpeed = pUSER->command.targetSpeed;
 pUSER
->output.drvCommand.limitAcc = pUSER->command.limitAcc;
 pUSER
->output.drvCommand.lq20LimitJerk = pUSER->command.lq20LimitJerk;
 pUSER
->output.drvCommand.statorRefCurrent = pUSER->command.statorRefCurrent;
 pUSER
->output.drvCommand.enableDCInjection = pUSER->command.enableDCInjection;
return;
} /* end of USER_runCurrentState() */‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Commanding Position:

When using KMS to control a position, the call to the following function is made.  The motor position control follows a trajectory that you choose prior to the call by setting the command values to the motor drive state machine. In the position control reference project include file "user.h" there are two more USER state-machine states added to the list of USER_STATES -> USER_RUN_POSITION and USER_ALIGN.

/**
 * @enum    USER_state_e
 * @brief   USER state-machine states
 */

typedef enum
{
    USER_IDLE        
= 0, /**< 0: USER IDLE state */
    USER_FAULT       
= 1, /**< 1: USER FAULT state */
    USER_SCM         
= 2, /**< 2: USER self-commissioning state */
    USER_INERTIA     
= 3, /**< 3: USER inertia estimation state */
    USER_RUN_DUTY    
= 4, /**< 4: DSM run PWM duty control state */
    USER_RUN_VOLTAGE 
= 5, /**< 5: DSM run voltage control state */
    USER_RUN_CURRENT 
= 6, /**< 6: USER run current control state */
    USER_RUN_SPEED   
= 7, /**< 7: USER run position-controlled speed state */
    USER_RUN_PLAN    
= 8, /**< 8: USER run a motion plan state */
    USER_BRAKE       
= 9, /**< 9: USER braking state */
    USER_RUN_POSITION
= 10, /**< 10: USER run position control state */
    USER_ALIGN       
= 11  /**< 11: USER force motor into alignment */
} USER_state_e;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

To command a position, set the command values and then set the state to USER_RUN_POSITION

user.stateUSER_RUN_POSITION;

This will result in a trajectory to be executed. 

/**
 * @fn USER runSpeedState(USER_t *pUSER,SPEED_t *speed,DRV_control_e controlType,
 * TRF_rVector16_t startupStatorRefCurrent, _sq fwIdRef)
 * @brief Runs the Speed Control USER state
 * @param pUSER - pointer to the USER block
 * @return none
 */

static void USER_runPositionState(USER_t *pUSER)
{
 
/* For trajectory, just send command values to DRV*/
 pUSER
->output.drvCommand.runTrajectory = pUSER->command.runTrajectory;
 pUSER
->output.drvCommand.posStepInt_mrev = pUSER->command.posStepInt_mrev;
 pUSER
->output.drvCommand.posStepFrac_mrev = pUSER->command.posStepFrac_mrev;
 pUSER
->output.drvCommand.limitVel = pUSER->command.limitVel;
 pUSER
->output.drvCommand.limitAcc = pUSER->command.limitAcc;
 pUSER
->output.drvCommand.limitDec = pUSER->command.limitDec;
 pUSER
->output.drvCommand.lq20LimitJerk = pUSER->command.lq20LimitJerk;
 pUSER
->output.drvCommand.IqRefMax = pUSER->command.IqRefMax;
 pUSER
->output.drvCommand.IqRefMin = pUSER->command.IqRefMin;
/* Run trajectory generator in position mode */
 pUSER
->output.drvCommand.velocityMode = false;
return;
} /* end of USER_runSpeedState() */‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Below is a bare metal code example used to drive the X or Y axis of a position controller.  The UART receives the command and a sync pulse on a GPIO starts the trajectory profile. This is not very robust code with very little command format checking.  I encourage you to consider the limit conditions and correctness of the input command values before using them to command the motor position.  This code tends to occasionally miss-fire and send the 3D printer base flying to the end stop.

user.state = USER_RUN_POSITION;
while (true)
{
// LED2 GREEN is DC BUS Charging Indicator, disable if fault
if (DRV_getDcbBusVoltage() < DRV_getDcbBusUnderVoltageThreshold() || DRV_getIsFaultActive()) LED2_OFF; else LED2_ON;

// Expected format: xAAAAAAAABBBBBBBBX
// Wait for initial 'x' or 'y', remember to set this in axis variable
GPIOC_PSOR
=(1<<3); //set buffer ready
do {cin=UART1_CharIn();} while (cin!=axis);
// Read AAAAAAAA (dx as a float)
mem
=(byte *)&f1; for (i=0;i<4;i++) {*mem=UART1_ByteIn(); mem++;}
// Read BBBBBBBB (dy as a float)
mem
=(byte *)&f2; for (i=0;i<4;i++) {*mem=UART1_ByteIn(); mem++;}
// Wait for final 'X' or 'Y': if not an 'X' or 'Y', ignore message
cin
=UART1_CharIn();
if (cin==axis-32)
 
{
 GPIOC_PCOR
=(1<<3);
 
UART_CharOut(axis);
 
// Valid Message, go ahead and execute
 
// ROTATION: extract integer part of rotation
 value
=(int)f1;
 user
.command.posStepInt_mrev=value;
 
//UART_TextOut("IntRotation=");
 
UART_DbleOut(value,4,1);
 
// ROTATION: extract fractional part of rotation
 user
.command.posStepFrac_mrev=_LQ(f1-value);
 
//UART_TextOut("FracRotation=");
 
UART_DbleOut(f1-value,4,4);
 
// SPEED: extract integer part of rotation
 f2
=f2/4000.0;
 user
.command.limitVel=_LQ(f2);
 
//UART_TextOut("SpeedRPM=");
 
UART_DbleOut(f2,4,4);
 GPIOC_PSOR
=(1<<6);
 
// Wait for Sync
 
while (((GPIOE_PDIR&(1<<6))==0));
 GPIOC_PCOR
=(1<<6);
 flag
=0; done=1; user.command.runTrajectory=1;
 
while (done==1) {UART_CharOut('1');}
 GPIOC_PSOR
=(1<<6);
 
}
}//while (true)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 

Conclusion:

Four steps are needed:

  1. Check the existing state of the motor, managing faults and trajectories.
  2. Convert the commanded inputs to the fixed-point values needed by KMS.
  3. Set the configuration parameters, like acceleration, jerk and speed.
  4. Change the user state to the desired state, Speed, Torque, Position.

 

 

Philip Drake

Systems Applications Engineer

Labels (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1108011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECommanding%20a%20Motor%20Speed%20Toque%20or%20Position%20in%20a%20KMS%20reference%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1108011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20green%3B%20font-size%3A%2018.0pt%3B%22%3E%3CSTRONG%3EIntroduction%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233d3d3d%3B%20font-size%3A%2011.5pt%3B%22%3E%3CSTRONG%3EKMS%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3Bhas%20a%20built%20in%20Motion%20Sequence%20Builder%20tool%20that%20gives%20you%20a%20very%20quick%20way%20of%20commanding%20various%20motor%20control%20scenarios.%26nbsp%3B%20If%20your%20motor%20control%20device%20requires%20external%20control%20of%20the%20speed%2C%20position%20or%20torque%20you%20will%20need%20to%20adapt%20the%20provided%20KMS%20reference%20design%20to%20your%20needs.%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EI%20recommend%20you%20start%20by%20using%20the%20Motion%20Sequence%20Builder%20to%20create%20a%20plan%20and%20variables%20that%20resemble%20your%20application.%20Examples%20provided%20include%20a%20blender%2C%20a%20ceiling%20fan%20and%20a%20washing%20machine%20for%20speed%20control%20and%20a%20security%20camera%20panning%20example%20for%20position%20control.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EAfter%20completing%20the%20KMS%20GUI%20motor%20commissioning%26nbsp%3Band%20experimenting%20with%20your%20motion%20plan%2C%20you%20will%20want%20to%20drive%20your%20motor%20within%20your%20application%20without%20the%20GUI%20and%20outside%20the%20bounds%20of%20the%20motion%20plan.%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%20Now%20to%20create%20your%20own%20control%20system%2C%20to%20commanded%20speed%2C%20torque%20or%20position%20driven%20from%20another%20source.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EThis%20document%20covers%20the%20basics%20of%20performing%20those%20commands.%26nbsp%3BIn%20these%20example%20you%20will%20be%20interacting%20with%20the%20User%20block.%26nbsp%3B%20The%20User%20block%20aggregates%20the%20main%20motor%20operating%20states%20capable%20of%20being%20called%20by%20the%20user.%20This%20is%20intended%20to%20provide%20an%20easy%2C%20consistent%20code%20interface%20for%20the%20user%20to%20be%20able%20to%20command%20a%20specific%20operating%20state%20and%20perform%20certain%20common%20configurations%20of%20the%20desired%20state.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3EKnowing%20the%20State%20of%20the%20Motor%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EBefore%20you%20tell%20the%20motor%20to%20go-to-speed%2C%20or%20go-to-position%2C%20or%20command%20a%20torque%2C%20you%20need%20to%20know%20that%20the%20motor%20is%20ready%20to%20accept%20your%20command.%3C%2FSPAN%3E%20%26nbsp%3BI%20strongly%20suggest%20you%20read%20Chapter%202%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Freference-manual%2FKMSRM.pdf%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EKMS%20API%20reference%20manual%3C%2FA%3E.%26nbsp%3B%20Some%20of%20the%20text%20below%20is%20copied%20from%20there.%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EStates%20that%20can%20be%20accessed%20via%20the%20User%20block%20include%3A%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Idle%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Fault%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Self-commissioning%20(SCM)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Inertia%20Estimation%20(Inertia)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20PWM%20Duty%20Control%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Voltage%20Control%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Current%20Control%20(Current)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Speed%20Control%20(Speed)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Position%20Control%20(Position)%20%5BSensored%20Position%5D%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Motion%20Sequence%20(Plan)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Braking%20(Brake)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%20Encoder%20Alignment%20(Align)%20%5BSensored%20Velocity%20or%20Sensored%20Position%5D%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EOnce%20in%20a%20state%20you%20can%20update%20the%20speed%20or%20position%20or%20torque%20directly.%26nbsp%3B%20Prior%20to%20entering%20the%20user%20state%20that%20commands%20speed%2C%20position%20or%20torque%20you%20need%20to%20take%20the%20input%20and%20covert%20it%20to%20the%20proper%20units.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3EWhere%20to%20put%20your%20Control%20Code%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EIn%20the%20main%20loop%2C%20the%20code%20snippet%20below%20checks%20the%20state%20of%20the%20DC%20bus%20and%20the%20Fault%20indicator.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%2F*%20DC%20BUS%20Charging%20Indicator%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%20if(DRV_getDcbBusVoltage()%3CDRV_GETDCBBUSUNDERVOLTAGETHRESHOLD%3E%3C%2FDRV_GETDCBBUSUNDERVOLTAGETHRESHOLD%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20BUS_VOLTAGE_LEDOFF%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20else%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20BUS_VOLTAGE_LEDON%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20FAULT%20Indicator%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(DRV_getIsFaultActive())%20%2F%2F%20Pulled%20Up%20Switch%20is%20Active%20Low%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20FAULT_LEDON%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20else%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20FAULT_LEDOFF%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EYou%20can%20put%20your%20control%20code%20in%20this%20loop%20or%20better%20yet%20you%20can%20put%20your%20control%20code%20in%20the%20interrupt%20service%20routine%20that%20executes%20at%20the%20slow%20tick%20rate.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233f7f5f%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B*%20%3Ca%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233122%22%3E%40FN%3C%2Fa%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SWI_IRQHandler(void)%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B*%20%40brief%26nbsp%3B%26nbsp%3B%20Run%20slow%20isr%20task%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B*%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B*%20%40return%26nbsp%3B%20None%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B*%20%40ingroup%20SLOW_ISR%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3Evoid%20SWI_IRQHandler(void)%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20static%20timestamp_t%20SlowIsrStartLast%20%3D%200%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*!%26lt%3B%20Previous%20Start%20of%20ISR%20timestamp%20for%20measuring%20period%26nbsp%3B%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20timestamp_t%20startCycleCount%20%3D%20GetProfilerCycles()%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CpuUtilization.SlowIsrPeriod%20%3D%20startCycleCount%20-SlowIsrStartLast%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SlowIsrStartLast%20%3D%20startCycleCount%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20Clear%20source%20of%20ISR%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20NVIC_ClearPendingIRQ(SWI_IRQn)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20Update%20drive%20module%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20DRV_updateSlowTick()%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20Diagnostic%20counter%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20slowTicks%2B%2B%3B%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2014.0pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%2F*%20insert%20control%20code%20here%20%26nbsp%3Bfor%20example%20test%20for%20state*%2F%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*LED1%20to%20indicate%20motor%20in%20Plan%20mode%20*%2F%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(user.state%20%3D%3D%20USER_RUN_PLAN)%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20LED4_ON%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20else%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20LED4_OFF%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3EConversion%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EThe%20conveyor%20example%20below%20has%20two%20inputs%20derived%20from%20the%20ADC%20result%20register.%20In%20the%20next%20code%20listing%2C%20the%20inputs%20values%20are%20scaled%20and%20converted%20to%20LQ%20format.%20These%20controls%20are%20demonstrated%20in%20the%20conveyor%20belt%20demonstration%20shown%20in%20the%20video%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fvideo%2Fmotor-control-made-easy-with-kinetis-motor-suite%3AMOTOR-CONTROL-MADE-EASY-KMS%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%232989c5%3B%20text-decoration%3A%20none%3B%22%3EKinetis%20Motor%20Control%20Made%20Easy%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E.%20The%20two%20potentiometers%20shown%20in%20the%26nbsp%3Bpicture%20are%20fed%20into%20an%20ADC%20channel.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22conveyor_controls.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22conveyor_controls.png%22%20style%3D%22width%3A%20880px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F85632i1A6B6FA39005D4F3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22conveyor_controls.png%22%20alt%3D%22conveyor_controls.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%20%2F*poll%20external%20outputs*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*GPIO%20have%20HW%20enabled%20anti-glitch%20and%20Pullup*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*1%20%3D%20on%200%20%3D%20off%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20userPlanVariables.On_Off%3D!((bool)GPIO_DRV_ReadPinInput(kGpioOnOff))%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*high%20%3D%201%2C%20low%20%3D%200%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20userPlanVariables.Low_High%3D(bool)GPIO_DRV_ReadPinInput(kGpioHighLow)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*in%20High%20speed%20operation%20need%20slightly%20higher%20bandwidth%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if(userPlanVariables.Low_High%20%3D%3D%200)%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20userPlanVariables.Bandwidth_High%20%3D%20_LQ20(70.0)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20userPlanVariables.Bandwidth_Low%20%3D%20_LQ20(10.0)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20else%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20userPlanVariables.Bandwidth_High%20%3D%20_LQ20(100.0)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20userPlanVariables.Bandwidth_Low%20%3D%20_LQ20(15.0)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20%23F5F2F0%3B%22%3E%3CSPAN%20style%3D%22color%3A%20slategray%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*Value%20Scaled%20to%200-1%20in%20LQ%20Format%20Q12-%26gt%3BGlobalLQ*%2F%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20font-size%3A%2011.5pt%3B%20%22%3E%3CSTRONG%3E%3CEM%3E%3CBR%20%2F%3E%20%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3BuserPlanVariables%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EBandwidth_Scale%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQXtoLQY%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eadc0Results%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%5D%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E12%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EGLOBAL_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20%3CBR%20%2F%3E%20%26nbsp%3Bposition%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Econfig%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Elq20Bw_radps%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ20mpyLQX%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20userPlanVariables%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EBandwidth_High%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20userPlanVariables%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EBandwidth_Low%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E20U%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20userPlanVariables%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EBandwidth_Scale%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EGLOBAL_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20%5C%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20userPlanVariables%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EBandwidth_Low%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F*Value%20Scaled%20to%200-1%20in%20LQ%20Format%20with%20light%20exponential%20weighting%20.5821*(e%5Ex-1)*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20%3CBR%20%2F%3E%20%26nbsp%3BuserPlanVariables%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EJerk_Scale%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQmpy%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQXtoLQY%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ20exp%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQXtoLQY%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eadc1Results%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%5D%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E12%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E20U%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E))%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EGLOBAL_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1.0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%5C%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0.581992%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E))%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20background%3A%20white%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20background%3A%20white%3B%22%3EYou%20cannot%20just%20set%20the%20target%20speed%20like%20this%20using%20and%20integer%20value%20for%20RPM.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20background%3A%20white%3B%22%3Euser.command.targetSpeed%20%3D%20100%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EThe%20KMS%20code%20uses%20QMath%20in%20the%20calculations.%20Conversion%20of%20a%20float%20or%20integer%20to%20a%20LQ%20type%20is%20easy%20to%20do%20using%20the%20API%20calls.%26nbsp%3BCheck%20out%20Chapter%2024%20Math%20for%20the%20details%26nbsp%3Bon%20the%20QMath%20library.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20background%3A%20white%3B%22%3EIn%20KMS%20all%20values%20are%20normalized%20fixed-point.%26nbsp%3B%20So%20setting%26nbsp%3Buser.command.targetSpeed%20to%20100%20sets%20the%20target%20speed%20to%20a%20very%20small%20value%20(%26lt%3B%26lt%3B%201RPM).%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20background%3A%20white%3B%22%3EYou%20need%20to%20convert%20from%20RPM%20into%20the%20normalized%20fixed%20point%20used%20by%20KMS.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20background%3A%20white%3B%22%3Euser.command.targetSpeed%20%3D%20_LQ(100.0%20%2F%26nbsp%3BFULL_SCALE_SPEED_RPM)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20background%3A%20white%3B%22%3EIn%20the%20above%20line%2C%26nbsp%3BFULL_SCALE_SPEED_RPM%26nbsp%3Brepresents%20the%20maximum%20possible%20speed%20in%20the%20system.%26nbsp%3B%20Dividing%20the%20input%20speed%20of%20100.0%20by%20this%20value%20will%20convert%20your%20input%20into%20a%20normalized%20value.%26nbsp%3B%20Since%20KMS%20is%20also%20fixed%20point%2C%20we%20need%20to%20convert%20this%20normalized%20floating-point%20number%20to%20fixed%20point.%26nbsp%3B%20The%20macro%20_LQ%20will%20convert%20from%20floating%20point%20into%20fixed%20point%20at%20the%20default%20Qness.%26nbsp%3B%20The%20variable%26nbsp%3Buser.command.targetSpeed%20is%20defined%20as%20an%20_lq%20variable.%26nbsp%3B%20This%20means%20it%20is%20a%2032-bit%20container%20with%20a%20Qness%20of%2024%20(24%20bits%20after%20the%20decimal%20point).%26nbsp%3B%20By%20default%20all%20_lq%20variables%20default%20to%20Q24%20unless%20otherwise%20noted%20in%20the%20variable%20name.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%20background%3A%20white%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%2351626f%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3ECommanding%20Speed%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EIn%20the%20KMS_API%20RM%2C%20the%20user%20block%20is%20defined.%20The%20user.state%20definitions%20are%20in%20the%20user.h%20file.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3EIf%20you%20want%20to%20idle%20the%20motor%20you%20would%20write%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Euser.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230000c0%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Estate%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20color%3A%20%230000c0%3B%20font-size%3A%2012.0pt%3B%22%3E%3CEM%3EUSER_IDLE%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3ETo%20set%20the%20user%20state%20to%20run%20speed%20you%20would%20write%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Euser.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230000c0%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Estate%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20color%3A%20%230000c0%3B%20font-size%3A%2012.0pt%3B%22%3E%3CEM%3EUSER_RUN_SPEED%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EHere%20is%20a%20list%20of%20all%20the%20USER_States%20for%20speed%20control.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20%23F5F2F0%3B%20margin%3A%206.0pt%200in%206.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%3CBR%20%2F%3E%20%26nbsp%3B*%20%40enum%20USER_state_e%3CBR%20%2F%3E%20%26nbsp%3B*%20%40brief%20USER%20state-machine%20states%3CBR%20%2F%3E%20%26nbsp%3B*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Etypedef%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Eenum%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_IDLE%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%200%3A%20USER%20IDLE%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_FAULT%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%201%3A%20USER%20FAULT%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_SCM%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E2%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%202%3A%20USER%20self-commissioning%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_INERTIA%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E3%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%203%3A%20USER%20inertia%20estimation%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_RUN_DUTY%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%204%3A%20DSM%20run%20PWM%20duty%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_RUN_VOLTAGE%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E5%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%205%3A%20DSM%20run%20voltage%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_RUN_CURRENT%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E6%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%206%3A%20USER%20run%20current%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_RUN_SPEED%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E7%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%207%3A%20USER%20run%20speed%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_RUN_PLAN%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E8%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%208%3A%20USER%20run%20a%20motion%20plan%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BUSER_BRAKE%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E9%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%209%3A%20USER%20braking%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20USER_state_e%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3EIf%20you%20use%20the%20feedback_3ph.c%20as%20an%20example%26nbsp%3Bpiece%20of%20code%2C%20the%20raw%20ADC%20reading%20is%20converted%20to%20a%20_sq%20with%20the%20use%20of%20the%20function%20(_sq)%3A%26nbsp%3BtempSQ%20%3D%20(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23005032%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E_sq%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E)(adcResults-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230000c0%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3EphaseBCurrent%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E-%20v-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230000c0%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Ecalib%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230000c0%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3EoffsetIb%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3ELikewise%2C%20the%20conversion%20of%20the%20RAW%20ADC%20result%20to%20LQ%26nbsp%3Bis%20accomplished%20using%20the%20(_lq)%20function.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3EIn%20the%20following%20code%26nbsp%3Bexample%20an%20ADC%20input%20is%20used%20to%20control%20the%20speed.%26nbsp%3BThe%20code%20below%2C%20takes%20the%20ADC%20results%20and%20converts%20it%20to%20an%20_lq%20type%20by%20means%20of%20the%20following%20statement%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Eadc0Results%5B0%5D%20%3D%20(_lq)%20adc0RawResults%5B0%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20%23F5F2F0%3B%20margin%3A%206.0pt%200in%206.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20slategray%3B%22%3E%2F*%20code%20start%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20declare%20these%20as%20global%20variables%20in%20main.c%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20_lq%20adcSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20_lq%20adcSpeedAccum%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20_lq%20adcSpeedAvg%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20uint16_t%20speedUpdateCounter%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20this%20code%20takes%20the%20ADC%20reading%2C%20downshifts%20it%20by%204%20to%20remove%20noise%20and%20uses%20that%20as%20a%20percentage%20of%20the%20maximum%20applicaton%20speed%20(in%20this%20case%2020krpm)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20adcSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23d74444%3B%22%3E_LQmpyLQX%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E((%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3Eadc0Results%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%5D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%26gt%3B%26gt%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E)%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E8%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E20000.0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3EFULL_SCALE_SPEED_RPM%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E)%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E24%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20adcSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23d74444%3B%22%3E_LQsat%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3EadcSpeed%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E1.0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E)%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0.0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E))%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20this%20code%20averages%20the%20adc%20reading%20over%20125%20samples%20before%20setting%20it%20to%20user.command.targetSpeed%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20it%20will%20also%20handle%20setting%20the%20control%20mode%20if%20the%20commanded%20speed%20is%20larger%20than%200%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230077aa%3B%22%3Eif%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3EadcSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%26gt%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0.0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E))%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20user%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3Estate%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%20USER_RUN_SPEED%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230077aa%3B%22%3Eif%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3EspeedUpdateCounter%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%26gt%3B%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E125%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20speedUpdateCounter%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20adcSpeedAvg%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3EadcSpeedAccum%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E125%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0x00FF0000%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20user%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3EtargetSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%20adcSpeedAvg%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20adcSpeedAccum%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230077aa%3B%22%3Eelse%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20adcSpeedAccum%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%20adcSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%20adcSpeedAccum%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3BspeedUpdateCounter%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%2B%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230077aa%3B%22%3Eelse%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20user%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3Estate%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%20USER_IDLE%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20adcSpeedAccum%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20adcSpeedAvg%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3BspeedUpdateCounter%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3ESetting%20command%20Values%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EBefore%20you%20change%20a%20user.state%20there%20are%20parameters%20like%20acceleration%20and%20jerk%20you%20can%20modify.%20Prior%20to%20change%20the%20state%20you%20can%20update%20any%20number%20of%20other%20command%20values%20list%20in%20the%20function%20below.%20The%20list%20gives%20a%20quick%20look%20at%20the%20parameters%20you%20can%20update%20prior%20to%20changing%20the%20motor%20state.%20Each%20of%20the%20command%20values%20listed%20can%20be%20updated%20prior%20to%20this%20call.%20As%20you%20can%20see%2C%20setting%20the%20speed%20value%20in%20the%20line%20containing%20command.targetSpeed%20is%20just%20one%20of%20five%20values%20sent%20to%20the%20drive%20command.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EAfter%20setting%20these%20parameters%2C%20you%20command%20a%20state%20change%20to%20USER_RUN_SPEED%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Euser.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230000c0%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Estate%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20color%3A%20%230000c0%3B%20font-size%3A%2012.0pt%3B%22%3E%3CEM%3EUSER_RUN_SPEED%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EThe%20user%20state%20%E2%80%9CUSER_RUN_SPEED%E2%80%9D%20executes%20this%20function%20which%20start%20the%20motor%20on%20the%20new%20trajectory.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20%23F5F2F0%3B%20margin%3A%206.0pt%200in%206.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%3CBR%20%2F%3E%20%26nbsp%3B*%20%3Ca%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233122%22%3E%40FN%3C%2Fa%3E%20USER_runSpeedState(USER_t%20*pUSER%2C%20SPEED_t%20*speed%2C%20DRV_control_e%20controlType%2C%20%5C%3CBR%20%2F%3E%20%26nbsp%3B*%20TRF_rVector16_t%20startupStatorRefCurrent%2C%20_sq%20fwIdRef)%3CBR%20%2F%3E%20%26nbsp%3B*%20%40brief%20Runs%20the%20Speed%20Control%20USER%20state%3CBR%20%2F%3E%20%26nbsp%3B*%20%3Ca%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F197964%22%3E%40Param%3C%2Fa%3E%20pUSER%20-%20pointer%20to%20the%20USER%20block%3CBR%20%2F%3E%20%26nbsp%3B*%20%40return%20none%3CBR%20%2F%3E%20%26nbsp%3B*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUSER_runSpeedState%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EUSER_t%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E*%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F*%20For%20trajectory%2C%20just%20send%20command%20values%20to%20DRV*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EtargetSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EtargetSpeed%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3ElimitAcc%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3ElimitAcc%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Elq20LimitJerk%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Elq20LimitJerk%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EIqRefMax%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EIqRefMax%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EIqRefMin%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EIqRefMin%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F*%20Run%20trajectory%20generator%20in%20this%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3ErunTrajectory%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20true%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Ereturn%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F*%20end%20of%20USER_runSpeedState()%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20green%3B%20font-size%3A%2016.5pt%3B%22%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3ECommanding%26nbsp%3BTorque%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EIf%20you%20wanted%20to%20command%20torque%20(current)%2C%20then%20you%20would%20initialize%20the%20command%20values%20identified%20in%20the%20code%20below.%20In%20addition%20to%20command%20.statorRefCurrent%2C%20you%20can%20specify%20a%20command.targetSpeed.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20%23F5F2F0%3B%20margin%3A%206.0pt%200in%206.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20slategray%3B%22%3E%2F**%3CBR%20%2F%3E%20%26nbsp%3B*%20%3Ca%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233122%22%3E%40FN%3C%2Fa%3E%20USER_runCurrentState(USER_t%20*pUSER)%3CBR%20%2F%3E%20%26nbsp%3B*%20%40brief%20Runs%20the%20Current%20control%20USER%20state%3CBR%20%2F%3E%20%26nbsp%3B*%20%3Ca%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F197964%22%3E%40Param%3C%2Fa%3E%20pUSER%20-%20pointer%20to%20the%20USER%20block%3CBR%20%2F%3E%20%26nbsp%3B*%20%40return%20none%3CBR%20%2F%3E%20%26nbsp%3B*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%230077aa%3B%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%230077aa%3B%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23d74444%3B%22%3EUSER_runCurrentState%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EUSER_t%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E*%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EtargetSpeed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EtargetSpeed%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3ElimitAcc%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3ElimitAcc%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Elq20LimitJerk%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Elq20LimitJerk%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EstatorRefCurrent%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EstatorRefCurrent%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EenableDCInjection%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3EenableDCInjection%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%230077aa%3B%22%3Ereturn%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20slategray%3B%22%3E%2F*%20end%20of%20USER_runCurrentState()%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3ECommanding%20Position%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EWhen%20using%20KMS%20to%20control%20a%20position%2C%20the%20call%20to%20the%20following%20function%20is%20made.%26nbsp%3B%20The%20motor%20position%20control%20follows%20a%20trajectory%20that%20you%20choose%20prior%20to%20the%20call%20by%20setting%20the%20command%20values%20to%20the%20motor%20drive%20state%20machine.%20In%20the%20position%20control%20reference%20project%20include%20file%20%22user.h%22%20there%20are%20two%20more%20USER%20state-machine%20states%20added%20to%20the%20list%20of%20USER_STATES%20-%26gt%3B%20USER_RUN_POSITION%20and%20USER_ALIGN.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20%23F5F2F0%3B%20margin%3A%206.0pt%200in%206.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%3CBR%20%2F%3E%20%26nbsp%3B*%20%40enum%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_state_e%3CBR%20%2F%3E%20%26nbsp%3B*%20%40brief%26nbsp%3B%26nbsp%3B%20USER%20state-machine%20states%3CBR%20%2F%3E%20%26nbsp%3B*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Etypedef%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Eenum%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_IDLE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%200%3A%20USER%20IDLE%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_FAULT%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%201%3A%20USER%20FAULT%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_SCM%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E2%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%202%3A%20USER%20self-commissioning%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_INERTIA%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E3%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%203%3A%20USER%20inertia%20estimation%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_RUN_DUTY%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%204%3A%20DSM%20run%20PWM%20duty%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_RUN_VOLTAGE%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E5%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%205%3A%20DSM%20run%20voltage%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_RUN_CURRENT%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E6%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%206%3A%20USER%20run%20current%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_RUN_SPEED%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E7%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%207%3A%20USER%20run%20position-controlled%20speed%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_RUN_PLAN%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E8%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%208%3A%20USER%20run%20a%20motion%20plan%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_BRAKE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E9%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%209%3A%20USER%20braking%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_RUN_POSITION%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E10%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%2010%3A%20USER%20run%20position%20control%20state%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20USER_ALIGN%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E11%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F**%26lt%3B%2011%3A%20USER%20force%20motor%20into%20alignment%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20USER_state_e%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%22%3ETo%20command%20a%20position%2C%20set%20the%20command%20values%20and%20then%20set%20the%20state%20to%20USER_RUN_POSITION%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Euser.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%230000c0%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3Estate%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%20color%3A%20%230000c0%3B%20font-size%3A%2012.0pt%3B%22%3E%3CEM%3EUSER_RUN_POSITION%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%20border%3A%20none%20windowtext%201.0pt%3B%20padding%3A%200in%3B%22%3EThis%20will%20result%20in%20a%20trajectory%20to%20be%20executed.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20%23F5F2F0%3B%20margin%3A%206.0pt%200in%206.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20slategray%3B%22%3E%2F**%3CBR%20%2F%3E%20%26nbsp%3B*%20%3Ca%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233122%22%3E%40FN%3C%2Fa%3E%20USER%20runSpeedState(USER_t%20*pUSER%2CSPEED_t%20*speed%2CDRV_control_e%20controlType%2C%3CBR%20%2F%3E%20%26nbsp%3B*%20TRF_rVector16_t%20startupStatorRefCurrent%2C%20_sq%20fwIdRef)%3CBR%20%2F%3E%20%26nbsp%3B*%20%40brief%20Runs%20the%20Speed%20Control%20USER%20state%3CBR%20%2F%3E%20%26nbsp%3B*%20%3Ca%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F197964%22%3E%40Param%3C%2Fa%3E%20pUSER%20-%20pointer%20to%20the%20USER%20block%3CBR%20%2F%3E%20%26nbsp%3B*%20%40return%20none%3CBR%20%2F%3E%20%26nbsp%3B*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%230077aa%3B%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%230077aa%3B%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23d74444%3B%22%3EUSER_runPositionState%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EUSER_t%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E*%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20slategray%3B%22%3E%2F*%20For%20trajectory%2C%20just%20send%20command%20values%20to%20DRV*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ErunTrajectory%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ErunTrajectory%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EposStepInt_mrev%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EposStepInt_mrev%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EposStepFrac_mrev%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EposStepFrac_mrev%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ElimitVel%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ElimitVel%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ElimitAcc%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ElimitAcc%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ElimitDec%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3ElimitDec%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Elq20LimitJerk%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Elq20LimitJerk%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EIqRefMax%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EIqRefMax%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EIqRefMin%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20pUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EIqRefMin%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20slategray%3B%22%3E%2F*%20Run%20trajectory%20generator%20in%20position%20mode%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BpUSER%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3Eoutput%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EdrvCommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3EvelocityMode%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%20false%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%230077aa%3B%22%3Ereturn%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20slategray%3B%22%3E%2F*%20end%20of%20USER_runSpeedState()%20*%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20color%3A%20%233d3d3d%3B%22%3EBelow%20is%20a%20bare%20metal%20code%20example%20used%20to%20drive%20the%20X%20or%20Y%20axis%20of%20a%20position%20controller.%26nbsp%3B%20The%20UART%20receives%20the%20command%20and%20a%20sync%20pulse%20on%20a%20GPIO%20starts%20the%20trajectory%20profile.%20This%20is%20not%20very%20robust%20code%20with%20very%20little%20command%20format%20checking.%26nbsp%3B%20I%20encourage%20you%20to%20consider%20the%20limit%20conditions%20and%20correctness%20of%20the%20input%20command%20values%20before%20using%20them%20to%20command%20the%20motor%20position.%26nbsp%3B%20This%20code%20tends%20to%20occasionally%20miss-fire%20and%20send%20the%203D%20printer%20base%20flying%20to%20the%20end%20stop.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22background%3A%20%23F5F2F0%3B%20margin%3A%206.0pt%200in%206.0pt%200in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Euser%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Estate%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20USER_RUN_POSITION%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Ewhile%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Etrue%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20LED2%20GREEN%20is%20DC%20BUS%20Charging%20Indicator%2C%20disable%20if%20fault%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EDRV_getDcbBusVoltage%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E()%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EDRV_getDcbBusUnderVoltageThreshold%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E()%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%7C%7C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EDRV_getIsFaultActive%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E())%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20LED2_OFF%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Eelse%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20LED2_ON%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20Expected%20format%3A%20xAAAAAAAABBBBBBBBX%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20Wait%20for%20initial%20'x'%20or%20'y'%2C%20remember%20to%20set%20this%20in%20axis%20variable%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20GPIOC_PSOR%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E3%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2Fset%20buffer%20ready%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Edo%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecin%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART1_CharIn%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E()%3B%7D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Ewhile%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecin%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E!%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eaxis%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20Read%20AAAAAAAA%20(dx%20as%20a%20float)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20mem%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ebyte%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E*%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Efor%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ei%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ei%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ei%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%2B%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E*%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Emem%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART1_ByteIn%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E()%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20mem%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%2B%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20Read%20BBBBBBBB%20(dy%20as%20a%20float)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20mem%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ebyte%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E*%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef2%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Efor%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ei%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ei%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ei%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%2B%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E*%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Emem%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART1_ByteIn%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E()%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20mem%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%2B%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20Wait%20for%20final%20'X'%20or%20'Y'%3A%20if%20not%20an%20'X'%20or%20'Y'%2C%20ignore%20message%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20cin%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART1_CharIn%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E()%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecin%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eaxis%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E-32%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BGPIOC_PCOR%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E3%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART_CharOut%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Eaxis%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20Valid%20Message%2C%20go%20ahead%20and%20execute%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20ROTATION%3A%20extract%20integer%20part%20of%20rotation%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3Bvalue%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Eint%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3Buser%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EposStepInt_mrev%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Evalue%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2FUART_TextOut(%22IntRotation%3D%22)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART_DbleOut%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Evalue%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20ROTATION%3A%20extract%20fractional%20part%20of%20rotation%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3Buser%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EposStepFrac_mrev%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Evalue%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2FUART_TextOut(%22FracRotation%3D%22)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART_DbleOut%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E-%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Evalue%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20SPEED%3A%20extract%20integer%20part%20of%20rotation%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3Bf2%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef2%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4000.0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3Buser%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3ElimitVel%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3E_LQ%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef2%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2FUART_TextOut(%22SpeedRPM%3D%22)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART_DbleOut%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ef2%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E4%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BGPIOC_PSOR%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E6%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2F%20Wait%20for%20Sync%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Ewhile%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(((%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3EGPIOE_PDIR%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E6%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E))%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E))%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BGPIOC_PCOR%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E6%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3Bflag%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E0%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20done%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%20user%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Ecommand%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3ErunTrajectory%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%230077aa%3B%22%3Ewhile%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3Edone%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23d74444%3B%22%3EUART_CharOut%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23669900%3B%22%3E'1'%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3BGPIOC_PSOR%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E1%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23a67f59%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23990000%3B%22%3E6%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E)%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%3CBR%20%2F%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%23999999%3B%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20slategray%3B%22%3E%2F%2Fwhile%20(true)%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20black%3B%22%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%2300b050%3B%20font-size%3A%2014.0pt%3B%22%3E%3CSTRONG%3EConclusion%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EFour%20steps%20are%20needed%3A%3C%2FSPAN%3E%3C%2FP%3E%3COL%3E%3CLI%3ECheck%20the%20existing%20state%20of%20the%20motor%2C%20managing%20faults%20and%20trajectories.%3C%2FLI%3E%3CLI%3EConvert%20the%20commanded%20inputs%20to%20the%20fixed-point%20values%20needed%20by%20KMS.%3C%2FLI%3E%3CLI%3ESet%20the%20configuration%20parameters%2C%20like%20acceleration%2C%20jerk%20and%20speed.%3C%2FLI%3E%3CLI%3EChange%20the%20user%20state%20to%20the%20desired%20state%2C%20Speed%2C%20Torque%2C%20Position.%3C%2FLI%3E%3C%2FOL%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3EPhilip%20Drake%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2011.5pt%3B%20color%3A%20%233d3d3d%3B%22%3ESystems%20Applications%20Engineer%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1108011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EArchive%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎03-19-2018 02:49 PM
Updated by: