Sign in to follow this  
Followers 0
Guest Guest_Wouter

FX1N Positioning

21 posts in this topic

Does anybody have instructions of how to control a DC motor using an FX1N PLC? I want to synchronise the rotational speed of two DC motors with my FX1N, using high speed inputs to read from encoders. The (transistor)outputs of the FX1N can be used as pulse-modulator, and that way, it's even possible to set a startup-ramp. But now is my question: how? Can somebody please help me with this? I've read the manual on http://www.mitsubishi-automation.de/produk...load/132738.pdf but it doesn't say how to program it. Thanks in advance, Wouter

Share this post


Link to post
Share on other sites
Get the FX Programming Manual II from www.meau.com... Manual number is JY992D88101. This has detailed instructions and samples of the high speed inputs (for your encoders) and the pulse output instructions for the motion control.

Share this post


Link to post
Share on other sites
Which drive do you use for the DC motor? What is the top speed in encoder pulses? What is the initial error? How fast the synchronization must be reached? What is the acceptable synchronization error? Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
The output will be used as a pulse-modulator, so I will have to use a FET to drive the motor. It doesn't matter what encoder resolution I will be using, I just want to know how to adjust the rotational speed with my PLC

Share this post


Link to post
Share on other sites
Chris can you give me a specific URL for the Manual II, because I can't find it on www.meau.com, I looked everywhere, also on google..... Thx

Share this post


Link to post
Share on other sites
Click on Downloads Click on Manuals In the box middle of the page labeled Manual Part Number, type JY992D881 Click the search button next to the manual part number box There you go... I'd do a link but their site reindexes and links change.

Share this post


Link to post
Share on other sites
Look in Chapter 5, section 13. You probably want the PLSV command to control velocity of pulses.

Share this post


Link to post
Share on other sites
I've found the manual somewhere else but I'm glad that I know where I should start! Thanks for your help! Now my next question is the following: I've found an easy example in the manual (chapter 5.13 -> PLSV function) to generate a certain output frequency: -----||------[PLSV | K1000 | Y000 | Y004 ] Now is my question: can the "Kxxx" parameter be replaced with a value of a dataregister? For example, if the value of D123 is 5000, then I want my output frequency to be 5000Hz. I also want to be able to increase/decrease the dataregister value using an input (with INC/DEC function). Thanks in advance! Wouter

Share this post


Link to post
Share on other sites
That's exactly what I did on one project using FX1S to drive stepper motor

Share this post


Link to post
Share on other sites
How did you do it? I mean, in stead of "Kxxx", is it possible to fill in, D123 for example? And what software did you use to program your PLC? Because all I have is Medoc (good old DOS version) but it doesn't seem to support the positioning commands. Thanks!

Share this post


Link to post
Share on other sites
If you look in the manual it tells you which parameters can be what data types. It's also in the help file of the software. Yes you can put a data register for the command to get it's speed reference from.

Share this post


Link to post
Share on other sites
What software did you use? Because Medoc doesn't support the PLSV - RAMP - SPD functions... Thx

Share this post


Link to post
Share on other sites
I was using GPP Win (now GX Developer). You can download trial version from www.meau.com

Share this post


Link to post
Share on other sites
I have been testing the PLSV function but it seems that I will be needing another instruction, because I want to control a DC-motor (not a stepper motor) so I need to adjust the pulse length so that I can change my rotational speed. I've read the manual and found that the PWM instruction should do the job, but now is my question: ********************************************************************* If I want to set the rotational speed of the DC motor at 40% of the maximum rpm, how long should the pulse be? Am I right if I say that the pulse should be 4ms and the interval between the pulses 6ms? Will the motor rpm be at 40% of the maximum capacity? ********************************************************************* My second question: The high speed output of my PLC can generate an output frequency of 100kHz, but now is the problem that the maximum load is limited at 100mA. What do I need if I want to control a 2A motor? I've been told that I need a FET for that, but how exactly do I make a circuit for that? Do I also need other components? ********************************************************************* If I want to control my DC motor with a closed loop, so I will read the rotational speed with an incremental encoder and then I want to adjust the RPM to the speed that I want. Now, if my motor speed is higher than the speed that I want, the motor needs to have a negative pulse train to reduce speed. How do I do that? Does anybody have a program example of it? Thanks in advance! Wouter

Share this post


Link to post
Share on other sites
To control DC motor you should try to change duty cycle using PWM (Pulse Width Modulation). Mitsubishi FX PLCs have PWM instruction...

Share this post


Link to post
Share on other sites
I know that, that's what I said in my previous message, but I only want to know how I should change my rpm. If I want to change my rpm for example to 65% of the maximum capacity of the motor, what should be the parameters that I enter along with the PWM instruction?

Share this post


