TConnolly

MrPLC Member
  • Content count

    934
  • Joined

  • Last visited

Everything posted by TConnolly

  1. See my answer to you in your other thread (perhaps these should be combined...) It seem that you might be confused about B and N files. Thats OK, its common. B and N files are both integer files. As far as the PLC is concerned, they are identical. The separate type designations are immensely helpful to the programmer however and thats why they exist. However you can perform any operation of a B word that you can do in a N word, including Mathematical and move operations. And you can do bit operations on any N word. For example ADD B3:0 1 B3:1 <---- Add a 1 to the value in word B3:0 (note we are operating on the word, not a bit) or LES B3:1 B3:10 MOV B3:1 B3:10 <---- If word B3:1 is less than word B3:10 then move the value in B3:1 to B3:10 or XIC N7:0/0 OTE N7:10/0 <------- Use an output instruction to set the bit N7:10/0 to the value of bit N7:0/0 So you can access the word B3:0 as though it were an integer and read the value of all 16 bits.
  2. Analog force

    Things get tricker in the PLC/5 for analog IO. A PLC/5 analog input card uses block transfer reads and block transfer writes to transfer analog input and output information to the actual module. Unlike the SLC500 and Micorlogix platforms, in a PLC/5 analog IO data is not actually a part of the PLC/5 IO image table. The BTW instruction transfers a block of N words to the analog output card. N words cannot be forced. For an analog output, somewhere in your program is logic that writes to the N register that gets transfered to the analog output card and you have to do what Bernie suggested and disable the logic that writes to that register. Do not disable the BTW rung that makes the actual data transfer to the analog output card. The BTR instruction transfers analog input information from the card and places it directly in an N register specified in the BTR instruction. N file registers cannot be forced, and if you attempt to change the value the next time the BTR is executed it will get changed back to what the analog input is. For an analog input it gets much tricker. You may need to temporarily change the analog input address used in your program to an un-used memory address that you can change. The address might be used in multiple places in your program. If you are scaling the raw analog data before using it in your program then you can disable the scaling logic and then you can change the scaled data word. If you are using only one analog input, or you are forcing all the analog inputs on a card then it will be easier to just disable the BTR rung with an AFI instruction and then change the values in the address block used by the disabled BTR. You might be tempted to try and just overwrite the data right before the BTW or immediately after the BTR, but the success of this method is dubious because the BTW and BTR instructions merely schedule the data transfer - the actual data transfer occurs asynchronously to the program, which means that the true data transfer can occur at any point during a program scan and not at the point where the BTW and BTR instructions are located. It should go without saying that you must be very careful in doing this that you do not interfere with the process in dangerous ways.
  3. ONS vs OSR

    One example of what Ron is talking about is when you want to detect the falling edge of an input, for example, you want to know when an input is first on, then off and you want to respond to the input going off. If you program XIO I:1/0 OSR B3/0 OTE B3/1 on a SLC500. then B3/1 will pulse whenever power is cycled or whenever you switch from program to run, yet the input device did not actually change from on to off. This could be undesirable. I had that issue with a vacuum furnace Micrologix 1000 PLC program where events outputs from the temperature controller were triggering actions in the PLC program and falling edge detection was necessary.
  4. Glad I work in Industrial Electrical...

    Is that dust and dirt all over that PLC from the door mounted fan or has something burned and blackened everything?
  5. Using a PID to control a digital output

    Is each PID controlling only a single valve or multiple valves? If its a single valve then its pretty easy to set up a time proportioning algorithm. Create a timer that has the desired time control period - I recommend that you use whatever the current controllers has. Then use SCP to scale the PID output to the same range as the time period, and then compare that scaled value to the timer ACC to see if you should turn the output on or off. For example, lets say we choose a ten second time control period with a timer using the .001 second time base and a preset of 10000. The PID output CV is at 9830 counts (out of 16383), or 60%. Scale using SCP PID_CV 0 16383 0 10000 N10:0. This will put 600 in N10:0 Now use comparisons to determine if the timer ACC is less than 600 and turn on the valve. LES T4:0.ACC N10:0 OTE VALVE. So the valve turns on for 60% of the time, and off for 40% of the time.
  6. Glad I work in Industrial Electrical...

    Ramen noodles?
  7. Glad I work in Industrial Electrical...

    Ladies, 60's era automobiles, and huge bench seats was a mix that had very little to do with respect... jus' sayin'
  8. Glad I work in Industrial Electrical...

    You must not remember your High School lunch hours very well. I had a Ford Galaxy 500 back then. Seated 16. Room for four more in the trunk.
  9. Electricity in the Body

    At least you didn't start receiving radio stations like Gilligan did....
  10. When the RSView script sees the update clock tag go true it can call the vbaexec command to run a vba program. The VBA program accesses the other RSView tags containing the date time values to be set using the RSView object model and then updates the PC clock. I'm not sure what VBA commands to use to set the PC clock but I'm sure you can find it in one of the many VBA forums that are out there. It may use WIN API calls or maybe possibly the shell date and shell time instructions might work. eta be sure the vba or the rsview script resets the clock update tag after it completes the update. Don't expect perfect synchronization, by the time RSView completes the update there will be a small discrepancy in the times.
  11. In this news story about a Texas woman who survived a lightning strike that made its way into the interior of her home is the following statement on page 2. I'm glad that she survived and that her young son had the presence of mind to summon help in the proper way, but that statement by the reporter, or whoever the reporter is quoting, is simply ridiculous. No doubt Kimberly is still feeling the effects of the damage caused to her body, and that kind of injury can take a very long time to heal (I once took a 480 hit that hurt for nearly a year afterward) but there isn't any such thing as "residual electricity" to make its way outside her body. Its not that I expect the public to understand electricity on the same level as those of us who work with it, but can't we at least get our public education level up just a little? Its dismaying to see a statement like that in a news article that was probably written by a college educated journalist.
  12. Many years ago a truck delivering compressed Argon gas bottles pulled up to the loading dock at the place where I worked at the time and the driver rolled up the truck back door before he rang the door bell. He heard a hissing sound so he hopped in the truck, pulled it to the end of the parking lot, and called 911. I guess he didn't know what Argon was. He didn't notify anyone in our facility. Next thing we knew the fire dept. was all over the place. They confined us to the front of the building. The FD decided this was a chance to practice haz mat response so they went all out. Two firemen put on space suits and went back to the truck and closed the leaking valve. Then they went back out front and did the full decontamination drill. The local newspaper ran the headline "Toxic Gas Leak At Local Company Hospitalizes 8" Except for the pictures of the firemen in the haz-mat suits, the entire story was a complete fabrication.
  13. On the PLCs.net board I posted a routine that will do this. http://www.plctalk.net/qanda/showpost.php?...amp;postcount=5
  14. We began the transition to a Japanese style lean manufacturing model about two years ago. It took a radical change in how we think, but the results have been stunning - production has doubled. Labor roles changed and how we managed changed, but no one lost their jobs and we've been able to ride the current economic downturn without laying off parts of our workforce and have even picked up market share.
  15. Tim, ABB makes an earth leakage monitoring relay for online monitoring of circuit to ground resistance. I'm not sure of the ABB number, Entrelec used to make them but they have been swallowed by ABB. They make them for both AC and DC motors. Check it out, it might be what you are looking for.
  16. Allen Bradley terminal blocks

    I have had that problem with them. I really liked the J4s, but since coming out with the J3s AB has priced the J4s ridiculously high, I assume that is to discourage their use while still continuing to support the already installed product base.
  17. Optimate has some dirt cheap (about 200 bucks) interface units that allow you to set values for a limited number of registers. Nematron has apparently purchased the optimate line. http://www.nematron.com/products/industrial/optimate.html I've used several of these units. An OM613 or OM413 might be what you need. You should also check out Redlion's Kadet. http://www.redlion.net/Products/HumanMachi...face/G304K.html If you want to use thumbwheels then how you do it depends on whether you want three different single digit numbers or one three digit number. Either way wire all three thumbwheels to the same input module. If you want a single three digit number then its super simple: Treat the input word as a BCD and use the FRD instruction to convert it to a binary. If you want three separate single digit numbers then it gets a little bit more involved, but not much. Bob gave you the basic method. However, if you use the masked move MVM instruction then you need to be sure and clear the destination value first because MVM masks destination bits, not source bits. Using the AND instruction saves you having to first clear the destination word. To shift the bits four positions to the right divide by 16. To shift bits eight positions to the right divide by 256. Here is how I would do it with thumbwheels: First Digit AND I:1.0 000FH N7:0 Second Digit CPT N7:1 (I:1.0 AND 00F0H)|16 Third Digit CPT N7:2 (I:1.0 AND 0F00H)|256 Considering the time involved to wire thumbwheels you'll probably come out ahead with one of the small data entry type HMIs.
  18. OT, Nascar test rigs.

    Watch out Peter! You might get some red on your neck.
  19. I'm not asking why a door was opened or closed. I'm wondering why the wire was routed in such a way that it was possible for a conductor to get pinched in the door. Why wasn't the wire secured in the cabinet? Why was there that much wire slack? If it is possible that closing a door will make contact with energized wires then something is wrong either with the design or with the quality of the installation. Its not unreasonable to expect that there might be an electrician on staff who routinely leaves wires extra long and unsecured and thinks he has a perfectly good reason for doing so. Now that a potential hazard has been identified, other panels on site should be inspected for the same hazard. Whether the panel was energized at the time the door was closed or de-energized first and then subsequently re-energized is irrelevant. The short from the pinched wire would have occurred either way. However the accident is completely preventable through correctly routing and securing the wires. No one is pointing any fingers, this is about improvement. Safety is as much or more a culture than it is a stack of regulations and training sessions. We will never get better if we don't ask and answer the hard questions. Why did something that should not have been able to occur happen? Have other panels have been inspected? Have corrective measures have been taken?
  20. I'm interested in how an energized lead can become pinched in the enclosure door. On the surface, that seems to be the primary problem. I hope that the safety culture is of a nature that the underlying cause of the problem was corrected and that steps are taken so that particular cause can never occur again. Have other panels been inspected to make sure the same problem cannot occur in them? What other corrective measures have been taken besides patting everyone on the back for wearing the proper PPE and having performed training?
  21. Saving a few buck

    Our office building and manufacturing building are on opposite banks of a small 30' wide river. Its a mirrored glass building, so anyone with a window has a full wall window. There is a nice wide park strip between the building and the river with a jogging trail down the river bank. It is spring. There is a university less than a mile away. There are plenty of distractions on the jogging trail this morning.
  22. Saving a few buck

    Now we know where to throw the rock. j/k Being the president I guess you get to pick your office. When we moved admin and accounting to a new building two years ago I moved from the cube farm to a fairly large office, but one without any windows. I would give up half the space for a window.
  23. PLC-2

    http://www.plc2software.com/
  24. I think that only the L10-BWA is programmable with the free software.