Colin Carpenter

MrPLC Member
  • Content count

    471
  • Joined

  • Last visited

Everything posted by Colin Carpenter

  1. Analogue Output Failure - Why?

    A few weeks ago, I was called out to have a look at at a steam valve fitted with a Samson positioner ... the sort that has an LCD screen that is powered up by the milliamps of the analogue output and displays various things about the valve position etc. The PLC is a Q04-UDE with several 8 way current analogue output cards fitted and this has been in operation for around eight years with no problems. The Samson screen was blank and it rapidly became clear that the analogue output must have failed as zero milliamps were coming out. It was during the recent heatwave and I assumed that it was probably a combination of heat and age, so reprogrammed the valve to work using a spare analogue output, changed the wires and all was good again .... for about a week, before that output failed after a few days / week or so, and after having to use at least two more outputs that both failed after varying times, the time had come to do something about it. So, new 8 way analogue output card, new valve positioner head, new twin core screened cable from the output to the positioner  and a milliamp to milliamp isolator has it all running again and it's been fine for the last few days ....... My question is ..... what could have caused those 4 channels to fail in such a short space of time? I'm used to the odd one failing, but this was a pattern and all related to the one positioner. All other outputs on the PLC that use the same power supply have been fine, and as far as I'm aware, the channels are short circuit protected and if the resistance of the positioner is high, it will cause an issue but is unlikely to actually destroy the inner works of the channel. Any ideas please? 
  2. Analogue Output Failure - Why?

    Thanks for the information and your obvious knowledge and experience. I also have installed probably hundreds of analogue 4-20 ma sensors and outputs and have never come across an issue like this one. In general, we use multi core cable to go from the PLC to remote junction blocks and then split out from those to the individual local items. The multi cores can have up to 50 cores and are generally 0.5 mm squared cores to give good cable strength. The multi cores will only ever carry the 24 VDC Io signals and there will never be any AC voltage used in the cores. We've never had a problem before and this particular output had been running happily for more than ten years. The individual two core cable from the junction block to the valve was changed at the time but the failures kept happening.  The multi core cable was still used, and once the isolator was installed the failures stopped. For extra security, the valve has now been wired all the way back to the PLC in a dedicated two core, but the isolator had solved the problem already. The only issue I've ever had on analogues before, was a PRT probe that had the 4-20 converter head installed remotely to the resistance head, and that was very susceptible to interference when inverters started up. Changing to a probe with the ma converter on the probe cured the problem.
  3. Inverter power calculations

    Not strictly Mitsubishi based, but I thought I'd ask here as there are some good people who view this forum. It's a general question regarding calculation of electrical power. All my career, I've worked on a couple of simple formulae to calculate electrical power, namely I x V for DC circuits and single phase AC circuits and 1.732 x I x V x cos phi for 3 phase AC circuits. However, as inverter control becomes much more common and energy becomes much more expensive, we have now started looking at the energy information available from modern inverters ..... and I'm now very puzzled. The motor in question is a 75 kW three phase motor running a dairy homogeniser, effectively a piston pump that can have a lot of restrictive back pressure enabled to smash the fat globules to smithereens. Effectively, the machine has two modes. It can run on water with no back pressure while cleaning and it can run on dairy product with high back pressure when homogenising. In other words, the pistons can be freewheeling or working hard. The ABB inverter works fine and it's output frequency is controlled by a 4-20 signal from the q plc and it all works fine. However, the output power and amps that the inverter is showing don't make sense to me. In the freewheeling state, the inverter shows 368 volts output voltage, 44 amps and 3.08 kw of power. In the full production, high back pressure state, the inverter shows the same voltage, but 52 amps and 16.36 kw. Which makes me think that my career long use of those equations now needs a complete rethink if those inverter amps values are correct...... Can anyone enlighten me please.    
  4. there is a device in the program (main) that is outside of the range

    What happens if you uncheck the two "comments" check boxes?
  5. Inverter power calculations

    So, in the freewheeling state where it's showing 44 amps at 3 kw, assuming that the "root 3 IV cos phi" equation still holds, this would equate to a power factor (cos phi) of around 0.1 to produce a stated power of around 3 kw? I suppose what I'm really try to do is determine how much it actually costs to run the plant, in other words, how many kWh will the electricity supply company charge to run that freewheeling motor for one hour? Presumably 3 kWh?
  6. Analogue Output Failure - Why?

    Thanks for that. So, it sounds like it could be an issue with the circuitry within the positioner that is causing unusual voltages to potentially cause problems in the internal circuitry of the analogue output?  
  7. FOR NEXT LOOPS

    Ah, sorted it. Put a line of code in at the start to "first run pulse write" the value of -32000 into V7 to ensure that it didn't get to 100 before I could start monitoring. Toggled off M2701 by hand and sure enough, it didn't come back on until V7 got to be 100, indicating that Rung 3 was now operational as expected. Phew ....
  8. FOR NEXT LOOPS

    For the first time in my career, I find that I'm looking to write "For Next" loops using index registers to solve a problem, but am struggling to make sense of the way these things work. As shown on the attached graphic, I have an old FX2N hooked up and the entire ( 4 rung) programme is shown as two screen shots. Rung 1 - Meaningless code just to have something there Rung 2 - Labelled START_1 and purely adds 1 to V7 (an index register) as long as  V7 is less than 100 Rung 3 - If V7 is less than 100, then it should jump to Rung 2 (START_1) Rung 4 - Purely there so that I can see if Rung 4 is being run as part of the programme. (M2701 should be on when it is) I start the routine with V7 set to a large negative number (-32,000) to give me time to monitor the programme. The top of the graphic shows that scenario and I would have thought that the programme would go through Rung 1 and Rung 2 and then when it gets to Rung 3 it would loop back to Rung 2 and carry on looping  until V7 gets to 100.  If that is correct, then Rung 4 would not be run during that time and M2701 would be OFF - and yet it is ON, showing that Rung 4 is clearly operational. I'm obviously missing something and wonder if someone could advise what that is please. Thanks
  9. FOR NEXT LOOPS

    I read up on the CJ command a bit more and rearranged the rungs as shown in this graphic and also changed the CJP command for a CJ command. According to the manual, it should skip Rung 3 when V7 is less than 100 (which it is in the top graphic as confirmed by M2702 being ON), and yet Rung 3 still seems to be operational as M2701 is still ON. Really confused now .....  
  10. Hi, I wonder if I could ask for some advice regarding the accurate determination of frequency of a pulsing input on a Micrologix 1100. I have a density meter that gives out a pulse train, the frequency of which is proportional to the periodic time of the vibration of the tube. The pulse frequency will be around the 700 hz range. I need to able to accurately determine the frequency (hz or pulses per second) so that I can use this value to feed into floating point equations so that I can determine the density of the fluid in engineering units. The Micrologix 1100 has a single high speed counter (20 khz) related to inputs 0-3, and it has STI ability (Selectable Timer Interrupts), so what I need it to do is as follows: Time 0 ------ Reset ACC Value, start counting up. Time 1000 ms ------ Store ACC Value in register, reset ACC Value, start again. In essence, every 1000 ms, the number of pulses counted by the HSC would be updated into a register and I can take it from there. Sounds simple enough, but having spent a morning reading through the manual regarding HSC and STI, I still can't really "see the wood for the trees". If anyone has done anything similar, I would be grateful for some advice, as the accuracy of this number determines the accuracy of the whole job. Many thanks, Colin
  11. GX Works 2 System Variable Use

    Thanks, I tried check my output window after a "Build" and even a "Rebuild All", but it shows nothing other than a few warnings.  Do I have to enable something to get it to show me bits and words that have been used in the compile, as happens in the IEC Developer compile?
  12. GX Works 2 System Variable Use

    Please could someone tell if it's possible using GX Works 2 to find out how many  System Variables (M bits and D registers) have been used when I compile my programme, so that I can get a feel for the number left for any future expansion. IEC Developer would always display the values after a "Build", but I just can't find the information in GX Works. I must be missing something obvious, but just can't seem to find it. Thanks  
  13. GX Works 2 System Variable Use

    Thanks for that Dave, I had a look at that and it seems like GX Works 2 allocates System Variable M Coils starting at the top address of the range and then working backwards. In my case the range from M8191 to M6613 is currently used, meaning that I now have 1,663 spare addresses (as I set the start point for system variables at M5000) before having to look at re-allocating ranges. I'm constantly finding that GX Works 2, while better in some respects, has just lost a few of the more useful, simple functions that IEC has had for many years. Cheers  
  14. Fx3s timer

    Most of us learnt how to programme by reading the manuals ..... and getting confused by the deliberate mistakes that Mitsubishi seem to leave in them at random. Scratching your head and working out how to do things for yourself is the only real way to get experience ..... there's plenty of clues in the post.
  15. Scaling

    By the solution of simultaneous equations. Dead easy and worth learning now. Every straight line has the generic equation      y = mx + C Where m is the gradient of the line and C is a constant (also knows as the gain and offset) Draw a graph with Hz on the y axis and bits on the x axis. You can write down two point that you know  - in your case ( 0,0) and (4000, 50) You can now write down two equations, and as there are two unknowns then you can solve. 1) 0 = m x 0 + C 2) 50 = m x 4000 + C From (1), C = 0 Therefore m = 50/4000 = 0.0125 So your equation becomes Hz = 0.0125 x bits. Check it the answers are OK At 0 bits,           Hz = 0, At 4,000 bits,    Hz = 4,000 x 0.0125 = 50 At 2,000 bits,    Hz = 2,000 x 0.0125 = 25 Yours was a very simple example as the start of the line is at (0,0) meaning that C is 0, but in a lot of cases that's not always true. We always set our analogue inputs up to read 0 - 20 mA, even though all our sensors send 4-20 mA signals, the reason being that you can easily see the mA being sent even though it may be below 4 mA. This means that our ranges are 800-4,000 on older kit, or 2,400 - 12,000 on high res more modern kit. You may find that the GOT has a scaling function built in - certainly the older Beijers HMIs did - which calculates the gain and offset for you as you enter the bit range and engineering units range. If not, make yourself a small spreadsheet now as it will come in useful :)  
  16. Fx3s timer

    Yes, it's possible. They key thing to remember is the magic number of +32,767 which is the highest decimal number that a 16 bit word (D register) can hold. As most timers in the Mitsubishi world count in tenths of a second, the longest a normal timer can count up to is 32,767 / 10 = 3,276.7 seconds which equals 54.6 minutes, so you can use a normal timer for your 50 minute period (50 x 60 x 10 = 30,000 which is in range) However, a normal timer cannnot time to 70 hours for the reasons explained above. In 70 hours, there are 70 x 60 x 60 = 252,000 seconds (therefore too big to count in seconds) However, there are 70 x 60 = 4,200 minutes, so fine to count the minutes. So, the simple answer is to use the "special"  1 minute pulse bit ( address will be detailed in the manual), and use that in conjunction with the INC_P command to incremment a data register by one every time the special bit comes on ( It's on for 30 secs, off for 30 secs). When that data register is equal to 4,200 (70 hours) then turn on the pump and when the normal timer times out, turn the pump off and pulse a value of zero into your "counter data register" so that it starts counting again.
  17. E71 Read Only?

    Yes, we've been using Prodigy since around 2003 and the system has grown to accomodate all the extra plant which has been added since that time. We do pay for the support option each year because it is now so important to the company, and it's one of the few companies I know that when you ring up, you can actually talk to the people who write the code, meaning that you do get results very quickly. Last year we attached some Modbus electrical meters to the system and found that although the values being read looked quite similar to those displayed on the meters, they were never quite right, and a detailed investigation showed that these particular meters used a "not normal Endian" method of encoding the values, and Prodigy then re-wrote their Modbus driver to allow us to select the correct Endian method, all as part of their support package. Really, really good support .... which is rare these days :(
  18. E71 Read Only?

    I've looked but I can't find it ...... We have a Q02 with an E71 ethernet card fitted and we will soon have a Q04 with a similar E71 fitted. The Q02 is communicating with SCADA via ethernet and the Q04 is just about to be connected. My question is : Can I set up the E71 so that SCADA can only READ from the PLC and not WRITE to it? Many years ago I set up a Q2AS with an RS485 card fitted that allowed SCADA to communicate with it, and disabling the WRITE option was simply a switch on the front of the RS485 card, but I can't seem to find a way of doing it with the Ethernet option. Many thanks, Colin
  19. E71 Read Only?

    We're using a UK based SCADA system called Prodigy by a company called Tascomp Ltd., which is excellent, very fast and superb technical support. It has always been a monitoring only system logging data and presenting real time mimics and generating pdf reports etc. The other day I set up some tags wronly in the SCADA system - and foudn that the valves controlled by the PLC were going on and off evrey 5 seconds as SCADA accessed the PLC outputs. Luckily it didn't cause a problem, and we found it very quickly, but it was a bit of a wake up call :) I think you're right about the additional ethernet module to totally safeguard the system as the SCADA system is the only way anybody malicious can currenly access the PLCs via the internet, even though firewalls and passwords etc are fully in place to try and stop that.
  20. E71 Read Only?

    Thanks for that Gambit. If that box is unchecked, does that mean that all of the ports into the E71 will have the write function disabled? The graphic shows Port 1 as the Melsec programming port and 4 HMIs .... if I wanted to connect the SCADA system into the same E71 on Port 6 and have the write function disabled, would it mean that all the other 5 ports would also have to be disabled? Thanks
  21. E71 Read Only?

    The Q02 is programmed with IEC and the Q04 is programmed with GX Works2, but I can't really see a difference between the two programming methods as the E71 doesn't appear as an intelligent module in GX Works2 and the set up screens look remarkably similar between the two packages. The issue came up the other day when we were discussing internet security and the only way for a malicious hacker to remotely get into the control system is through the SCADA PC, and it occurred to me that disabling the ability to write to the E71 would be the most secure way to prevent it. I know it's a long shot, but a simple WRITE DISABLE switch would solve the problem as the SCADA system is used purely a data logger and real time display system, with no control cababilities, though that could be switched on by someone who knew what they were doing.
  22. GX Works 2 and Clock Change

    We've been working on a Q04 project in GX Works 2 for a while now and all has been been going well ..... though I'm still baffled about the loss of functionality when changing the name of a global variable and why it doesn't update automatically throughout the code ( as it does in IEC and GX Works 3) However, last week, I started up the software (structured ladder as in IEC) on the programme that's been in development for a few months only to see a "nag" screen tellling me that the libraries have been updated and did I want to "re-build all" after updating the libraries, with the dire warning that the PLC code would probably not verify with the PLC due to the fact that the global variables would probably now have different addresses. I was more than a bit puzzled by this and phoned tech support to see if libraries somehow updated "in the background" without my knowledge, but found out that the only time that libraries update is when you download an updated version of the software, so I was then very puzzled as this was happening on three PCs. A bit later, in a flash of inspiration, I realised that the clocks had changed since I had last opened the software ( in my case going to British Summer Time) so I set the time clock on the PC back to a date before the clocks changed, and, sure enough, the old project opened without the nag screen, which then came back when I reverted to correct time on the PC. Now I know that you can choose to ignore the nag screen, but, it's guaranteed that one day, you'll click on OK instead of Cancel , and then you'll be left with a project that  doesn't verify after a rebuild, meaning stopping the PLC and the running process and  downloading the software  ...... probably once a year, but maybe twice (though I don't recall an issue back in October when the clocks changed the other way) Tech Support have emailed Mitsubishi to see if there's a workaround or a bug fix or somewhere where you can tick a box to tell it not to update libraries unless requested (as I believe there is GX Works 3), but in the meantime, I thought I'd ask on here and see if anyone else has come across this and found a cure for it. Software version is V1.586L Thanks  
  23. IEC Developer Online Change rules

    Came across an issue yesterday that made me (once again) realise that I have no real idea about the rules regarding online changes when using IEC Developer 7.04. We had to modify some code on a Q02 CPU that could not be stopped without a lot of grief, and it seemed simple enough, but proved a head scratcher. Essentially we had one POU that contained numerous lines that allowed an operator to press an HMI GO button and, whatever he had selected from a drop down menu would set a bit on in the PLC. Essentially, the raw code of that particular "rung" of the POU ended with  LD  " go button"   AND "op1 requested"   PLS  "system bit" and it was quite happy with that. We wanted to use the system bit to SET a bit on, so the online change amounted to installing 2 extra lines, namely: LD "system bit" SET "op1 flag" Strangely, the online change of adding these two lines wasn't allowed as it said that it would need 530 lines to do the change???? I've found in the past that IEC seems to let you do large changes in POUs that are near the bottom of the "compiler table" but can struggle if the POU is high up, which I assume is related to the amount of lines of code beneath the change that have to be shifted down, but this is the first time I've seen such a tiny change cause issues. We have set the "online changes to 2000 lines" in the options and know that his been downloaded in the past to the parameters,  but the CPU still seems to work to a 512 limit? The work around was easy enough to do, but just left me realising that I still have no idea regarding the rules of online changes. Any advice gratefully received ....    
  24. IEC Developer Online Change rules

    Thanks .... we are using GX Works 2 so will have a detailed look. Still puzzled by the Q02 and IEC Developer though ......
  25. IEC Developer Online Change rules

    Thanks, When you say MBOC, is that an checkbox option when you format the CPU memory to completely erase everything and re-format? Have never fully understood the benefits or usage of a memory card in the PLC and have always just relied on the battery backed memory options until now. Would you say that the benefits of a memory card are worth having as we are just installing a Q04 CPU and now would be a good time to add one if there are real benefits for future online changes etc.