Digital Input Pattern
The Digital Input Pattern Tool will read the bit pattern from a set of IOs, i.e. it reads which IOs are on and off.
Using the Digital Input Pattern Tool
1. Go to the Digital Input Pattern's inputs page. Use the dropdown menu to select a starting IO.
2. The Number of Bits
is the number of IOs, starting with the IO selected in the inputs page,
that will be scanned. If the user sets the Number of Bits to
three and selects aux2 in the inputs page then the tool will scan aux2,
aux3 and aux4.
3. When the tool is run it will scan the selected IOs and record the results under Pattern in its parameters.
The pattern is
based on the binary bit pattern or squares of the number two. For
example, if the Pattern parameter comes back 5 then the first and third
IOs will turn on because 20 + 22 = 5. 20 represents the first IO and 22
represents the third (see the chart below). If the Pattern parameter
comes back 13 then the first third and fourth IO will turn on because 20 + 22 + 23 = 13.
1st IO | 2nd IO | 3rd IO | 4th IO | etc. |
20 | 21 | 22 | 23 | 2n |
1 | 2 | 4 | 8 | ... |
4. Invert Direction
can invert the bit pattern. For example, if the number of
bits is set to 3 and the Pattern comes back 3 then the first and second
IO are on. If the user sets Invert Direction to 1 (true) then the
same reading will come back as 6 because the bit pattern is understood
in reverse.