Note that there is an enhanced message component in master that supports up to 64 messages which you might be able to install on your system using the 'halcompile' tool. (this tool will require installation of the 'linuxcnc-dev' package)
github.com/LinuxCNC/linuxcnc/blob/master...ponents/pushmsg.comp