.

Monitoring Velocity Loop Performance

To observe the performance of a PIV velocity loop, you want to set up Motion Scope to watch the following traces:

 
  •  Commanded Velocity (Ax n TC.Velocity)
  •  Actual Velocity (Ax n Act Vel)
  •  DAC (command) Output (FI n DAC Out)
  •  Velocity Estimate - shaped (smoothed) actual velocity
  •  Velocity Error - error between commanded velocity and velocity estimate

Selecting the Traces

First, add the Ax n TC.Velocity, Ax n Act.Vel, and the FI n DAC Out in Motion Scope Traces tab, where n is the axis number you will be tuning.

Now highlight Ax n TC.Velocity and Ax n Act Vel and click on the "Add" button under the Group highlighted Traces section. This will make both traces scale together.

Type in the name of the new grouped trace and click OK. The new trace should be visible under the "Group highlighted Traces" section.

    

Highlight the FI n DAC Out trace and click on Trace Set for Pane -> Edit. Set AutoScale -> During Aquire and AutoScale->During Display to be unchecked and click OK. This will turn OFF the autoscaling for the DAC. We will be using the DAC later to measure the velocity error.

 

xmp.h

Open up xmp.h (..\mei\xmp\include directory). Search (ctrl-F) for OldY. It resides in the MEIXmpFilterData.PIV structure. Count the enumeration order of OldY. In the picture below, PosErrorSum = 0, VelErrorSum = 1, OldVelocity = 2, OldY = 3.

 

typedef union {
       float   f[MEIXmpFilterDataSize];
       struct {
              /* ErrorSum needs to be in the same position as PIV.PosErrorSum for  
              Reset Integrator function to work */
              float       ErrorSum;
              float       ErrorDelta;
              float       OldError;
              float       OldVelocity;


              /* analysis variables need to be in same position in both PID and PIV 
              structures for system analysis tools to work */
              float       SignalIn;     /* in => signal injected into control loop */
              float       SignalOut1;   /* out => signal extracted from control loop */
              float       SignalOut2;
              float       PIDOutput;
              float       DerivFilter[MEIXmpDFilterSize];

       } PID;

       struct {

              /* PosErrorSum needs to be in the same position as PID.ErrorSum for 
              Reset Integrator function to work */

              float        PosErrorSum;
              float        VelErrorSum;
              float        OldVelocity;
              float        OldY;

              /* analysis variables need to be in same position in both PID and  
PIV structures for system analysis tools to work */ float SignalIn; /* in => signal injected into control loop */ float SignalOut1; /* out => signal extracted from control loop */ float SignalOut2; float PIDOutput; /**/ /* check and see if these are Bills' variables */ float PIVOutput; } PIV; } MEIXmpFilterData;

 

VM3

Open up VM3 (in your ..\mei\xmp\bin\winnt directory). Press F3 to view data.

Press ctrl -Page Down four times to get to the Filter object. The data we want is in the Filter[n].Data.f[m] where n is the number of the axis being tuned and m is the position of OldY in its enumeration found in step 4 (3 in the example above). Note the hex address of this register. In this example, it is 0x28CE8, and it is labeled Filter[0].Data.f[3].

Go back to Motion Scope -> Traces and click Modify Trace -> New.

Choose the type of Trace.

Enter the hex value found above in Address, enter a Name (your choosing), set Data Type to float, and clear both AutoScale check boxes as shown below. Click OK to make these changes take effect. Click OK again to return to the main Motion Scope screen.

At this point you will have the traces necessary to watch the following values in Motion Scope:

Ax n TC.Velocity - commanded velocity

Ax n Act Vel - actual velocity

FI n DAC Out - DAC (command) output

Velocity estimate - shaped (smoothed) actual velocity

Velocity error - error between commanded velocity and velocity estimate (read through DAC out in velocity loop tuning). This is not an additional trace.

Previous | Next


       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering