Perhaps make two macros, one before a x axis move, then one after an x axis move, that turn off then on an output that controls your brake.......
Or...........
in your PLC script, use the mc calls to watch for x axis is moving and if true, turn on or off your output that goes to the brake.
Scott