PLC-programming problems

soder

Member
Join Date
Apr 2004
Location
malmo
Posts
41
We're having a bit problems with programming in PLC since we're very new to this and we wonder if anybody has the experience of controlling mechanical linear drive units or if anybody knows someone with this type of experience?

Thanks for your time,

//Andreas (yes I'm back ;))
 
System:
PLC (FP Sigma) -> Servo Motor Driver (MSDA) -> Linear Unit

Dev. app: FPwin Pro 5.0

I have written some easy code to make the linear unit move but nothing more. I want to control the acceleration, deceleration, stop, change directions, change speed etc. But haven't any samples or guides of how to do it properly.

I wonder if there are any samples of how to do this on the Internet or something? Perhaps you know any good sites, or have some samples yourself?

I'd really appreciate if anyone could help me out.

Thanks,

Andreas.
 
Check Your Manufactures web site.

Many Manufacures have online Sample programs, and even sample programs that come with your software. One such example is A-B RS logix 5000, there are many sample programs that come with it. They are fairly easy to follow through and there are a few programs on motion control there too.

Hope that helps, if you have a brand I can mabey be more specific.
 
Yes we have searched for samples without success, and the samples we got with the software wasn't very useful for us.

We are using a NAiS (Matsu$hita) FPG-C28P2 PLC (replace $ with s)
and a Panasonic MSDA (AC Servo Motor Driver) connected to our linear drive units from NEFF (Wiesel SpeedLine)

We'd be glad if there was anyone who could help us.

Thanks,


//Andreas
 
Seems an easy task, but maybe not!

I have written some easy code to make the linear unit move but nothing more. I want to control the acceleration, deceleration, stop, change directions, change speed etc. But haven't any samples or guides of how to do it properly.

Let's take this one step at a time. You have written code to make the linear unit move, but nothing more. Could you post that code so we can look it over?
Second, you want to control several things that are either digital, or discrete, whichever term you like. That would be Stop change directions, and although not mentioned, I presume you need to start unless that is in the "move code" you already have written. Well, outputs from the plc can make most anything start, stop and change directions given that there is an input to the drive device that can interpret the contact closure you might use for this.
Third, the accel, decel and speed references could be analog although the accel and decel could also be discrete if the drive has inputs that can be used to initiate set values.
Not being familiar with the NAiS (Matsu$hita) FPG-C28P2 PLC, I can not give you any samples but if it is like most plcs, I figure it can do analog and discrete I/O. If you will post your work, some one here might be able to keep you on track. Some may also be willing to program the thing for you, if you arrange a suitable payment method.(off of the PLCS.NET forum though)
 
Andreas,

You only need to have a few "things" to develop some code that will actually make the device "dance" for you.

  • Math skills. High School (Secondary School) Math is minimum. You don't need to know how to do Calculus, but it really, really helps to understand the concepts behind Calculus. One of the most fundamental aspects of Calculus is that it describes Mathematical Models through TIME.
  • An understanding of Basic Motion Formulas. You need to know how to manipulate those formulas, using basic math, to produce desired results. Motion Formulas are based on TIME.
  • An awareness of limitations - physical & mathematical. You have to be able to sense when you might be pushing or clearly exceeding the limits. That is, after making a calculation for your control model you have to be able to notice whether or not the result is reasonable... otherwise... you must expect "cycle-on-station" or worse, "crash & burn"!
  • Imagination. This is by far the most important. The others can be acquired by simply applying yourself to learning them.

You don't need to have examples provided for you. You only need to figure out how YOU would control the motion if YOU were the Computer!

You do drive a car... don't you?

Do you have any idea at all what kind of processing your brain is doing to keep you from being killed? Think about it...

See if you can do "on purpose" what your brain does, apparently without thinking!

Build a "Mathematical Model" of your "vision".

Here's a "vision" idea...
(this is based on the idea that YOU are developing and providing the analog signal that is controlling the device.)

From the "Home Position", have your device "walk slowly" to the mid-point of the travel range then pause.

Then have the device move a short distance at a slow speed in one direction.

At the target point, have the device slow down to zero speed and stop.

Then reverse direction to a point equal distance on the other side of the start point. Again, at the target, slow down and stop.

Then reverse direction again and return to a point a little beyond the first stop point... but this time, a little faster.

Repeat the routine, back and forth, faster and faster (within reasonable limits) until you are near the physical limits.

Then reverse the routine and work towards the starting point.

When you finally stop at the starting point, have the device "walk slowly" to the "other-home".

Now... you could go through the pains, and I really mean pains, of writing code for each move. That might be OK just to see how painful it can be. But, the smarter way is to build a very small function that increments/decrements target values and speed values as you go.

Your code should end up being something as simple as...

