Jump to content
OMRON Forums

Tracking a Moving Object


dholden
 Share

Recommended Posts

I have had good success with "Tracking a Moving Object" in the Turbo PMAC and I wanted to know if this document was for the Power PMAC. If not where I would find the Power PMAC version of the example.

 

I notice there are no PMATCH commands as you change following modes. in the Turbo PMAC you typically needed something like this:

 

KinematicsMode=FollowingBelt

DWELL 10

cmd"PMATCH"

DWELL 10

 

Is PMATCH not needed in the PowerPMAC for this application?

 

Even when i do find a few sparse examples of PMATCH in the Users Manual it is not preceded and followed by DWELL commands in the motion program, is this correct?

 

Thanks

Tracking a Moving Object.pdf

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

PMATCH is needed in Power PMAC as well.

the logic of PMATCH is the same between Turbo and Power PMAC.

We don't have a bit in Power PMAC to turn on and off kinematics.

it's only controlled by motor axis defintion i.e. like #1->I

Link to comment
Share on other sites

With forward an inverse kinematics setup using only X-Axis for simplicity I should see C6 and L1 update when watching online right? they both stay at Zero and i am getting the classic Kinematics 'jump' when moving from 'Line Following Mode' to 'Normal Mode'

 

suggestions?

 

Below is my setup

Motor 1 is my X-Axis

Motor 3 is my belt tracking encoder (line encoder)

 

 

// Global Definitions

global KinematicsMode;

global NormalMode = 1,LineFollowingMode = 2;

global EncoderPosCaptured, TrackingOffset;

 

#define KinPosMotor1 L1 // Motor Position in Counts

#define KinPosAxisX C6 // Coordinate System Position in Inches

#define KinAxisUsed D0 // See table below for examples or page 472 of the Users Manual

 

// Coordinate system definition

&1 // Select C.S. #1

#1 -> I // Use Kinematics for Motor 1

Coord[1].SegMoveTime = 2 // 2 mSec segmentation period (required to be > 0 for kinematics)

 

// Forward kinematics

&1 // Address Coordinate System 1

open forward // Open Forward Kinematics Buffer

KinAxisUsed = $40 // Specify X axis used in inverse kinematics

if(Coord[1].HomeComplete){ // Have all axes in this coordinate system Completed Home?

KinPosAxisX = KinPosMotor1 / 20320; // X-Axis Tool Tip Position Calculation

}

else { // Not valid; halt operation

KinPosAxisX = sqrt(-1); // Return "not-a-number“ for X axis

}

close // Close Forward kinematics buffer

 

 

 

// Inverse kinematics

&1 // Address coordinate system 1

open inverse // Open buffer, clear contents

if(KinematicsMode == NormalMode){ //Check if we are in 'Normal Mode'

KinPosAxisX = KinPosAxisX; // Inverse kinematic equations for NO Tracking

}

if(KinematicsMode == LineFollowingMode){ //Check if we are in 'Line Following Mode' and Apply the Tracking Offset

//Get the Current Line Encoder Position, Subtract from the Captured Position, and Convert to Inches

TrackingOffset = (Motor[3].ActPos - EncoderPosCaptured) / 53333;

KinPosAxisX = KinPosAxisX + TrackingOffset; // Apply TrackingOffset to the X-Axis of the Coordinate System

}

KinPosMotor1 = KinPosAxisX * 20320; // Scale Position to Counts

close

Link to comment
Share on other sites

Below is the motion program for the above kinematics.

When we want to enable tracking we simply set EnableHwJogBit and run the program (&1b3r)

The line encoder runs slowly but constantly

 

Since I see no change in L1 or C6 I assume PMATCH is actually doing nothing, causing the jumps. If I should see change in L1 and C6 what should I look to change? If I should not see change in L1 and C6 what should I be looking for from here?

 

Thanks

 

 

//Motion Program

open prog 3

 

Linear

Abs

F 1 // Set Feed Rate to 1inch/sec

Ta 0.250 // Set accel time to 0.250 sec

 

X 2.0 // Move to position 1

DWELL 0

 

EncoderPosCaptured = Motor[3].ActPos // Get Current Line Encoder Position

KinematicsMode = LineFollowingMode // Enable Part Belt Tracking Mode

DWELL 10 cmd"&1PMATCH" DWELL 10 // Do ths every time you change kinematics modes

 

while(EnableHwJogBit == 1){ // Track with Line Encoder

X 2.0

// ******SMALL JUMP HERE******************************************************************

}

KinematicsMode = NormalMode // Disable Line Encoder Tracking Mode

DWELL 10 cmd"&1PMATCH" DWELL 10 // Do ths every time you change kinematics modes

// ******LARGE JUMP HERE******************************************************************

X 0 // Move back to home

DWELL 0

close

Link to comment
Share on other sites

I may have answered my own question, it looks like my error was correctly setting up Lookahead, which limits the max speed and acceleration of a move. Basically this controls how aggressively you 'jump' to the PMATCH position after changing following modes.

 

If anyone feels there is something more I am missing on this please let me know.

 

Thanks

Link to comment
Share on other sites

  • 1 year later...
Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...