Sign in to follow this  
Followers 0
smichalo

Help With PWM command

5 posts in this topic

Hello I was wondering if someone can help answer a question. I have a CP1L PLC with pulse outputs. I would like to connect to an AMCI stepper motor and controller just to play around with. Before I connect I wanted to program the PLC to send the pulses to the stepper controller using the PWM (891) command and the INI (880) to stop the pulse train. I set up the 891 command like this: ( the command does have the @ in it ) Port Specifier - #0000 Frequency -#1F4 Duty Ratio -#32 I set up the 880 command like this Port Specifier - #0000 Control Data -#3 First PV word- 0 The way I understand it, for the 891, I set up pulse output 0 to run at a frequency of 500Hz with a Duty Ratio of 50% when rung 1 goes true. and 880 will stop the pulse train when rung 2 goes true. What I'm seeing is when I turn on rung 1 Output 1 starts to flash. When I turn on rung 2 nothing happens. Output 1 stays on The ony time the INI (880) works is when I set the port specifier in both commands to #1000 and it is still output 1 that comes on... I thought I had it set up to turn on output 0 and turn off output 0 Can someone help me understand this. Thanks Steve

Share this post


Link to post
Share on other sites
According to the manual, the INI instruction port specifier must be #1000 even if it is specified #0000 in the PWM. However, PWM is not intended for positioning. Use PLS2, SPED, ACC instructions. Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
Thanks for the reply Sergei. I'm not looking to do any positioning. I just want to send the pulse train to the stepper controller and get the motor to turn. I was just using the help file that comes with CX programmer and the definitions for the PWM instruction come from there. I didn't see that the port specifier must be #1000. I will try to use the instructions you mentioned. ( I'm just experimenting and playing anyway ) Thanks Steve

Share this post


Link to post
Share on other sites
It still may require acceleration/deceleration, so the ACC is the best choice for continuous rotation.

Share this post


Link to post
Share on other sites
Sergei is correct. The stepper motor will lock up unless you use some acceleration.

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
Sign in to follow this  
Followers 0