I have the MOTION_STAT command working now and displaying its values in the debugger.
If the machine is not turned on and in estop mode the RMC_MOTION_STAT command gives this reply which is good:
rmctaskmain - Issuing RMC_MOTION_STAT -- ( +399,+8228, +8, 1,0.000000,0.000000,0.000000, +0, +0, +0,\000,\000, +0, +0,\000, +0,\000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000
If the machine is out of estop and turned RMC_MOTION_STAT command gives this reply which is bad.
libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 1072693248 is too large. (Use type long.)
libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 1058780665 is too large. (Use type long.)
libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 1563164632 is too large. (Use type long.)
libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 663211969 is too large. (Use type long.)
rmctaskmain - Issuing RMC_MOTION_STAT -- ( +399,+8228, +19, 1,0.000000,-nan,0.000000, +0, +0, +0,\000,\000, +0, +0,\000, +0,\000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000
This results in the "-nan" (not a number) error. The problem occurs due to line 470 in cms_dup.cc not having sufficient number of 9 digits to make a valid length comparison. The present length was likely fine in the past but this needs to increase to at least "if (x > 9999999999" instead of the present "if (x > 9999999".
This will result in the good response:
rmctaskmain - Issuing RMC_MOTION_STAT -- ( +399,+8228, +11, 1,0.000000,0.000000,0.000000, +0, +0, +0,\000,\000, +0, +0,\000, +0,\000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000
Text file for the above is attached.