Colin Carpenter

MrPLC Member
  • Content count

    471
  • Joined

  • Last visited

Posts posted by Colin Carpenter


  1. Thanks for that. I'm still more than a little puzzled as I've just been onto Tech Support and they're telling me that I need to write code in the PLC, and they've sent me a PowerPoint presentation for fixed buffer communications, which (unfortunately for me ) is written for GX Developer and uses a variety of "ZP." commands eg, ZP.OPEN, ZP.CLOSE, ZP.BUFRCV, ZP.BUFSND AND ZP.ERRCLR . I tried to convert ZP.OPEN into IEC using their OPEN function block which seems to be similar, but it won't compile due to type mismatches on the inputs and outputs etc. Do you find that when connecting a SCADA package you need to write code in the PLC? Thanks Colin

  2. I tried this on Friday with a spare Q01 PLC with an E71 ethernet card connected to the site network and I could successfully ping the PLC from the SCADA PLC and when running the thernet diganostics in EIC Developer, I could see requests coming in from the SCADA PC, but the PLC steadfastly refused to answer those requests. Tried changing a few of the settings on the E71, but still couldn't get any comms going, so still a bit puzzled, however, it was a Friday afternoon so that probably explains it. Anybody managed to get a SCADA system talking to one of these? Thanks, Colin

  3. Haven't tried it yet, and it might just work, but then again. I have a Q02H CPu that has two E71 ethernet modules fitted. The first E71 is connected to an ethernet switch and works fine for talking to a couple of HMIs and my programming PC. I propose to use the 2nd E71 (because it's there and not being used) to talk to a PC running Prodigy Scada software and using their Melsec Ethernet driver. It all seems pretty straightforward, but I was just wondering if anyone had any experience about how to set up the E71 ethernet module in IEC Developer so that it will talk to a generic PC running SCADA software? Thanks Colin

  4. Please could you define what you mean by a power supply that is referenced to other analog circuits of both modules. I'm a little confused by that. Whenever we build a PLC cabinet, we never use the 24VDC capability of the power supply on the PLC rack, but instead use a larger, separate PSU. The 0 VDC side of this terminal is always connected to the earth of the chassis which is connected to the site earth. In the past, when we have wanted to share a digital 24 VDC signal between PLCs, we generally run a cable between the the two 0 VDC terminals and both PLCs can then see the input, though you could argue that as both PLCs have their 0 VDC connected to earth, this cable might not be necessary.

  5. I'm a little confused regarding the references to "grounds, references and floating" with respect to other channels wired to the Q68ADI. I've installed lots of these cards and have: 1. Wired 4 channels from two active transmitters onto a card with 4 other passive transmitters. 2. Tested channels with a handheld (battery powered) milliamp injector while other channels are operating on a mix of passive and active signals. 3. Shared a 4-20 mA signal from a passive transmitter between a Q68ADI channel and a Honeywell chart recorder by wiring the two analogue inputs in series. 4. Inserted a multimeter in series with a Q68ADI channel to check the mA flowing. and all without problem. I've attached the wiring diagram from the Q68ADI manual and I can't quite see why each channel cannot be treated as a separate entity. Surely, as long as the mA flowing through each of the individual 250 ohm resistors is happening ( ie the mA circuit is made) then the Q68ADI channel only measures the difference in voltage between the two ends of the resistor, and, as the voltage difference is not reliant on having a ground to reference it to, it all seems to work fine. I fully respect your experience and opinions on this as it seems that I may be missing something ........ it's just that my experience seems to suggest that these things just work.

  6. I stand to be corrected on this, and I haven't tried it, but I would have thought it would be possible with two Q68ADI channels on 2 different PLCs. I've attached a graphic of how I think it would work with both active and passive types of transmitter. As far as I'm aware, the ADI channels pass the mA current through a high spec resister and measure the voltage drop across the resistor, effectively calculating the voltage drop using Ohm's Law. As long as the sum of the two resistor is less than the load that the transmitter, then both channels should be able to see the current in the loop?

  7. Have attached a screen shot of the settings that I used recently for a Q02 with IEC 7.04. Few things to note: The analogue input cards only take up 16 memory addresses. I like to set the cards up so that they will read in 0 - 20 ma on a 0 -12,000 bits scaling. This means that a 4-20 ma sender will read 2400 at 4ma and 12000 at 20 ma. Cheers Colin

  8. Possibly not the best way to do it, but try BMOV. Set up 16 data registers (could be any number, but 16 is decent choice) number them consecutively (say D100 to D115) and name them ALWAYS_ZERO_0 to ALWAYS_ZER0_15. Write some code that continuously writes 0 into these 16 registers using the MOV instruction to ensure that they are always zero (this may be overkill?) then use the BMOV command BMOV D100 K16 D5000 which will copy the contents of D100 to D115 into D5000 to D5015. (the K16 determines the number of registers) Repeat the BMOV command as many times as needed. Thinking about it, I suppose you could use 207 File Registers which would always be zero and use one BMOV commmand with a K value of 207, or for that matter, any other block of data 207 data registers that you know ill ALWAYS be zero? The key point is that the programme will never write values to the data registers that must be zero.

  9. Have attached some screen shots of the code in IEC Developer and also the header for the POU. Once the timeclock has been set in the PLC, this code will give the number of seconds that have elapsed since midnight in the variable TIMESECS. Then simply write some code such as: IF TIMESECS <= 43200 THEN AM = ON IF TIMESECS > 43200 THEN PM = ON Where 43200 is the number of seconds in 12 hrs.

  10. Thanks, I managed to get it sorted with a bit more research. There's a "SECOND" command that you can use to convert the current hours, minutes and seconds from the PLC real time clock into the number of seconds since midnight. (You could obviously do this with some maths as well), and the beauty of the HMI is that you can specify an analogue numeric value as type SECONDS32. This means that I can coninuously run the SECOND command in the PLC to be calculating the number of seconds since midnight, then whenever a process starts or stops, then I would DMOVP the current number of seconds into a DINT. Then, on the HMI, I specify the address of the DINT that I want to display but specify it as a SECONDS 32 type, and the HMI automatically converts the number of seconds back into the HH:MM:SS so that it shows the time on the screen when the process started and when it stopped (using two DINTS obviously) Sweet .......

  11. Have just completed a PLC changeover weekend and my eyelids are just starting to recover .......:) Wonder if someone can help me with an area I've never explored before relating to time stamping operations. I have a Q02 PLC that is controlling a process department, and there are 8 tanks that I would like to be able to timestamp when various things happened and display the information on an HMI. I've worked out how to read the date and time information from the Q02 and can see that it puts the values into an array, so I can read the data registers and get the year, month, day date, hrs, mins and day of the week from the 7 data registers. When a process starts, I'd like to be able to create another single data register (string) that contains the date and time so that it can be displayed on the E1101 HMI, in the form "25/02 10:15:32" (or similar) which is a combination of the various time clock registers which were valid at that instant in time. Any advice on functions to use would be greatly appreciated Thanks Colin

  12. Thanks to all for the good advice. Everything is now working fine. For information, the code was related to adding a Q02 to an existing network of QnA PLCs using A1sj71AT21B cards on a twisted pair Melsecnet network. The old network has a Qna Master, with two local stations using A series CPUs and one local station using a QnA CPU. All have been performing flawlessly for years, and the A1SJ71AT21B cards are "plug and play". No code or parameters need to be written in the local stations and the only thing you need to do to get the system going is configure parameters in the Master Station. We had correctly identified that to join that network with the Q02, we needed a A1SJ71AT23BQ card sat in a "legacy" rack to connect to the Q02 extension racks. So far so good, and all boots up without error .... but the network just doesn't communicate. After many hours of searching, we find that with the A1SJ71AT23BQ, it's not "plug and play". You have to write code into the main programme sequence to refresh the links, and after a lot more searching and head scratching, eventually you find the code snippet in a manual, convert it for your addresses and suddenly everything works fine. The manual that comes with the card makes a small vague reference to this fact, but it could be done a whole lot better and this "unknown" very nearly led to the cancellation of a major PLC change over in the next couple of weeks on a very busy process plant. Could do better on this one, Mr Mitsubishi, I'm afraid .....

  13. Think I've sorted it now .... Turns out that you have to set up the buffer memories in global variables and identify them as DINTS. So, you set up a global variable as (say) BFM_G2 and give it the address U2C\G2 and define it as a DINT. Then use the global variable name BFM_G2 and all is well. You do the same with Z0, Z1 and SD2042 etc and then the code compiles OK. Thanks for your help

  14. Wonder if someone can help me please? I'm attempting to convert a GX Developer program into IEC Developer and am having a problem with a DMOV command in a Q02 PLC The command is: LDI X207 DMOV U20\G0 SD2040 The program has been found in a Mitsubishi PDF and I understand enough to know that it is a double integer move from Buffer Memory #0 in the special function module at Head Address 20 to special data register SD2040. However, if I programme this in IEC Developer, it finds an error with both the input variable and output variable, as neither have been defined as double integers in the global or local variables. If I change the command to MOV then all is fine, however, I'm not sure if a double word move is required or whether a single word move is enough. Does anyone know how I can use a DMOV command such as this in IEC Developer, ie forcing Buffer Memories #0 and #1 into D2042 and D2043? Thanks

  15. I wonder if any of the experts on here could point me to a tasty function that I know nothing about ...... I have a Q2AS PLC that is reading the probe units from a NIR fat sensor into an analogue input. No problem there and it's working fine, but I have to analyse the measured probe units and convert them into engineering units, in this case Fat %. I have created fat samples of varying amounts and have put the probe in and noted the probe units for each of the samples, allowing a graph to be drawn of how the Fat% varies with amount of probe units. Again, no problem and the graph gives a nice smooth curve, but when asking Excel to work out the relationship between the two variables, it can't find a sensible equation that links the two, so I've programmed the PLC to read the probe units and do lots of code along the lines of : IF <Probe Units> Greater than <Constant A> AND <Probe Units> Less than <Constant B> THEN <Fat%> = <Determined Value from Graph> It's fine and it works OK but needs 40 comparisons to work out the Fat% from 0 to 40% at 1% intervals. If I want to increse the resolution to 0.5% then I would have to double the number of comparisons etc. I've seen arrays are possible in the Q, and wonder if anyone has used a neat software solution to minimise the code so that, given a probe unit value, the system can pick a value out of the array if the probe unit value is greater than a second array value and less than a third array value? Hope that's clear ......

  16. Try: Delete Rung 0 Remove the M8186 bit from Rung 1 and also the M0 Output. Your first rung should now just be an always on command of SPD X0 K2000 D0 As pulses are applied to X0 (high speed input) you should now see the number of pulses in a 2 second period arrive in D0. Unlike other counters etc, high speed counter (and similar) functions do not require the X0 bit to be entered as an input prior to the function. Might work?

  17. Agree with the others. Try a factory reset .... set the dip switches to factory reset, power back up and keep your fingers crossed. Unfortunately, it is possible to turn these things into bricks by downloading the wrong firmware into them ..... keep your fingers and everything else firmly crossed that this hasn't happened.

  18. The graphic below should be self explanatory The unit will only scale 4-20 mA = 0-1000 bits. If you want a higher resolution, the FX2N-8AD will scale 4 - 20 mA = 4,000 to 20,000 bits. There is no "Scale with parameters" function block that I know of - you just have to write your own if you want to use the actual engineering value in the software. 0 to 1000 bits = -1 to 6 bar. Alternatively, if using an HMI, use the gain and offset values that built into the HMI to turn bits into real units for viewing.

  19. Not sure if this any use, but in IEC Developer, the option is always to export as a *.asc file, and E-Designer happily reads that. It might just be possible that renaming the *.TXT file to *.ASC might work?

  20. You do need a crossover CAT5 cable if you're going direct from the laptop ethernet port to the HMI ethernet port. I just tried a normal CAT5 patch lead direct from laptop to HMI and it definitely won't communicate ..... or even ping for that matter.

  21. If your E700 is talking to the PLC through the RS485 port into the CPU port then that will still work work fine with an E1070 using the same "HMI to PLC RS485" connection s. If you want to use transparent mode using the serial RS232 port on the E1070, then that will work fine as well. The only thing to remember is that when the HMIs changed from the old "up to E900" range to the newer "more than E1000" range, the wiring on the RS232 ports on the HMIs changed as well. With the old HMIs, the pin wiring was 2-2, 3-3 and 5-5, but that won't work with the newer ones, however, as others have said, a standard null modem cable works perfectly on the newer range and is (imho) still the best and most error free method of using transparent mode. You can use a CAT5 patch lead to programme the HMI from E_Designer as long as you are going through an ethernet switch or router. If going straight to the HMI from the laptop, then it needs to a be a "crossover" CAT5 cable. It tends to be much quicker for large projects. However, as Veganic has said, to transparently monitor / programme the PLC using the ethernet route means that you have to install "virtual com port" software on your laptop so that MEDOC (or whatever) sees a serial port to talk to the PLC on, but that serial port is a "virtual one" that is actually using the ethernet CAT5 route to the HMI. There's a few free versions out there, but they are pretty flakey .... the null modem cable is the most secure way to go in my experience and works fine.

  22. What is the setup regarding the machines? Do you have two PLCs, each with an HMI that controls it, or is there one PLC with two HMIs that control the one PLC. How do the HMIs talk to the PLC(s). I once had a system that had one "non ethernet" PLC that needed two identical screens to talk to it. The "Master" HMI talked to the PLC through the RS485 PLC port and was set up as a BDTP Server, and the 2nd HMI talked to the first as a BDTP client using the ethernet ports on the HMIs. This meant that the BDTP (Beijers Data Transfer Protocol) Client (HMI2) asked the BDTP Server (HMI1) for the data, and it pulled the information out of the RS485 PLC port and sent it over. If you have a similar system, then only one screen would need to be set up with the recipe function ...... just wondering?

  23. In E-Designer, if you go SETUP / RECIPE then it opens a box that will show you some information. Press F1 at this point and the first Recipe help screen will appear. At the bottom of the help screen, click the right arrow to carry on reading through the help screens. Afraid I've never used recipes, so I won't be that much use to you, but Function keys or touch keys on the screen can have Recipe functions such as LOAD, SAVE, DELETE applied to them. Good Luck