This functionality can be accomplished using an indexed user variable and the CALCVA, CALCVV instructions:
With these commands, it is possible to index a user variable with the X-register for the COMP threshold, and then change it whenever it's needed. You can then use CALCVA COMP <var> to generate the conditional jump (JC) input status flags. For more information, please ensure your solution has the latest TMCL firmware and consult the TMCL firmware manual on your platform's Trinamic webpage.