Sometimes we hear from people who are using Opto 22 hardware with another company’s software, including long-gone Paragon. The other day we had someone ask about their “TTB” and how that might look in a flowchart or OptoScript.
I took a stab at an example, based on some old documentation (a small snippet included below). The example may also be of use to those wanting to learn OptoScript vs. flowcharts.
Paragon doc/example:[INDENT]The Truth Table shown below illustrates how these functions are set up.
Step 1: This step is used to clear the internal coils and set the outputs and coils to 00000000 0000000000000000 for a fall through condition (no other steps being true). This step is always true because we do not care about any of the inputs or coils. (As a result, the block will set the Step01 output to a 1.)
Step 2: If ALL inputs are high, turn on the DigOut01 digital output (16 input AND gate).
Step 3: If at least ONE input is high, turn on the DigOut02 digital output (16 input OR gate).
Step 4: If the inputs on DigIn01…DigIn08 match 10011101, turn on the DigOut03 digital output (8 input decoder).
Step 5: If DigIn07 is low, set the digital outputs DigOut01…DigOut08 to 10010110
Step 6: If DigIn01, 2, 3, or 4 are low or if DigIn05, 6, 7, or 8 are high, set the DigOut09 digital output.
_ Coil ___ Input __________ Coil ___ Digital ________ Matching
_ Pattern_ Pattern ________ Output _ Output _________ Criteria
1 … … 00000000 0000000000000000 ONE
2 … 1111111111111111 … 1… ALL
3 … 1111111111111111 … .1… ONE
4 … 10011101… … …1… ALL
5 … …0… … …10010110 ALL
6 … 00001111… … …1… ONE
[/INDENT]Here’s what similar logic could look like in a flowchart or OptoScript (I’ve individually named each point, because that’s generally easier to follow than a bitmask like Paragon seemed to require, above).
Here’s the overall flow and contents of that first condition block:
Any other Paragon users/examples out there?