This has been pointed out more than once already:
You have these lines in your HAL, setting parameters to values that are supposedly in your INI [JOINT_4] section
Code:
#*******************
# Tandem AXIS Z2 JOINT 4
#*******************
setp pid.z2.Pgain [JOINT_4]P
setp pid.z2.Igain [JOINT_4]I
setp pid.z2.Dgain [JOINT_4]D
setp pid.z2.bias [JOINT_4]BIAS
setp pid.z2.FF0 [JOINT_4]FF0
setp pid.z2.FF1 [JOINT_4]FF1
setp pid.z2.FF2 [JOINT_4]FF2
setp pid.z2.deadband [JOINT_4]DEADBAND
setp pid.z2.maxoutput [JOINT_4]MAX_OUTPUT
Yet in your INI there is no [JOINT_4] section at all. So I my opinion this config should not even load but fail with an error message.
Are you sure you posted the correct files?
[edit]
This hal and ini file combination would fail to load and give an error:
"INI variable [JOINT_4]P not found"
So these cannot be the correct files.