I use a ModBus kit to read 100s of registers from my PLC. This registers are read to a integer32 table. Is there a simple way (using pointers) to have single integer variables pointing to selected table indexes. The code at the present, run every cycle:
nMotor1Isolated = ntStatus; nMotor1Tripped = ntStatus; nMotor1RunMC = ntStatus; nMotor1Running = ntStatus; nMotor2Isolated = ntStatus; nMotor2Tripped = ntStatus; nMotor2RunMC = ntStatus; nMotor2Running = ntStatus;
and so on…
Is there a way to use pointers and assign only once on startup?