Sign in to follow this  
Followers 0
LeDude

Linespeed: Map % to actual line speed

10 posts in this topic

Hello there, steadily learning here with a bunch of SLC 5/04's. AB is new country for me, and I thought I'd ask for some help. :D I am currently working on a project, where operators type in a percentage, which is a MAGIC UNIT (according to the programmer). This percentage is scaled to an analog output, which controls a hydrolic pump, which then propells a conveyor ( I guess a 100hp e-motor was too big ;) ). The speed is measured in PPM ( parts per minute). Minimum PPM and Target PPM are already on the SLC. So what I am trying to do here is: Map this % to the PPM. I have a minimum line speed and a target speed. Idea here is, that the conveyor ramps up to minimum speed (let's say 50% = 500PPM) But target speed is 700PPM. They type in 700 and the machine ramps up. So How can I map the speed, that when they type in Target Speed 700PPM, it speeds up to that PPM? I don't want to use that % as line speed unit, I want actual PPM as unit. And at 700PPM, but only once reached that number, I want the OP to be able to run faster than that if he wants to. HMI is an AB Panelview 1000. THis is rather simple, but my lack of experience makes this more complicated than it probably is. :D Thanks for your help, guys.

Share this post


Link to post
Share on other sites
First map the flow of information: Display -> PLC register -> analog command number register Then make a table of different display settings, the resultant number in the PLC, the resultant analog command. Be sure to list the part number of the specific analog output card and any setup parameters. Just doing that should give you most all the information you need to solve this on your own. But for more help post all this information here.

Share this post


Link to post
Share on other sites
And also give part numbers for the hardware any time a panelview is involved. we don't know if you have a standard or a plus.

Share this post


Link to post
Share on other sites
Is this just a display problem? In other words, does the machine essentially do what you want, and all you need to do is scale 0-100% to 0-1000PPM (or similar)? Or do you need to add functionality to the machine (e.g. ramping, operator speed increases, etc.)? Also, is the scale linear, or does it curve due to the hydraulically driven conveyor?

Share this post


Link to post
Share on other sites
Well, to me it looks ike everything is controlled thru the PLC. The HMI Panelview 1000 (not PLUS) writes the percentage straight into the registers. The machine ramps up automatically and the scale is not linear, unfortunately. I think I have an idea, -OP types in 760PPM -if PPM is != 760 ( but not less than 700(= minimum speed) add 1% until PPM=760. The reason why I ask you guys is: how would you do it?

Share this post


Link to post
Share on other sites
That depends on how tight of a control you need. If your processor has the CPT (Compute) instruction, one option would be to manually adjust and record the percentages required for each PPM value. Then you can use Excel or an online regression tool (I usethis one) to come up with a formula that will give you the required percentage for a given PPM. Then write the formula into the CPT expression with a new HMI value on the input and the old HMI value on the output. This can be done without the CPT instruction by using a series of math expressions, of course, but CPT makes it much simpler. For the formula generation, I'd suggest you only input the data for the range of PPM that you will actually use, as this will make the formula more accurate for that range of data. If that doesn't give you tight enough control ("Hey, I put in 760, and I'm only getting 759!"), then you'll want to use some sort of PID control. For this you'll need accurate speed feedback scaled to the units you want. You could roll your own by ramping up and down as you suggested, though that might give you an unnecessarily slow ramping. Or you could you the PID instruction with the operator value as the setpoint, speed feedback as the process value, and the percentage speed as the output. This might be interesting to tune, especially if you don't have any PID experience, but tuned properly it would give you tight control and no messing with regressions and formulas. If you try to do this with either your own math or the PID instruction, be aware that the machine ramping might fight with the calculated speed value. For example, the operator puts in a value of 700PPM, the calculations starts ramping up the speed command at 1% per second, but the machine ramps to match at 0.5% per second. Because the actual speed isn't catching up, the calculations continue to increase the command. By the time the machine reaches the desired speed, the speed command is way high and has to be brought back down. In order to avoid this, you'll have to tune things to take the machine ramping into account.

Share this post


Link to post
Share on other sites
I do have some kind of PID: at the end of the line it counts the PPM, but as you pointed out the response time is too long. There is not tight control needed, except a minimum line speed. But I will take the few hints you guys have given me and will evaluate. Thanks :)

Share this post


Link to post
Share on other sites
Since you don't need the tight control, I would pursue the formula to calculate percentage from desired line speed. It requires a little math, and the CPT instruction syntax takes a little getting used to, but this would require the least amount of fiddling to get the end result. The operator puts in a PPM, the formula turns it into a percentage, and that percentage drives the machine just like it does now. You should first confirm that your processor has the CPT instruction. From the help file, it looks like most but not all SLC 5/04 processors can use the instruction. Open your project controller properties, and make sure you've got an SLC 5/04 OS401 selected. If you happen to have the SLC 5/04 OS400, all is not lost, you'll just have to use regular math instructions. Assuming you can use the CPT, here's a little help. Here's a screenshot of a regression I did recently: It calculates steam pressure from steam temperature, which isn't important to you. The point is that it's a second degree polynomial (remember your algebra?). The actual formula is: 0.00595 * (x/10)2 - 0.6745 * (x/10) + 22.66 That should give you an idea of the syntax required. Note for example that division is a vertical bar "|", and exponent is a double asterisk "**". The variable "x" is my temperature (units are degrees times 10, which is why I divide by 10). The destination address is a floating point, because the math requires it. The value can be converted to an integer using a MOV instruction. If you have trouble, I'd be willing to generate the formula for you and put it into the correct syntax. Just send me your data as an Excel spreadsheet.

Share this post


Link to post
Share on other sites
Thanks. Let me get some data first. Have a great weekend!

Share this post


Link to post
Share on other sites
I would start there. You may want to keep the PID but only give it a very small influence on the recorded speed that works at that command speed. Think of the command speeds as recipe names for now, to avoid the lag caused by the PID having to do too much of the work. That gets the machine fixed right away, with a look-up table, as long as there aren't too many different command speed settings being used. The data gathered can be used to sit down and write the CPT as suggested where you can triple check it and test it before you download the concise version. Correct me if I am wrong but is there a FBD block for this? I only have a standard license at work. Edited by OkiePC

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