Remedial latter logic.
Remedial latter logic.
(OP)
I have twenty identical logic blocks. Each one needs to block all the others from initiating until the active one completes.
I am looking at pages of relay logic to make each 'block'.
Any better suggestions?
Modicon.
Networks limited to 11 by 7 element arrays.
I am looking at pages of relay logic to make each 'block'.
Any better suggestions?
Modicon.
Networks limited to 11 by 7 element arrays.
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com





RE: Remedial latter logic.
In the case where order doesn't matter, you can sequence the blocks to run in series.
In the case where first come first run, you can use a double check. The first logic block checks to see if the holder is empty. If it is, it places its marker in the holder. On the next pass, it comes back to check to confirm that its marker is in the holder. Then it runs. This can account for sametime access conflict.
"Do not worry about your problems with mathematics, I assure you mine are far greater."
Albert Einstein
Have you read FAQ731-376 to make the best use of Eng-Tips Forums?
RE: Remedial latter logic.
The branch that runs holds the token, releases the token when finished, the remainder fight for possession?
Dan
RE: Remedial latter logic.
No the order doesn't matter. Basically it is a walk-up-to control system that the user can initiate a cycle(hydraulic)[one of 10 choices] by a switch. Cycles will probably take about 30 seconds. I want to prevent any other cycle from being started before the first selected cycle completes.
I was thinking of using logic like an OR on a data register but I haven't figured out how to get all the bits from the different cycles into the register. Only how to do the operations 'ON' the registers...
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
Sorry, couldn't resist. Turnabout is fair play!
RE: Remedial latter logic.
"Do not worry about your problems with mathematics, I assure you mine are far greater."
Albert Einstein
Have you read FAQ731-376 to make the best use of Eng-Tips Forums?
RE: Remedial latter logic.
I only screw up headings...
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
"Do not worry about your problems with mathematics, I assure you mine are far greater."
Albert Einstein
Have you read FAQ731-376 to make the best use of Eng-Tips Forums?
RE: Remedial latter logic.
Does your PLC have Jump functions? If so, make up a matrix that jumps the program scan to only one logic block until a flag tells the matrix it is completed. Essentially the matrix is your input selections going to Jump functions corresponding to your desired logic block, and it has a series of NOR command flags in front of it. No flags active, the matrix is read and a Jump is initiated to that selected block, which then sets a NOR flag in front of the matrix so it is no longer scanned again until that flag is gone, which only happens when the logic block is completed. This way your CPU doesn't need to scan all the unused logic blocks every time. Speeds up execution.
Eng-Tips: Help for your job, not for your homework Read FAQ731-376
RE: Remedial latter logic.
The chickens are not allowed into our mobile home, as all of the coon dogs on the porch block their ingress.
Also... I NEVER let my 14 year old daughter smoke at the dining table in front of her kids.
jraef; I shall investigate that.
Thanks
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
Nothing wrong with being a redneck.
An alternative is the sequential function in your PLC. In the Plantscape system, they are called SCM (Sequential Control Module?).
You can use the sequential function blocks to do the scan and initiate which logic to run, and then return control to the SCM after the logic is completed.
I find that using the sequential function blocks is the "easiest" for others to read my progamming.
Most IEC 61131 supported PLCs should have the sequential function blocks.
"Do not worry about your problems with mathematics, I assure you mine are far greater."
Albert Einstein
Have you read FAQ731-376 to make the best use of Eng-Tips Forums?
RE: Remedial latter logic.
Well, getting back to your original question, I would suggest
that if you have a "hit" from one of the pushbuttons, you
in addition to starting the process that you set a latching
coil that would not be turned off until the process is
finished. Ladder logic a normally closed contact with
the latching coil against all the 10 switches would "lock
out" the others until the one in process is finished.
Note that there will be a one cycle "lag" between the time
that the latched coil is set and it locking out the other
options, but that really shouldn't be a problem.
Hope this helps.
Cheers,
Rich S.
RE: Remedial latter logic.
You have enough time - use a sampled system with a PIC.
Plesae read FAQ240-1032
My WEB: <http://geocities.com/nbucska/>
RE: Remedial latter logic.
nbucska; If only I could.
Ah well.. the customer is king. It is interesting to go at something from a different direction occasionally.
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
I recently used this with a Automation Direct PLC to communicate with 5 other PLC's over a rs422 network. Each stage had one of the communications blocks and it's last line was the command to jump to the next stage once that particular communications attempt was complete. The whole program had 10 communications stages, 5 for writing to each PLC and 5 for reading from each PLC. I also put other logic outside of the stages so that it runs all the time.
The only issue I'm not sure about is the scan time for all the stages to catch the input. I would think it would cycle through all of the stages very quickly since the stages would normally not be doing anything so you wouldn't see a time delay when providing an input but you may see a time delay between providing an input and getting the output.
RE: Remedial latter logic.
It's been so many years since I did latter logic on a Modicom that it seems like earlier logic.
Can you give us a url to the programing instructions for the PLC you are using?
I started to write some suggestions and then realised that without even knowing the scanning protocal your device was using, I better get more information.
respectfully
RE: Remedial latter logic.
You mentioned:
"If only I could. I could have designed a circuit, laid it out, stuffed it, programmed it, installed it and tested it in 2/3's the time it's taken me to get this Modicon software going and waded through its "latter" logic. Not to mention the price of everything."
Ah, but think of the knowledge you have gained.
Although forced to use a PLC that is rather "complex" and
"expensive", there are other PLC's out there that may not
have the capasity of the larger PLC's, but are much more
economical. Entertron comes to mind for me. I believe
the president's name is Larry. A nice guy that has posted
here before.
And, although I can sling C with the best of them, ladder
logic programming *EASILY* solves a whole class of
logic replacement and control applications. Bunch of
switches and sensors, a bunch of outputs to motors, lights,
etc. No *REAL* time constrains, there 'ya go!
Soon there will be an open source PLC out there whose
hardware costs will be $2.00. No, not $20.00, or $200.00,
$2.00. I'm targeting for another month or two. We chatted
about this via email earlier. The others on this thread
might be interested.
With a $2.00 plc it opens up even more solutions to a much
wider class of applications. Embedded PLCs (at the board
level) usually isn't done, but it will be soon.
This little $2.00 critter is just a set of the PIC
micros. So, it would be wise to provide some protection
and interface electronics associated with the I/O of the
PIC. Still that's almost an advantage. You can pick and
choose relay, opto-isolator, open-collector, etc, etc.
So, say that you have a little $2.00 pic plc. Might have
6 or 7 inputs and the same number of outputs (as an
example). Well, think how quickly (now that you know
ladder logic programming) you can whip up a control system
sequence! Shoot, it's now the proverbial piece of cake!
Cool! That's why I didn't just brush off ladder logic
programming, just because I know conventional computer
(confuser) programming. It was a tool that I picked up
only a couple of years ago. The other languages were
*MUCH* (too much) earlier. Ladder logic programming can
be a real ace up your sleve!
And using multiple PLC's like LionelHutz has done allows
for a new programming paradigm. In the older days PLCs
were kind of "stand aloneish" or hooked to a bigger
confuser. Now, they are starting to form a multiprocessor
architecture themselves. Much more flexability and most
likely much faster implementation.
My suggestion is to stick with it!
Cheers,
Rich S.
RE: Remedial latter logic.
The only place I can find is a Snider "member site". And it only has one poor document relating.
Last night I figured out 'some' about PLC registers.
Taking for example the OR function:
If a contact closes the OR block ORs a register with the 'output' register then replaces the 'output' register's value with the result. Nowhere does the documentation explain how the registers ever got loaded with a number.
I would like all the coils to just be the values so I can do logic to "discover" if say 'any' coil is active.
Furthermore the OR function has one 'input' and one 'output' but according to the wee bit of information I have the output just exactly follows the input! It doesn't, say, follow the 'OR' like I would expect. (any bit set => output high)
Rich; While your project does sound interesting I am still trying to fathom the PLC project in front of me.
I also don't see how any PLC is going to sell for two bucks. I can't even buy a useful PIC for $2 let alone a board, screw terminals, IP, etc.
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
I don't know if my comments are any help but I hope so.
I am sure you are familiar with the basic electro mechanical motor starter with the start stop buttton.
In boolean logic, this is the equivalent of an and module, with the output or'ed with one of the inputs.
That would be:
Stop button, AND overload relay AND (Start button OR Output)
Back in the days of GE static Control Modules and hard wired Boolean, one of the modules available was a "Sealed And" which was an And with one of the inputs Or'ed internally with the output.
A PLC scans the Inputs and the logic and then solves the logic and sets the output.
Some scan a line and then solve the logic and set the outputs. Scan the next line and solve the logic and so on.
Some scan a block and solve the logic and set the outputs. Scan the next block and solve the logic.
I have seen models that would scan all the inputs and all the logic and solve the logic and set the outputs.
Sort of like block scanning with only one block.
The scanning protocal is a feature that may be used to advantage.
On a line scanning PLC, use relays on consecutive lines.
On a block scanning PLC, use relays in consecutive blocks.
Each relay will be wired similar to the three wire motor circuit with the addition of inhibit contacts in series with the start button.
You ladder logic will now have inhibit contacts added in series with the start buttons.
You may have to break your 20 inputs into several groups and add a relay in each group to inhibit all groups.
The resulting circuit will not work with relay logic, but may be demonstrated as valid for a PLC that scans and sets either lines or blocks.
You will have to arrange for your sequence control blocks to release the relays when a control sequence terminates.
If this scheme were implemented with relays or with a PLC which scanned all the inputs and logic before setting the outputs, you would have issues if two buttons were depressed at the time that a control sequence released the inhibit command to the start control circuits.
With a line based scan and solve or a block based scan and solve, it will work well.
Hey Keith, if this is related to your problem in any way, I can suggest a few more tweeks. If I have misunderstood the problem there is no sense in wasting any more of our time in this direction.
Many years ago, I tried to implement a shift register in a Modicom PLC. The documentation said that it had shift register capability, but not how to use it. Technical support basically was trained on the same documentation that was provided with the PLC. It took a while, and, I am ashamed to say, just a few mild, satirical observations, (Not my fault if my satire was interpretted as sarcasm), but I was eventually connected with a very nice person who was able to explain the procedure for addressing a shift register.
Respectfully
RE: Remedial latter logic.
The way this Modicon PLC works is that it has piles of SEGMENTS. You can have umpteen of them. It also has NETWORKS. You can have a bunch of NETWORKS in any SEGMENT.
A NETWORK is 11 columns of logic NODES by 7 rows. (77)
The PLC solves all this by starting at SEGMENT 1, NETWORK 1, NODE 1 and then running down the 7 rows of the first column of the this first NETWORK. It then hops to the top of the second column and works down. When it has done all 11 columns it drops down to the first column of then next NETWORK. Etc etc .
SEGMENT 1
NETWORK 1
NETWORK 2
SEGMENT 2
NETWORK 3
SEGMENT 3
NETWORK 4
NETWORK 5
NETWORK 6
SEGMENT 4
NETWORK 7
ad nauseum
I believe some of this 'path of solution' is what causes me headaches in that when I'm 'online' and see the green wave of 'ON-ness' sweeping across the LL from left to right the right stuff never turns green. This has led me to think some left-side logic wasn't needed. So I remove it only to discover I have broken my function. LOL
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
Are we up against the "If it ain't broke, FIX IT" and if it works, CHANGE IT" school of design? LOL
Can you confirm a couple of my assumptions please?
Assumption #1. This is programed in ladder logic.
Assumption #2. For a small segment, the scanning will be in the following order: Scan order denoted by S1, S2, S3, etc.
First option
Segment 1
network 1
Column 1 Column 2 Column 3
Row 1 S1 S4 S7
Row 2 S2 S5 S8
Row 3 S3 S6 S9
Solve Solve Solve
Logic Logic Logic
Second Option
Segment 1
network 1
Column 1 Column 2 Column 3
Row 1 S1 S4 S7
Row 2 S2 S5 S8
Row 3 S3 S6 S9
Solve
Logic
Third Option
Segment 1
network 1
Column 1 Column 2 Column 3
Row 1 S1 S4 S7
Row 2 S2 S5 S8
Row 3 S3 S6 S9
network 2
Column 1 Column 2 Column 3
Row 1 S10 S13 S16
Row 2 S11 S14 S17
Row 3 S12 S15 S18
Solve
Logic
Segment 2
End of third option.
The place in the diagram (Relative to nodes, columns, rows, networks, and segments) where the PLC stops scanning to solve logic and set outputs is very important.
And a question, can you define a relay or output in one network and call up contacts from it in other networks and/or segments. I assume the answer is yes but it's best to confirm.
Respectfully
RE: Remedial latter logic.
According to the Modicon book of PLCs.. It is the first option EXCEPT the logic is 'solved' after each node not at the bottom of a column.
http://i5.tinypic.com/11t1kyx.jpg
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
You may have better luck keeping your "Networks" as small as possible.
I would not use more than one coil or output per network.
If I understand the scanning correctly, that would give the closest operation to line by line scanning.
I'm on my way out the door. I'll have more time tommorow.
I have a tendency to try for full utilization. Get as many commands on a line and as many lines in a network as possible.
With this PLC I think that I would try to reverse my tendencies and use as many networks as possible.
My previous comments re: design were directed at Modicom, not you. The few modicom models I have worked with each had a completely different scanning protocol. I Hope I didn't inadvertantly offend you.
And I have more than once resorted to the "Poke it with a stick" school of troubleshooting, with surprisingly good results.
Respectfully
RE: Remedial latter logic.
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: Remedial latter logic.
If you know what I mean by "You don't have to study "Civil Engineering" to be a "Civil Engineer", then you read the same thread as I. LOL
I hope GE accepts this as humor and not a dig.
Respectfully