Pat-uk

Newbie using FX0s 3 motors forward then reverse

9 posts in this topic

Good Afternoon 

im a complete newbie when it comes to PLCs but have done plenty of PIC programming in the past.

I've been gifted a couple of FX0s 20mr units to try to repair something I made with PICs years ago. It got damaged during a move and I can’t see well enough now to make PCBs anymore so thought that this might be a solution.

The basic operation is 

1. switched on
2. motor A moves till hits limit switch (X000)

3. Wait 2 seconds

4. motor reverses till hits second limit switch (X001)

then once this has been completed then the following 

5. Motor B turns clockwise for 30 seconds then stops

 And while Motor B is turning I need Motor C to turn until hitting limit switch (X002)

I then need to get it to repeat on the press of a button but I need to reverse operation of Motors B and C

I am using double position relays to drive the motors so motor A is on Y000 and Y001 if I power either relay the the motor turns in that direction. Same with Motor B and C Y002 to Y005

is this something that’s possible with one of these controllers or am i going to be programming a PIC to control the PLC ?

 

All the various COM and powers are connected up, I can individually make every motor do what I want, but the program doesn't flow from one item to the next. but this is probably just me

 

 

 

New Bitmap Image.jpg

Edited by Pat-uk
Added Drawing

Share this post


Link to post
Share on other sites

PLC stands for programmable logic controller.  Of course you can do that if you write the program to do it.

Do you have the programming software and cable?  What software?

Mitsubishi has some free online classes on their websites for basic intro to ladder logic programming.  Ladder is pretty simple if you understand power flow schematics.

Share this post


Link to post
Share on other sites

I have an old version of GX developer and the Cable,I was given the whole lot as a bundle, I have been able to make the motors run and reverse, but not progress through any program

 

Share this post


Link to post
Share on other sites

you need to create a sequencer to drive your I/Os. there are different ways to accomplish this and examples should be in the download section. check Pick and Place for example. i have used such logic on literally hundreds of projects. this is just a scaled down example for demonstration purposes, includes printout and code. 

 

Share this post


Link to post
Share on other sites

Have you tried to connect to the P.L.C with your software and cable.

 

 

Rodney

Share this post


Link to post
Share on other sites
On 30/04/2020 at 7:51 AM, Rodney said:

Have you tried to connect to the P.L.C with your software and cable.

 

 

Rodney

Hi Rodney, Thankyou for replying

I was also given the old laptop that was used in the factory that all the stuff came from which had the software installed, a lovely bright red cable to plug into the PLC and I have been able to talk to  it.

I've not had time to look this week much, but I think I was looking in the wrong direction, I was just looking for ladder examples to build on. The Mitsubishi Tutorials I looked at didn't seem to help. I couldn't see how to

 

Where I think should have been concentrating was on STEP LADDER as this is so similar to the Pic programming I was used to, although still open to any input especially with timers to hold coil on for a set time.

Main Program.

Motor A program

Motor C program

 

Share this post


Link to post
Share on other sites

There's no reason to use step ladder, its more confusing to support.  Step ladder is Mitsubishi's convoluted way of creating a flowchart program in a ladder logic CPU.

Your sequence from above sounds like 10-15 lines of simple ladder logic.  You've already written up the sequence, now convert each of those statements into a line of ladder.  There are some good tutorials online and on YouTube on how to write ladder logic.  If you can read a power schematic you can write ladder.

Share this post


Link to post
Share on other sites

Hi Pat,

We usually dont write the code for you and encourage you to have a go yourself, but I am so bored with this lockdown I've ran out of weeds to digup. So here it is.

Added 2 extra inputs as X4 & X5. Press X4 to start your sequence. X5 is directional change flag.

Not sure if your version of GXDeveloper will load this project in as its created with V8.503Z so ive included a printout on pdf also.

 

MotorsABC.zip

MotorABC.pdf

Share this post


Link to post
Share on other sites

Just a point of order MrDippy

I had a quick look at your program and I know you threw it together through boredom and to help

 

But you have put an ALT instruction to change the direction from input X5

Done this way it will be a random ON/OFF as the state will change every scan.  Either X5 should be a rising edge or the instruction should be ALTP   :)

 

 

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