MWSR

STUCK WITH PLS2 COMMAND

5 posts in this topic

Hi,

PLC CPC : CP1EN40DT1 

APPLICATION : Control precise movement of a belt pully arrangement using a Step Servo motor. 

I have used OMRON PLCs before but this is the first time i am trying to control a Step Servo using pulsing method. The task is simple. I need to give exactly 2800 pulses to a Step Servo Motor (EX D rated) so that it rotates exactly 2 revolutions. After that it has to stop. By completing two revolutions, the connected Belt Pulley would have moved the carriage by exactly 48mm which is what i am trying to control (Position control). So i used PLS2 command and set the number of pulses and programmed the D words and nothing happened. No LED going ON in the output. Honestly, I have not fully checked any other memory bits not did the ORG command. 

I checked wiring using the P_02s command and the stepper rotates perfectly so wiring is all correct. The HSP output is set at 100.0. 

Any help is appreciated. 

 

PS Just noted that i sent the wrong prog. Kindly ignore

Pulsing Testing.cxp

Edited by MWSR

Share this post


Link to post
Share on other sites

Try using the P_ER contact directly after the PLS2 instruction. Below are the possibilities.

ON if the specified range for P, M, S, or F is exceeded.

ON if PLS2(887) is executed for a port that is already outputting pulses for SPED(885) or ORG(889).

ON if PLS2(887) is executed in an interrupt task when an instruction controlling pulse output is being executed in a cyclic task.

ON if PLS2(887) is executed for an absolute pulse output but the origin has not been established.

I wasn't able to download your program. Do you plan to repost it?

Share this post


Link to post
Share on other sites

Thank you for your reply. 

The program is attached. Although not exactly the same as what the application requires, i have programmed the following.

1. Start Ramp : 10Hz/4ms 

2. Stop Ramp : 20Hz/4ms

3. Target Freq : 200Hz

4. No of pulses : 10000

This would imply a starting acceleration ramp time of 80ms and a stopping ramp time of 40ms. 

So this implies :

D100 : #000A,

D101 : #0014 

D102 : #00C8,

D103 :#0000

D104 : #2710

D105 : #0000

D110 : #0000

D111: #0000

I programmed the P_ER contact and while simulating, it does not close which i am assuming is OK. At the time of writing this message i have not yet downloaded the program and checked its working. The program file is attached. 

I have a feeling that i may have jumbled the lower and upper words. 

 

 

Pulsing Testing.cxp

Pulsing Testing.opt

Edited by MWSR

Share this post


Link to post
Share on other sites
6 hours ago, MWSR said:

<Clip> At the time of writing this message i have not yet downloaded the program and checked its working. The program file is attached. 

I have a feeling that i may have jumbled the lower and upper words. 

<Clip>

An update : Success. It worked. As suspected i had jumbled on the word allocation and moved two bytes through separate MOVL commands. Now i used a single move command with both lower and upper words in the argument and PLS2 command worked. 

 

Thank you for your support. I will come back in case i need more help.

Quote

 

Edited by MWSR
1 person likes this

Share this post


Link to post
Share on other sites

Glad you got it working and thanks for the update. 

Mixing up upper and lower words is common. I find it useful to create symbols before populating the instructions. 

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