Peter Nachtwey

MrPLC Member
  • Content count

    514
  • Joined

  • Last visited

Everything posted by Peter Nachtwey

  1. RAMP and hydrolics

    You would need a RMC75E AA1. The E means Ethernet. You transfer data back and forth using MSG blocks. The AA1 means 1 PID with analog in and analog out. The analog input can be a voltage or 4-20ma. The analog output has a range of -10 to +10 volts but there are converters to convert current. I you look we can interfaces to many different feedback devices. I usually prefer SSI.
  2. I haven't done a bench test to really know. However, ST should be the fastest language IF the code gets compiled down to machine code but if ST gets compiled down to ladder then ladder should be faster. Ladder spends too much time loading parameters and storing the results for each block to be efficient.
  3. PID Function - Help Needed

    A simple speed control system has a time constant or bandwidth and a gain. A PI controller is all that is required. This is the easy part though. What hasn't been addressed is keeping track of the loading on the conveyor. If the coal mass/conveyor length changes the speed will need to change just to keep the mass rate of coal constant. That is the first problem to work out. I bet the total mass on the conveyor may change and this would affect the time constant or the bandwidth of the motor but if the system is fully loaded and still responds quickly the problem is then this time constant isn't critical and now one must look at the conveyor gain in velocity per percent control output. If this value doesn't change much as a function of the total mass of coal then the problem is simply one of keeping track of the coal on the conveyor. So does the speed of the conveyor change as more coal is added to it. Does the response change as more coal is added to the conveyor. If so then by how much? If the motor responds with 1 second to difference in coal loading then the PID tuning of the motor will not be as critical as keeping track of the coal loading for each length of the conveyor.
  4. Potentiometer VS Encoder

    If this is for a hydraulic system then normally a MDT, magnetostrictive displacement transducer, rod is used. The feed back is start stop, PWM or gated or SSI.
  5. RAMP and hydrolics

    http://www.deltamotion.com/products/motion/rmc70/index.php This may be gross overkill but it would make life simpler. The question is how much time do you want to devote to becoming a motion control expert? All the ramping and speed control are done inside the controller. A command would look like this MoveAbs 37 10 100 100 Nearest This means move absolute to the the final destination of 37 degrees with a 10 degree per second rate and a 100 degree/second^2 acceleration and deceleration rate going the nearest direction. The motion controller takes care of generating the ramps for you, Peter Nachtwey President Delta Computer Systems, Inc.
  6. The PLC 5 uses a 68000 and I don't think is has a math coprocessor so there is no booth algorithm. The overhead of the interpreter probably dwarfs the difference in execution time difference between a floating point MUL and DIV.
  7. /* [wxMaxima: input start ] */ (%pi/6)*H*(3*(r*r-(H-6.605)*(H-6.605) +3*b*b + H*H)); float(%); expand(%); collectterms(%,H); grind(%); /* [wxMaxima: input end ] */ 20.75021947696058*H^2+(1.570796326794897*r^2+4.71238898038469*b^2-68.52759982266234)*H$
  8. FP division is often just as fast or faster than integer division. Integer division requires a cycle for each shift and subtract. FP divide often calculated using multiplies and Newtons method. Our DSP doesn't have a floating point divide. It simulates a divide using a multiplies.
  9. Get wxMaxima from sourceforge. It can simply very complicated expressions. The equation above is simple but the engineer that came up with that formula needs it. http://sourceforge.net/projects/maxima/files/
  10. You forgot a H^2 term but otherwise that is why the engineer owes someone lunch for doing his job.
  11. From watching the forums I have come to the conclusion that it is impossible to train everybody. What we did is check the exponent. If the exponent is a constant integer then we translate x**2 to x*x. x**3 gets translated to x*x*x. x^4 gets translated to (x*x)^2 which gets translated to xx*xx which takes only 2 multiplies. A smart compiler should do this. It doesn't take much effort. Now the question is what did Rockwell do? You should always avoid divides by a constant. It is much faster to multiply by a constant. On our processors it is about 4 to 5 times faster to multiply than divide. We got smart here to and translate dividing by a constant to multiplying by (1/constant).
  12. Doesn't the PLC5 have compute blocks? That would make this easy. In any case you want to define variables in a F block like F8. You do the calculations inside out. What is(are) the variable(s) that have values that change are run time. Know this can allow one to simplify the equation. V=Pi/6*H*(3*(r*r-(H-6.605)*(H-6.605) +3*b*b + H*H)) PI/6 should be a pre-calculated constant. If 3*b*b doesn't change then it should be pre-calculated constant too. Just to get you started, you need to define a few temporary variables in F8. Call the temp0 and temp1 sub h 6.605 temp0 mul temp0 temp0 temp0 mul r r temp1 sub temp1 temp0 temp0 mul b b temp1 mul temp1 3 temp1 add temp0 temp1 temp0 mul H H temp1 add temp0 temp1 temp0 mul temp0 3 temp0 mul temp0 H temp0 mul temp0 PI temp0 div temp0 6 V The last few lines should be simplified. PI*3/6 is simply PI/2 and should be calculated before hand by calculator and stored in a variable PIDivBy2. Your engineer should be embarrassed. Using that information I would shame him into helping you out or at least ask him why he didn't know this. It is more fun to ask these kinds of questions around when there are others to hear it and the reply. // Use this for comments in your code sub H 6.605 temp0 // temp0=(H-6.605) mul temp0 temp0 temp0 // temp0=(H-6.605)^2 mul r r temp1 // temp1=r^2 sub temp1 temp0 temp0 // temp0=r^2-(H-6.605)^2 mul b b temp1 // temp1=b^2 mul temp1 3 temp1 // temp1=3*b^2 add temp0 temp1 temp0 // temp0=r^2-(H-6.605)^2+3*b^2 mul H H temp1 // temp1=H^2 add temp0 temp1 temp0 // temp0=r^2-(H-6.605)^2+3*b^2+H^2 mul temp0 H temp0 // temp0=H*(r^2-(H-6.605)^2+3*b^2+H^2) mul temp0 PIDIVBY2 V // V=(PI/2)*H*(r^2-(H-6.605)^2+3*b^2+H^2) // You can see you save a few steps and saving a division saves a lot because they are slow. I would at least extort a lunch. Your engineer owes me a lunch. You can collect.
  13. MSG

    I agree that the best way to do this using MSG blocks is to have each PLC read the data it needs. See the first few lines of http://www.deltamotion.com/files/rmcenetclx.zip However, there are problems with this method. The PLC A can be read PLC B's data at any time and the data may not be ready. To ensure the data is ready I recommend that there be a register at the end of PLC B's data that is incremented when PLC B's data is ready. Now PLC A must read the data and check the last registers. If it hasn't changed then PLC A ignores the data. Better yet is to use Ethernet/IP I/O capabilities and map registers in PLC A to PLC B and registers in PLC B to PLC A. Now now message block is required. The that PLC A writes to the 'produced' registers gets 'consumed' by PLC B and show up in PLC B input registers. The hand shaking is very important now because you have know idea of when the data is being transfered back and forth. Again, one must look for a 'sync' register to change before copying data out of the input registers. When writing, one must change all the outgoing data register first and THEN increment the 'sync' register. We use both methods to talk to our controllers. Our controllers look like another PLC. I prefer the Ethernet/IP I/O method and can set that up in about 15 minutes. I do it in training classes. Default update time is 10 ms. I use a 'SyncIn' AND 'SyncOut' register. When I want to send data to the controller I copy the data into the out registers and then increment the 'SyncOut' register. This can happen all on one scan. Then I wait for the 'SyncIn' register to be the same as the 'SyncOut' register. The controller waits for the 'SyncOut' register to change and acknowledges by copying the 'SyncOut' number that it got to the 'SyncIn' register going back to the PLC. Ethernet/IP I/O and Control Logix rock. It is so easy to set up and the speed is so fast. This is INFINITELY better than the Siemens crap I have to deal with now.
  14. Home Network Setup

    You need two Ethernet cards and the PC that is screening and passing through the traffic uses its CPU time. Not the client PCs. We used an older PC and installed linux on it to do exactly what is being suggested here. It really isn't a good idea because you can get dedicated routers in a box with embedder firmware that will come back on line MUCH faster after a power outage and are less susceptible to have their code modified. We just replaced our Linux router with a $200 embedded router/firewall. It has at least two Ethernet ports. One of the WAN and at least one for the LAN.
  15. Are these glorified S7-200s or do they run the S7-300/400 software? The S7-200s allow indirect addressing and the S7-200 STL is easy to use. I don't hate everything Siemens, just Step7 BTW, I am not ignoring you. I am just hoping that if I ignore it my Step7 project it will go away. I have been gone and will get back to it this week. mzobrest, I would not consider the S7-300. One spends more time messing with the tools than getting the job done. Nothing is intuitive and I fight it for every little thing. A lot of people really like the Omron PLCs. Omron has Ethernet cards that support Ethernet/IP so you should be able to use a lot of the same I/O. I have spent a limited time progamming an Omron but the programming is fairly straight forward. I don't know multi dimensional arrays. Actually you don't really need multidimensional arrays. I just ARRAY1[Row*RowLength+Col]. I know it isn't as pretty as ARRAY2[Row,Col] but it gets the job done. I would also stay away from pointers and anything that requires assembly language like programming. You end up spending too much mental energy on the programming compared to solving the application.
  16. Package spacing in a conveyor

    This is easy with a motion controller. 1 You get the two belts to synchronized. 2. You measure the distance between product as described above. 3. You issue a phasing command to either the up stream or down stream belt to make the gap. The phasing command assumes one of the belts is the master and the other the slave. The slave will then be told to super impose a move on top of the normal gearing that will either advance or retard the slave until the desired cap is achieved. These kinds of command usually required that you specify how you want to change the relative position of the slave belt as the master belt moves X distance. If there are 3 or four belts up stream and the master is the down stream belt then the phasing command must be issued to all down stream belts. This was my first motion control project I had every done back in 1983 except I was synchronizing lug chains on a sorter and had to create gaps between pieces of wood.
  17. High speed motion project

    Ideally there should be an even number of coarse updates per move. 2 ms does not divide into 13ms evenly so how is one going to do a motion of 13 ms and a dwell of 27ms? The whole cycle can be approximated by a cam but the move will not be exactly 13 ms long.
  18. High speed motion project

    Actually, we make machines that scan french fries and cut the defects out. The blades must be able to cut in 16 milliseconds. I took a lot of research to make knives that would withstand the forces. We had to have custom servo motors designed for us that had low inertia. We even had do design our own drives. This was very expensive. I doubt an off the shelf solution exists. I think your customer needs to be prepared to spend the big bucks to do what they want to do. I don't think you should stop the indexers and actually implement a double flying shear where there are two flying shears that cut every other slice.. Then you may have a chance. So, did your customer or you do the calculations to figure out the required acceleration? I calculate that the peal acceleration will be around 8g if s curves are used. I think you should walk away unless the customer is very serious. The project can be done but it will cost big $$$$$.
  19. Delta RMC150 and Compact Logix L35 Report

    The accumulator pressure should be much higher. You said the system pressure was supposed to be about 1800 psi. THe accumulator pressure should be pre charged to about 1600 psi. At lower pressures there is too much oil in the accumulator. Oil doesn't store energy well but gas does so you want to maximize the amount of gas in the accumulator to maintain a high pressure during operation. However, you don't what the accumulator to ever be out of oil either.
  20. High speed motion project

    You should have posted this information first. The speed isn't even that high but the acceleration is. I didn't see any number for the inertia of the motor. Have you done the math to figure out the g forces? I have. You are asking for a lot. I will bow out and the Rockwell guys should too. You need to really do some simulations. The real question is that can you make a system that can physically do this. It is easy to shuffle electrons around.
  21. Delta RMC150 and Compact Logix L35 Report

    You are doing very well from here. The big thing is whether you get hero status when you are done.
  22. Delta RMC150 and Compact Logix L35 Report

    What are the units? millimeters? It looks like you are synchronized withing fractions of a millimeter. One thing I can notice is that the control signal must be constantly increasing as the motion continues at constant velocity. This is due to the system pressure dropping. This is usually due to the system pressure dropping because the accumulator is not big enough or properly charged. Also notice that the actual velocity seems to be a little wavy even though the control signal is is relatively smooth. There seems to be a little bit of 'capactiance' in the system that usually makes systems difficult to tune. It looks like there is one actuator that moves farther are starts a little latter. It would be nice to see the labels and to have some audio. I have been told that my videos are hard enough to understand and keep up with and I try to go slow. OT, I use one of these. Very good quality for decent price http://www.bluemic.com/products/Snowball
  23. Delta RMC150 and Compact Logix L35 Report

    The motion profile is almost as good as using the simulator. Very good tuning job on two of the axes and the third probably isn't a problem anyway if this application was using bang-bang valves in the past. Did you use the user programs at all or did just issue commands from the Compact Logix? Most of my customers use a Control Logix and we do our testing with the control logix so we have the maximum update rates documented but we haven't done that with the Compact Logix. How often can the Compact Logix update the RMC? OT, I use Screenflow on my Mac Pro which is a program similar to CamStudio. RMCTools, Screenflow and CamStudio are all CPU hogs. Running RMCTools and Screenflow at the same is one of the things that will start to get my MacPro CPU meter above %50 CPU usuage but it has 4 cores. I am still trying to figure out the best resolution to use but I kind of like HD or about 1280 x 720. Actuall I end up with 1200x800. My files tend to be extremely big but I want to be able to show the values like you are and move the cursor back and forth like you did.
  24. Very strange problem with S7 function monitoring

    It sounds like you are calling FC10 with the inputs bits begin on in some cases and off in other cases. There is no good solution except to make sure the other FC10s are not called. Another solution is to duplicate FC10 and make a FC11 and FC12 and substitute these functions for F10 in the difference places.