Houdini time.
If I were to try my hand at it, I would do something like this:
First, I would put something that's out in the open, that LOOKS like its doing the counting, like so:
I:2/10 +-------- CTU ---+
----| |--------| Counter: C5:0 |
| Preset: 32767 |
| Accum: 0 |
+----------------+
Now, I would obfuscate the
REAL counter, so that any ol' maintenance guy, won't know that this is the counter.
+-------- MOV --+
-------| Source: 90 |
| Dest: N12:25 |
+---------------+
+-------- COP ---+
-------| Source: #I:1 |
| Dest: #B13:4 |
| Len: 2 |
+----------------+
B13/[N12:25] +--- ADD --+
---------| |-------[OSR]-----| N12:17 |
| 1 |
| N12:17 |
+----------+
A couple of comments:
The above rungs should be scattered throughout the program.
The addresses N12:25, B13:4 (and 5) and N12:17 should be in the middle of some data file, intersperced among other used addresses. You don't want these to stick out. And of course, comment them with something that sounds normal for you system.
The "90" used in the first rung makes the address B13/[N12:25] = B13:90 = B13:5/10, which is the location of the mapping from I:2/10 in the COP.
Now for one more piece:
+--------- MOV --+
---+----| Source: 30 |
| | Dest: S:24 |
| +----------------+
|
| +------------- MOV --+
+----| Source: N12:17 |
| Dest: #T4:30.ACC |
+--------------------+
Some important points:
You need to set S:2/3 - "Index across Data Files".
You need to make sure that the # is in front of the T4 address. This is Indexed addressing, and so N12:17 won't write to T4:30.ACC but 30 words off of it (to T4:40.ACC)
You need to make sure that T4 is only 39 words long. Since there is no T4:40.ACC, the value will go to the next data table (C5), and thus land in C5:0.ACC.
So, the counter will have the correct count, and will, to all appearances look like it is actually counting. There will be no cross-reference, search, or ANYTHING that will show that its being used anywhere but on the one rung.
But the rung is a fake. The real work is done elsewhere. But the source can't be traced either. I:2/10 is only used in one place in the program - and that's at the dummy counter.
This should drive the maintenance guy crazy.
Unless, of course, he subsribes to this forum......