Link to post
Share on other sites
Sorry, I'm notorious for not reading more than every 10-th word (never enough time). You are right about duty cycle that 4ms on and 6ms off would make 40% duty. I would imagine using higher frequency than 100Hz but this seam to be hard to achive because the parameters in PWM instruction have to be in ms range. I didn't use PWM instruction yet but according to JY992D88101 manual it is like this: ---| M0 |-----------[PWM D0 K10 Y0] Y0 must be high speed output (transistor), K10 is period of 10ms and duty of controled by register D0. If D0 is 4 you would get 40% duty cycle. To speed up, just increase value in D0. If too fast, lower the value. Problem with this is resolution of 1ms which in this case would give you only 10 steps. Range of 1-32767ms is ridiculous. Who in the world requires PWM running at 32767ms or 32.7seconds? You don't need PWM instruction or special feature in a PLC to do thing like that. Simple timer or scan time counter would do - even on a relay output. When I see 100kHz in the spec I expect to set the period in microseconds (or faster) so I can have base frequency in kHz range for example AND at least 8-bit resolution. The high speed output specs for FX PLCs look good on paper but in reality this is rather pathetic when you look at the available instruction set. Manual also says that output has to be loaded with at least some 10mA. I was using 2.2k 0.5W resistor in series with optocoupler to drive stepper drive. This resulted in about 10mA current at 24V. To drive 2A DC motor I would simply use transistor (darlinigton if bipolar or a MOSFET) and of course a diode accross load (motor). Don't forget to use diode accross load or something (transistor) might be toast... MOSFETs are cheap and very strong (current of 20-30A is not a problem). To drive MOSFET you need voltage signal (couple volts might turn it on but to saturate it and make it work like switch you normally need something like 10-12V). To drive bipolar transistor you need current (same story, to saturate transistor you need more current from the source or in this case PLC. This is why is good idea to go for Darlington right a way even if PLC can provide 100-200mA. What is the PLC you have? What are the outputs (PNP or NPN)? What is the motor voltage and do you have separate power supply for it? Do you need isolation between PLC and motor circuit ? (it doesn't hurt...)

Share this post


Link to post
Share on other sites
Thanks alot for your reply, Panic Mode! Well at this moment I only have a FX1N-24MR (yes that's relay output) but I'm planning to buy myself a transistor output PLC. Any suggestions about choosing NPN or PNP outputs? The motor that I would like to control is 12VDC / 15Watt and I will use a separate supply for it (or something would be toast ) And an isolation wouldn't hurt, because I'm a professional circuitboard toaster! Do you have a little drawing of how you would connect my motor to the PLC? Big thank you for your help, Panic Mode!

Share this post


Link to post
Share on other sites
Reply to PWM quote: I guess you misunderstood the point. PWM is a nice feature but it's implementation in FX PLCs is very bad if you ask me. With arguments in milisecond range it is hard to make good use of it. Reference to 100kHz is simply false advertisement because there is no instruction to support it. They simply added edge transition times and converted this to frequency. Example1: You need PWM to control something with say 8-bit resolution (only 256 increments). Using PWM instruction and FX maximum frequency you cannot get even 4Hz. Where did the other 99.996 kHz go? Example2: Arguments are 16-bit integers (well, 15-bit to be exact). With this resolution all you can get is 32.767 seconds long period. With 50% duty, output is on for more than 16seconds and then turns off for another 16 seconds. For such slow switching, you don't need PWM... Question for FX PLC designers: What good is PWM instruction if you have to run it at these frequencies? To control heater? How many applications you had in mind? Who came up with 100kHz benchmark? If I need PWM, I'll be using microcontroller... About PNP/NPN: It's up to you. I rarely get to choose because customer standardize on one or another. In North America PNP sensors are more common and usually cheaper. Japaneese guys are a bit different, they normally use NPN and ground positive side of the power supply (we have a lot of Japaneese customers as well). The FX PLCs I was dealing with ware usually with NPN outputs (for models with transistor outputs). About circuit diagram, I'll do something later on...

Share this post


Link to post
Share on other sites
... man, I feel like crying... I want to synchronise the rpm of two DC motors, so I guess I won't be needing transistor-outputs for my FX1N... Here is what I want(ed) to do for my school project: I want to synchronise the rpm of two motors wich are in front of eachother. Each motor has a "disc" attached to it, so that both motors can connect with eachother when they are brought together (pneumatically). When the speed of both motors is synchronised, one motor then turns a little bit faster than the other, so that both discs are in the right position to "connect" with eachother. When this is the case, a pneumatic cilinder will bring both motors to eachother, and will bring the discs together so that they are connected. Can I also do this with an analog module that I can connect to my FX1N? What other hardware/electronic components will I be needing then? Will it cost me alot of money? Because I'm just a poor student Thx for your help, Panic Mode!

Share this post


Link to post
Share on other sites
I see... To drive small dc motor using plc output you could try somthing like circuit below. To use analog output (0-10V) to drive same motor, you could use circuit like this. Just make sure that cutoff pot is connected to PLC analog output instead of +12V. This is PWM circuit actually and you can change base frequency in wide range by altering values of oscillator (like 1M resistor).

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