I think that the problem is at least partly caused by you using a simulator config as your sample file, so all the stuff related to moving hardware is missing.
If you have a 3-axis config then adding more axes isn't particularly difficult.
The INI will have three sections like
[AXIS_0]
...
[AXIS_1]
...
[AXIS_2]
You just need to copy and paste those a few more times up to [AXIS_4] (for an XYZAB machine, you would need to go as far as [AXIS_5] for an XYZAC machine)
You also need to change the entry for [TRAJ]AXES and the [TRAJ]COORDINATES to XYZAB.
Then in the HAL file, you will have entries for the connections for each axis. Again, just copy and paste them and increase the index numbers for things like encoders and INI file entries.
It might help to know that, for example, your error message
./core_sim_XYZAB.hal:52: Ini variable '[AXIS_0]P' not found.
mean that in line 52 of the HAL file core_sim_XYZAB,hal file the code is looking for an INI variable that is not there.
ie the HAL has: setp pid.x.Pgain [AXIS_0]P
but the INI file does not have an entry called P in the [AXIS_0] section.
The topic has been locked.