Jump to content
OMRON Forums

how to use position compare


twathit
 Share

Recommended Posts

I’m using 24E2S to output PFM signal to control stepper motor, and I don’t use encoder, so I set Gate1[6].Chan[j].EncCtrl to 8. I know I need to “bracket” my starting position. So I setup Gate1[6].Chan[0].CompA=400,Gate1[6].Chan[0].CompB=-400,Gate1[6].Chan[0].CompAdd=1600, and it work fine. I can see the Gate1[6].Chan[0].Equ toggled. Now I want the starting position isn’t 0, so I think I should change the element in the motion program, here is a simple program,

open prog 2 // Open buffer for entry

linear; // Linear interpolation move mode

abs; // Absolute move mode

ta500; // 1/2-second accel/decel time

ts0; // No S-curve accel/decel time

f100; // Speed of 500 axis units per time unit

X10000; // Move X-axis to position of 10 units

if(Gate1[6].Chan[0].PhaseCapt==1000){

Gate1[6].Chan[0].CompA=800;

Gate1[6].Chan[0].CompB=1200;

Gate1[6].Chan[0].CompAdd=800;

}

dwell2000; // Sit here for 1/2-second

X0; // Move X-axis to position of 0 units

dwell2000; // Sit here for 1/2-second

close

 

but the three element doesn’t change, if I use them right?

 

Thanks

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...