I suggested the G540 configuration because it includes PWM generator that you can use
with pncconf for setting up the the spindle, the 7I76 configuration does not.
On the halcmd, yes you need the driver loaded, as I mentioned:
Note that you can list all pin and parameter names when LinuxCNC is running with:
ENCA+, ENCA-, ENCB+, ENCB-, IDX+, IDX- are all physical signal names and are not present in hal
encoder hal pins and parameters will all have names like:
hm2_7c81.0.encoder.00.position
hm2_7c81.0.encoder.00.index-enable
etc etc
Where the 00 in hm2_7c81.0.encoder.00.position is the encoder number
with 7C81 7i78X2d or 7I78x3d firmware, encoder 0 would be on P1
If you want to use encoder 0 on P1 for the spindle encoder, you select encoder 0
as spindle encoder in pncconf. Similarly PWMgen 0 is on P1 with the 7I78 firmware
so pwmgen 0 would be selected for spindle speed control.