Mendon Systems

MrPLC Member
  • Content count

  • Joined

  • Last visited

Everything posted by Mendon Systems

  1. Real world simulator

    If you really need that capability then connect a second PLC and write a simulation program strictly for testing. I have done that before on the rare occasion where I needed active simulation.
  2. One thing that will help is to break the project into separate logical tasks and create a program section for each task. That will allow you to arrange the program sections in a logical order even if you don't write them that way.
  3. Internal Counter Holding

    You still haven't told us which PLC you have, but assuming that it is reasonably current you should be able to use the ++(590) and --(592) instructions to manipulate the value in a DM or H register. Those register values will be maintained during a power cycle.
  4. Immediate Refresh

    One thing to keep in mind when using immediate refresh: The I/O point referenced by the immediate refresh can change state in the middle of a program scan which could mean that any rungs which reference the I/O point before the refresh get different results than those after the refresh. In most cases this won't make any difference, but there is a possibility that it could cause weird results in the logic which are extremely difficult to debug.
  5. Control Transformers in a Control Panel

    If it was powered by 208Y then no problem, but 230 comes in various flavors depending on where you are located. Some 230 sources have a neutral reference that provides 115 volts and others don't. There is also the infamous "wild leg" 230 that has one phase which is at 284 volts to the neutral. It is a whole lot safer to use a 230/120 control transformer.
  6. Program lost after power cycle

    Also check the DIP switch settings on your CPU. The settings of switch 2 (and 7 depending on the CPU type) can cause the CPU to try to load from a memory card on power up. Start with both switches OFF and configure from there.
  7. TIM instruction is not working

    I suspect that something in your logic is resetting the timer as soon it reaches zero.
  8. P_WR, P_CIO

    Those two, along with several others refer to words A450 through A473. They are used as pointers by OMRON FB Library function blocks. The programming manual says "Do not change the content of these words".
  9. Count how many words are being used

    It seems like you should be able to use the SRCH(181) instruction to do that. It will output the number of matches found to DR0. It is listed under Data Table Processing instructions in the W474 manual. I suggest that you search for words containing zero. The SRCH instruction will give you a count of them in DRO. You can then subtract DRO from the total number of words to get the number of non-zero words. Nonzero word search.cxp
  10. Count how many words are being used

    What do you mean by "used"?? Do you want to count words which contain a non-zero value??
  11. Cyclic Tasks

    The SFCON and SFCOFF instructions in rungs 7 & 8 of task 0 control the operation of cyclic task 1.
  12. Analog input scalling load cell

    Another way to look at it .... The resolution of the AD042 will be 3000/12000 or 0.25 g increments. The accuracy depends on a lot of factors including the sensor, the analog module, and the power supply. The accuracy will generally be approximately resolution x 10 or 2.5 g in this case.
  13. From PM this morning

    One configuration that hasn't been suggested yet is to replace that CPU13 with a CPU33 and add a CP1W-CIF01 if the HMI doesn't support an Ethernet connection.
  14. Timer datatype in cx programmer

    As I recall there were a few versions of CX-P that would default to the Timer data type on PLC's that did not support it resulting in a compile error. Rather irritating!!
  15. How to reset

    First ... I would suggest that the timer you are using is not long enough to do you any good (9999/100ms = 16.6 minutes). Second ... If the rain sensor closes your roof, it will cause the timer to restart fro zero. I suggest that you look into using the PLC's system clock and use a range of times that you want to allow your circuit to operate.
  16. Overlapping rungs error in CX-Programmer ver.9

    I think CXP is complaining because the SBN instruction immediately follows the SBS instruction (no main program content). Try adding a do nothing rung after the SBS and see what happens.
  17. How to read analog expansion inputs

    Here's the example above:
  18. How to read analog expansion inputs

    I suggest that you use something like the AVG (average) instruction to read the input data into a DM register. For example: If you are using input 1 and you want to average 64 samples into DM100 then the instruction would be AVG 1 &64 D100. You can then compare the value in the DM register to the value you want to use as a setpoint. Note that the AVG instruction uses a buffer so this would use up DM100 through DM165 for data. If your setpoint was 1.000 volts then you can use something like an unsigned binary compare >= D100 &1200  to compare the averaged value to the setpoint and trigger your time delay. Even averaging 64 samples isn't a very long time if your program scan is around the typical 3 ms for a CP1L but with the time delay as a filter you should be ok.
  19. How to read analog expansion inputs

    The L14 only uses one input word (word 0) for the CPU digital inputs, so your AD041 module will use words 1-4 for the four input channels. You will want to set the input channel that you use up for 0-5vdc. The value of the input will range from 0 to 6000 for 0 to 5 volts. Your 0.4 to 2 volt signal will range from 480 to 2400.
  20. AD041-V1 CJ2 Special I/O Issue

    If the CPU has a memory card and dip switch 2 is turned on, it will transfer the settings stored in the memory card at power up. Maybe that's what is happening??
  21. omron cx-programmer version

    CX-Programmer is part of the CX-One package which contains everything that you need for communication. You can read programs from a running PLC . You can make program changes online while the PLC is running. You must place the PLC in program mode to download a complete program which stops the PLC.
  22. @(symbol)

    The @ symbol before a DM or EM address can also be used to specify a binary (decimal) indirect address. For example: If E0_1000 contains &25 then MOV #FF @E0_1000 moves FF hex into E0_1025.
  23. New laptop, comms errors

    The PLC and PC want to be in the same subnet, so you need to either change the PLC IP address to or change the PC to It is possible to communicate between subnets using routing tables, but it generally is a lot more trouble than it is worth. Omron uses port 9600 for communication. The port number generally soes not have any effect unless you are going through a router.
  24. New laptop, comms errors

    What IP address is the notebook set to? It must be in the same subnet.
  25. Particulate Measurement In CX Programmer?

    Don't forget to turn on the current/voltage switch for that input which is located behind the terminal block.