Abdul Wajid

Stepper/Servo Pulse Latching

18 posts in this topic

Hi Folks

Is there any way to hold the outputting pulses & continue to complete the remaining pulses on next trigging of PULS instruction. Suppose if I have to output 2000 pulses to complete the target and accidently pulse output get interrupt on 1500 pulse, so on next trigger the motor should complete remaining 500 pulses to achieve the target. And again the motor should continue for 2000 pulses. Servo/Stepper shouldn't miss the target in any way for every rotation if any interrupt occurs in the mid of the operation. I am using CJ1M-CPU21 and CP1E-NA models PLC.

 

Thanks

Edited by Abdul Wajid

Share this post


Link to post
Share on other sites

Hi Abdul,

Please look at the SPED instruction in the operation manual.
This will allow you to stop and then continue.

Regards,
Garry

Share this post


Link to post
Share on other sites

Hi... I tried with SPED instruction but it seems like this instruction can only control the motor speed & control mode(continuous & independent) but i can't able to control the pulse through SPED instruction for any interruption. Pulse will start from 0 for next trigger & probably would miss the proper target if there doesn't occur any signal apart from given pulses.

I want to know whether it's possible with ORG instruction for origin search & return to achieve the target for any interruption. If anyone can send the sample program for proper use of ORG then it would be good help for me.

 

Thanks

Edited by Abdul Wajid

Share this post


Link to post
Share on other sites

Issue the PULS command using an absolute command to the position that you desire.  Use the INI instruction to cancel the movement when you want to interrupt it.  Then issue the PULS command using an absolute command to the same position.  

1 person likes this

Share this post


Link to post
Share on other sites

Hi.. Michael.... I tried setting PULS command for absolute with 1 added to pulse type, but it doesn't work for positioning instead works only for continuous mode for stepper motor.

Whether is there required any further setting in the PLC setting for absolute positioning along with PULS & SPED command? Or we have to set any origin search/return instruction for it ?

Thanks

Edited by Abdul Wajid

Share this post


Link to post
Share on other sites

Origin must be established before using an absolute positioning instruction. There is a flag to indicate.

Share this post


Link to post
Share on other sites

The PULS instruction is definitely for positioning.  I am not sure what is setup wrong if it is not working. If you post your code, perhaps we can look at it. Thanks.

Share this post


Link to post
Share on other sites

Hi... PULS is working normally in relative mode but not in absolute mode as a positioning after trigger INI to stop the relative mode

Kindly check the program & PLC Setting for origin. May be i missed some critical points or i am not aware of it. Also sometimes error indication appears in PLC after program download.

Thanks

Absolute test.cxp

Absolute test.cxp

Share this post


Link to post
Share on other sites

That looks good. I assume that you execute the ORG command prior to trying your moves?  Make sure the No-Origin Flag (A280.05) is OFF prior to trying your absolute moves. I assume there is valid data in D110 and D107.  

Share this post


Link to post
Share on other sites

Yes.... I execute the ORG command initially but it can't able to activate At Origin Flag (A280.04) & entered the same data for absolute in D110 & D107 as entered in relative mode for PULS & SPED (D100 & D105)

 Is there any PLC setting Or any other instruction setting to define the Origin point?

When I activates external inputs A540.08 & A540.09 (not mentioned in above attached prog) then motor would  rotate CW & CCW in continuous mode with ORG instruction and shows the status for pulse for Origin in A280.07, but unable to activate A280.04 Origin flag.

 

Thanks

Edited by Abdul Wajid

Share this post


Link to post
Share on other sites

it's been long time since i used it and don't have access to Omron software but you need to choose correct options. for example in one mode axis may move with slow speed in one direction and if along that search encounters sensor it can set the flag at the place where sensor is detected. but if you are already on the wrong side of the origin sensor, you will keep moving away without finding the origin. another type of homing could be to do one way first then reverse so that sensor is always found etc.

Share this post


Link to post
Share on other sites

What about A280.05?  It should be ON when you power the PLC on and then it should turn OFF after you issue the ORG command. 

A280.04  - At Origin means you are actually right at the origin position.  It being OFF does not mean that an origin has not been established. 

Share this post


Link to post
Share on other sites

A280.05 not getting OFF even after the issue of ORG command. Can't able to run PULS in absolute mode & not able to enter the any negative value in the register to establish the origin. It would be better if i get a sample program for linking the ORG command with absolute PULS.

Thanks

Share this post


Link to post
Share on other sites

If A280.05 is not going off, then your origin process is not finishing properly.  That is where your issue is.  It is hard to tell what might be happening. Use the code below to set the origin.  It will set the origin where the servo is to the position contained in D50 (as a DINT):

ZeroPos.jpg.fb59bd239d04a5d5ec37a5ca2504

After you execute the INI instruction above, A280.05 should be off.

Be careful not to issue a movement that will damage the mechanicals of your system.

 

Share this post


Link to post
Share on other sites

1. What is your PLC CPU type?
    Do you intend to search origin or set it by the program?
   The ORG instruction is not supported in E-type CPU.
   If supported in yours, something may be wrong with the origin search method or sensors
   (do you have the home and home proximity sensors connected?).

2. A276 is 32-bit value, so use LMOV instruction.

3. You are using odd register numbers for 32-bit frequency value in the SPED instructions.
   This is not forbidden, but it is a good practice to use even registers for 32-bit.

4. You may want to use PLS2 instruction, as it also features acceleration and deceleration,
   while the SPED changes the frequency instantaneously.

Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
23 minutes ago, Sergei Troizky said:

2. A276 is 32-bit value, so use LMOV instruction.

Good suggestions, one correction:  MOVL is the instruction.

Share this post


Link to post
Share on other sites
45 minutes ago, Sergei Troizky said:

1. What is your PLC CPU type?
    Do you intend to search origin or set it by the program?
   The ORG instruction is not supported in E-type CPU.
   If supported in yours, something may be wrong with the origin search method or sensors
   (do you have the home and home proximity sensors connected?).

I am using CP1E-NA model, but i can execute the ORG instruction along with aux A540.08 for CW limit & A540.09 for CCW limit without connecting the actual sensors, but it works continuously and also rotates reverse CW/CCW (based on origin search direction in PLC settings) till i deactivates the limit aux bits above for& stops after deactivating another bit.

If the ORG with absolute position really doesn't works with this model then i can check with CJ1M-CPU21 model.

58 minutes ago, Sergei Troizky said:

2. A276 is 32-bit value, so use LMOV instruction.

Yes it's correct but this isn't the issue because i am giving the speed & position pulses within the limit of 16 bit register..

1 hour ago, Sergei Troizky said:

4. You may want to use PLS2 instruction, as it also features acceleration and deceleration,
   while the SPED changes the frequency instantaneously.

Also i tried with the PLS2 but it gives the same result for me as PULS/SPED.

 

Thanks

Share this post


Link to post
Share on other sites

2..4 are only suggestions. They were not deemed solutions of your problem.

N-type CPU supports the ORG instruction.

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