TConnolly

MrPLC Member
  • Content count

    934
  • Joined

  • Last visited

Everything posted by TConnolly

  1. Variable Timer Preset

    No, you're not really correct. It is data memory, its not anything else. First off, a timer is not a device. It is a computer instruction that operates on a section of memory. The AB supports strong data types, and a T file is a section of memory where the words are divided into three word groups for use by a timer instruction. The timer preset is one of the words in the timer data structure located in memory, just like an integer (in fact it is an integer). The preset in any time structure is at the memory address TX:X.1. Using .PRE is a shortcut supported by the programming software to enforce strong data typing. You can pre program that word to be a particular value when you enter the timer instruction. You could also leave it at 0 and have that word in memory written to programatically. You can also program most HMI devices such as a Panel View, or the Redlion G3 or the C-More, and many others, to write directly to any desired word address of not only N files but also any word of a T file, C file, R file, etc. So depending on what LCD/keypad you are using you can probably write directly to the preset word of your timer memory. However if your HMI does not support range limiting then better practice is to write to an N word and include logic to make sure that a valid preset has been entered.
  2. C programmable PLC recommendation?

    Having both programmed embedded controllers in C and PLCs, I suggest that at least for discrete IO programming you learn to use ladder. Despite the initial knee jerk reaction that causes people to think ladder is a low level language, its actually not. Whether a language is high level or low level is determined by the level of abstraction it provides from the hardware, not by the actual complexity of the language. For example. consider reading and writing a single bit of memory, which is what the ladder language was designed to to do. While its not at all difficult to do in C, it still requires the construction of a bit mask and ANDing or ORing. But it ladder its a single simple instruction. There is nothing un-sophisticated about using it. While the C programmer is still defining bit masks the ladder programmer has finished the subroutine and moved on. Next consider your customer. Most utility companies have people on staff who understand and use ladder, but not necessarily C. And to a customer the ability to maintain their equipment themselves is of paramount importance, without having to depend on a "black box" accessible only by a tech support guy at another company in another location. Your competitor using a ladder PLC has a leg up on you in that area. Learning ladder isn't hard, especially for a C programmer (besides I've said it before, a C background makes one a better ladder programmer) Jump in and learn to appreciate ladder for what it is, and for what it isn't.
  3. Ruler snafu.

    Nothing to add, the picture says it all.
  4. Ruler snafu.

    Thats why we can't convert to metric. The phrase with "meter stick" just doesn't have the same ring as "yard stick." Actually, the stubbornness of the US public against converting is one of my pet peeves. The US needs to bite the bullet and convert. We can't keep using the USCU system forever, the longer we put it off the more it will hurt us in the meantime. Eventually the rest of the world will get tired of it and force us to change. There are costs in converting, but the longer we put it and/or the longer we take the more it will cost, so why do we procrastinate it?
  5. Ruler snafu.

    No, Ron got it the right way around. If a room is 12 feet across then that is four yards or 3.66 meters. If a person making the measurement thinks he is using a yard stick to make the measurement but he is actually using a meter stick then he will think the room is 3.6 yards and order the carpet accordingly, thus a short fall.
  6. Ruler snafu.

    Look again. Steve was spot on. Each inch only has 15 subdivisions. The screwup is most obvious between 1/2 and 3/4 and 1-1/2 and 1-3/4. But since the marks appear to be evenly spaced then either the entire ruler is off or at least the entire fraction part of each inch is off. It doesn't appear to be suitable for anything except maybe scratching a broken arm inside of a cast.
  7. Counter

    Also, you probably shouldn't be using the C5:0.PRE (depends on the application). The HSC accumulator is updating continuously, but C5:0.ACC only updates on scan. Use the HSL and HSE instructions to load a preset value to the hardware counter. When that preset is reached the hardware counter will generate an interrupt. The HSE instruction enables the interrupt. That way our program will respond as soon as you reach the HSC preset, not wait until the C5:0.ACC is actually updated whenever the program scan gets back around to it.
  8. Counter

    Refer to chapter 14 of your ML1000 user manual. You won't find input I:0/0 in your ladder when using the HSC. What you need to look for in your program are instructions such as HSC, HSL, RAC, HSE, HSD, etc. The HSC instruction is what sets up your high speed counter (your encoder input). Channel 0 has a hardware counter that functions independently of your PLC program, so input pulses are not lost if they arrive mid scan. The HSC instruction enables the hardware counter, and each time it is executed it updates an image of the hardware counter in C5:0 with the values coming from the hardware counter. In other words, the high speed counter is still counting between the times when the HSC instruction is executed, but C5:0.ACC is not updated until the HSC instruction is scanned. Using HLS and HSE instructions you can cause an interrupt subroutine to interrupt the user ladder and run the subroutine when a certain count on the hardware counter is reached. A full explanation is beyond the scope of a single post, so I recommend you read chapter 14. If you don't have the manual you can get it from the literature library on AB'w web site.
  9. OT - Economic Models explained

    You have two cows. The milk output of one cow is declining, so you decide to buy another cow. The price of the new cow is many times what you expected a cow to cost. You pay anyways, you need to get your milk production back up. Your delivery truck brings one skinny cow and a very fat pig that you did not want and cannot afford to feed.
  10. A video of the new car model can be seen here.
  11. COS vs. Polled

    Be prepared for the possibility that that optimizing your network won't completely solve your problem. DN, like all networks, has a bandwidth limitation, and when you can't overcome that limitation you have to separate your DN network into two networks.
  12. Load Cell Signal Conditioner

    I've have used Beckhoff IO modules for load cells. You can connect to your PLC using device net, control net, ethernet, profibus, or modbus, or several others. http://www.beckhoff.com/english.asp?bus_terminal/kl3351.htm
  13. I was recently made aware of a double sided tape product called TESA 4970. The stuff is seriously strong. If you put the label down in the wrong spot you'll probably destroy the label getting it back off.
  14. Use a ten element array and a counter as a pointer. Each part increment the pointer to the next spot in the array. When you reach the last element reset the pointer back to zero. Use the file average instruction AVE to average the array. Start with counter.Acc = 0. Counter preset is 10 Each time a part is complete then { Save the part time in the array at data[counter.acc] Increment the counter (increment after you save the data, not before) If counter.dn then reset the counter } AVE data[0] 0 AVERAGE_TIME AVE_CONTROL 10 0 Here is a post where its discussed but for a micrologix.
  15. Distributed I/O choices

    I use a fair amount of Beckhoff IO with AB PLCs - on Devicenet and Ethernet. Its inexpensive but pretty good quality, and Beckhoff tech support is excellent. No problems at all with it.
  16. 24 hour rolling min/max

    This one was for calculating a rolling average using a circular queue using a pointer without moving around huge chunks of data. http://forums.mrplc.com/index.php?showtopi...amp;#entry59565 It shouldn't take too much work to adapt it to a rolling min/max.
  17. I need a couple of European style rectangular connectors for an application that will require 80 pins each, mixed discrete and analog, plus I'd like to include a couple of extras. I've looked at the Phoenix connectors and Lapp connectors. I would prefer screw connections but it appears that above abotr 40 pins (varies by manuf) you have no choice but to use crimp pins. What brands have you all used, what did you think? Who was easy to get from for the US?
  18. P&ID drawing

    X = unclassified - user can use for whatever. XL and XA are indicators. A=Alarm L=Light. I have posted an abbreviated ISA cheat sheet here: http://www.plctalk.net/qanda/showpost.php?...amp;postcount=5
  19. always on or off bit?

    I prefer to avoid the use of always on and always off bits as a permanent part of a program. The program can be structured so that they are not necessary. For debugging purposes set aside a word in which no bits are addressed by any OTE, OTL, OTU, or any word write instructions, and set the desired value of the bit using the file data monitor or bit toggle when an addressed input function is selected in the ladder. This way you can easily change the value of the bits while you perform your debugging to quickly enable/disable functions without editing/re-assembling the program. As long as no write instruction addresses the bits it will remain at whatever value you set it at. After the program is debugged, remove these bits from the program. We require jumper permits for any force or software jumper that is installed, same as for wires. No permit is required for as long as the tech is in front of the machine, but if he leaves, he has to submit a permit. The permits are "self-authorizing" that is the tech himself is the determining and authorizing authority, this way its not a restriction, but a means of documenting to make sure that it gets cleaned up afterwards. If they desire to make the change permanent then the jumper permit is reviewed and the change is approved/rejected by engineering. One way to keep a program is 'clean' is to make sure that there are zero permanent forces and that there are not permanent always on/always off bits as a matter of policy. Then if one does appear then you know that an undocumented change to jumper something that was once functional has occurred.
  20. Sensing Sludge/Iron in Water

    Is this a static or batch reaction tank? Or is fluid being pumped through it during the precipitation process? If its static (fluid is pumped in and then batch reacted) then as the precipitate falls out the conductivity of the solution should change - so a conductivity meter may do the trick. If fluid is pumped through during a continuous precipitation process then as precipitation proceeds the tank weight will be a function of fluid level + accumulated amount of precipitate. In that case a fluid level sensor + tank load cell and a bit of simple math should give you the answer.
  21. Micrologix 1100 w/ VFD

    Refer to technotes 52205 Can I control a PowerFlex drive over EtherNet/IP with a MicroLogix1100? 35188 Controlling a PowerFlex 40 with a MicroLogix via 1761-NET-ENI / 22-COMM-E in Allen Bradley's Knowledgebase. While the technotes deal with powerflex drives, the principles can be applied to other brand drives that support Ethernet/IP communication.
  22. New Company Name

    That jokes been told 1000 times. Probably 11 people actually got it. The other 101 had to have it explained to them.
  23. New Company Name

    How about using the name of a prominent geographical feature near you? Tynne Automation Bristol Controls Not being familiar with PEI I can't name other features, but its a suggestion.