jamesau

MrPLC Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jamesau

  • Rank
    Hi, I am New!

Profile Information

  • Country United States
  1. PLC-5 subroutines

    Well, there will be plenty of people who won't like this (will speak to it later), but here goes... Don't use MOV, use COP. If you have enough duplicate machines to justify this, you can very carefully arrange your database and I/O (plan for spares too). You arrange contiguous registers and structures (timers, counters, etc) so that each machine has the same structure. You also create a 'workspace' area of registers and structures on which your subroutine will operate; this workspace area will correspond to a typical data structure for a trolley. You may also have a common area within the subroutine for housekeeping, etc. Then for each trolley, map inputs to input trolly register, use COP to copy trolley registers to workspace use COP to copy trolly structures to workspace execute logic on workspace with subroutine return from sub and use COP to map back from workspace to trolley registers/structures map output register to trolley outputs next trolley This takes much planning and testing because field troubleshooting is more difficult should you do it this way. Don't do this if you don't plan on also incorporating extensive and comprehensive self-diagnostics to assist in normal troubleshooting. This includes alarming/messageing to tell the operator what the trolley may be waiting for, why it's interlocked, and what permissives are required, and which aren't set. When developing systems, try to do it so that after it's deployed someone doesn't have to look into the code to figure out why something isn't working.