I've solved a similar problem, but it's been years so I don't remember the exact behavior.
I turned each command into a two step macro. The macro consisted of the command I wanted followed by a command from a brand of equipment not used in the system. It seemed that this made the component I was trying to control recognize that the wanted command had finished, so the equipment stopped responding to the wanted command.
A good answer is easier with a clear question giving the make and model of everything. "The biggest problem in communication is the illusion that it has taken place." -- G. “Bernie” Shaw