Jamie,
Your problem that your experiencing is unclear, can you elaborate more.......? Having said that, I run PLCs from my M6, and other things.
You will need to syncronize your scripts with the PLC in a "Hand Shake" style arrangement.
let me give an example:
In your M6 you turn on a ULED, the next line you set a UDRO to a tool number, the next block is a while loop waiting on the ULED.
the brain transfers the info to your PLC, the PLC sees the ULED is on, and jumps to your substage. The substage pulls the UDRO and does
the tool change function you wrote. At the end of that change, the PLC, turns off the ULED, the brian sees it and turns off the ULED, the while loop drops
out. your next code updates the tool dro to the new tool.
scott