Go Direction-W to Position-X at Speed-Y.

You should include code for accelerating as well as decelerating as you approach Position-X.

Then, after stopping, you need to determine the new Direction-W, new Position-X and new Speed-Y.

Once you get into it and get the hang-of-it, it's a kick in the A$$!

Remember, you can mentally slow this process down as slow as you need in order to handle the real-time speeds... simply put yourself into a much slower time-frame.

BTW#1
Just as your Primary School Teacher said... Check Your Work BEFORE handing it in! That is, check your math and your model carefully before you turn the damned thing on! Crash & Burn... remember?


BTW#2
The descriptions I gave are based on an open-loop model. That model can be developed with a simple understanding of basic math.

If you were to use a closed-loop model, then you would definitely need to be very familiar with the Calculus way of looking at things.

(246)
 
Thanks for the ambition to help us, I'll try to post all neceserry information first thing on monday when I'm back at work.

Thanks again and have a nice weekend everyone!


//Andreas
 
Hello Soder,

PLC (FP Sigma) -> Servo Motor Driver (MSDA) -> Linear Unit

- Are we talking here about one axis only ? Please confirm.

I want to control the acceleration, deceleration, stop, change directions, change speed etc. But haven't any samples or guides of how to do it properly.

- At this point I'm surprised. Did you download (and open) the manuals I suggested in my reply to your previous post ? I also suggested to get in touch with the NAIS guys and to seek internet in search of literature. Register asap to NAIS fan in order to get an access to up-to-date manuals... including easy-to-use samples and guidelines not to mention wiring diagrams !! You're not asking here for page numbers, are you ??.

I wonder if there are any samples of how to do this on the Internet or something? Perhaps you know any good sites, or have some samples yourself?

- Sure, good sites can easily be found... re-read your previous post. I also have samples showing all the tricks you're asking for.

Yes we have searched for samples without success,

- Why not open first the manuals provided with the products? Your PLC and drive happen to be built by divisions of the same industrial group...

It might be some built-in compatibility... ?! Subtly, deeply and ironically hidden among tons of manuals and through internet by a full team of vicious and nerve-racking japanese designers, out of beginner's sight, some coded links may perhaps be deciphered... but by persistent students only ! :D

I'm kidding and would be proud to help you... but PLEASE do your homeworks FIRST :

1) Download the manuals, read and search by yourself (also have a look on motion management/interpolation/positionning-related materials for FP-Sigma or FP2 such as FPG/FP2-PPx... sharp examples provided, guaranteed!)
2) Once you're familiar with the major motion control functions and their attached samples, and are able to solve the basic cases, let's step ahead,
4) Check the way these tools are managed in your programming environment
3) Use your creativity and try to envision YOUR own way to reach YOUR goal by the mean of this toolset (PLC+FP-Win). Build your own analysis and a strong skeleton of your project' requirements in three directions : mechanical chain, control and wiring, programming flow.

Some around here would also appreciate to see a drawing of your system including I/Os and sensors.

At this point, we should be able to discuss about "real" solutions based on real-world facts... For sure these devices will "dance" for you... As far as I remember your project also includes a vision system. What about this issue ?

Laurent
 
You'll have to work on those links. When you click on them, all you get is a (corny) File Not Found page (and uber popups!)... :(

beerchug

-Eric
 
Terry Woods:

Actually there's nothing wrong with our imagination ;) We do have some sort of theory cut out for us - but the problem is that we can't translate this theory into a program.. We've looked through all manuals, help files and samples - and also tried to contact the developer of the program we use (FPWin Pro 5.0 - by clicking the link above you can get more info about this program) without any success.

These samples that were included in the program didn't help us in how to control the linear units.

When searching the manuals we only get info of this type:

"Function F174_SP0H - Pulse output instruction, table–shaped control with channel specification ...yada yada yada..."

And then there's a short example in how to use THIS function - but only in a way that shows the functionblock, some input and some output.. absolutely no example that shows how it works more precisly.

Also there's these DUTs (Data Unit Type) that are being used "everywhere".. We can't fully understand how to use this..


//Andreas

dut1.jpg
 

Similar Topics

I am currently editing a PLC program that was written by somebody else. Unfortunately I am no expert on PLCs, but can usually get by. The PLC...
Replies
5
Views
6,310
Hello colleagues, Some time ago I started my adventure with programming. With your help and the courses, things are starting to come together...
Replies
13
Views
597
Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
84
Hi Please I have zeilo smart relay #SR2A201BD but I don't have it's programming cable. Can I use any general usb/rs232 converter? Or need...
Replies
2
Views
80
Hi, Does anyone have thoughts or know of, can point in the right direction any published materials with a plumbing centric point of you explaining...
Replies
1
Views
128
Back
Top Bottom