--- Quote Start ---
Looks like you either need to incorporate the command setting logic into the command executing state machine, or at least you need the state machine to be able to communicate with the command setting logic (to reset the command or whatever you need to make the design work). As Tricky said, very hard to give advice from such little information.
--- Quote End ---
That's the problem. I'd gladly reset ram_command in the second process. But I get Error (10028): Can't resolve multiple constant drivers for net. So I dont know when I'm good to reset the signal.