Skip to content

Find a better name for "CHNO" in analog inputs and similar things #30

@AndreFavotto

Description

@AndreFavotto

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions