Well the global variable needs to be different and you should probably also use another timer or add rules to your existing timer to determine which encoder you turned.
I created an example that would be closer to your Maschine on this post. Give it a try.
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz