Currently, for analog inputs (and also for others) we have a macro named "CHNO", standing for Channel Number, used as Asyn Index:
|
field(INP, "@asyn($(MOTOR_PORT),$(CHNO))$(ASYNPARAMNAME)") |
The name induces the user to think this is related to the PLC Analog input channel number (at least it was the case for me, hence this issue, maybe I misinterpreted something?).
Today I understood that this CHNO only needs to correspond to what we find after the hash in the PILS definition, and is not related at all with the PLC input channel number:
sName := PressureSensor#1 -> CHNO=1
sName := PressureSensor#2 -> CHNO=2
sName := SESlitPosition#0 -> CHNO=0
sName := Anything#1 -> CHNO=1
So far the pressure sensor coincidently matched the PLC and the # index, so it always slipped by.
I propose something that avoids double interpretation, like SNAME_IDX for instance.
Currently, for analog inputs (and also for others) we have a macro named "CHNO", standing for Channel Number, used as Asyn Index:
m-epics-ethercatmc/ethercatmcApp/Db/ethercatmcAnalogInputSmooAdelMdel.template
Line 7 in 44e9f45
The name induces the user to think this is related to the PLC Analog input channel number (at least it was the case for me, hence this issue, maybe I misinterpreted something?).
Today I understood that this CHNO only needs to correspond to what we find after the hash in the PILS definition, and is not related at all with the PLC input channel number:
So far the pressure sensor coincidently matched the PLC and the # index, so it always slipped by.
I propose something that avoids double interpretation, like
SNAME_IDXfor instance.