Program for CJ1G controlling servo motor

4 posts in this topic


I'm trying to set up PLC (CJ1G) to control servo motor. I'm using position control unit CJ1W-NC413, servo relay unit XW2B-40J6-2B and smartstep R7D-AP02H servo drive.

I'm reading through manuals and feels little overwhelmed with information. Everything is probably there, but it's going to take lot of effort to put it together.

Can I found example program somewhere?


When I put jumper to pin 25 (X axis RUN), motor shaft is locked and motor is holding position, so wiring should be correct.

When I try to run a program, I can see that parameters are changing in CX-position, but servo is not moving. Please see attached picture

Servo program.png

Edited by petrb

Share this post

Link to post
Share on other sites

I'm not sure about the terminal block you're using though. It is never listed for R7D-AP model AFAIK.

Seeing the example that you've followed, you're doing an Absolute Movement. Did you execute a Homing operation before that? Because you can only do Absolute Movement if servo's home / zero position is defined. There is another separate section in the manual containing example about Homing.

I'd suggest you to try the Relative Movement first (Change the 2000.03 bit to the Relative Movement one). You don't need Homing for Relative movement, just be careful since the calculation is different (Absolute = target position, Relative = increment position). If the servo managed to move using Relative movement, then you can be sure that wiring is correct. So you can continue to check about the Homing operation before trying Absolute Movement.

Share this post

Link to post
Share on other sites

Thanks guys.
Program I posted before is from mentioned manual 10-3-2 Inching.

I also tried Relative Movement with no luck.

Can I use any FB from Omron library?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now