Hello,
I have a set of pvs (created via an ai record and a substitution file) representing the channels of high voltage boxes looking like this:
BOX:<boxnumber>:<levelnumber>:<channelnumber>:read_volt
Now I'd like to have a record for each box, that displays if one of the voltage values is drifting away by using the alarm states of the ai record. The boxes are organised the following way: every box has 5 'levels' and each of them has 8 'channels' - so I have 40 voltage outputs per box.
I use a substitution file containing all used combinations, of box-level-channel.
Using a calc record (BOX:$(BOXNO):<levelnumber>:level_stat I compare if all .STAT fields of the channels of one level are 0 or not (as calc records cannot deal with 40 inputs I decided to seperate the evaluation in all channels from one level and then all levels from one box). The INP fields of the level_status record look like this:
field (INPA, "BOX:$(BOXNO):$(LEVELNO):0:read_volt.STAT")
field (INPA, "BOX:$(BOXNO):$(LEVELNO):1:read_volt.STAT")
...
Then I use another calc record that checks if all levels of a box are 1:
field (INPA, "BOX:$(BOXNO):0:level_stat")
...
Basically this works - I get a calc record that is either 0 or 1 depending if there is an alarm in one of the pvs or not. The problem is that some channels are not used and I'd prefer to not have them in my substitution file. Now lets say channel 7, level 4 of box 10 is not in use. Then there is a problem with the corresponding INP field in the calc record to calculate the status of the level because of this line: