Macro problem at startup and during program run.

First of all, a small introduction. I have built my own milling machine with a UC300 ETH_5LPT card. This machine is running very well for the moment.
Now I like to replace some buttons, and integrate it on a small touch screen control panel (Mitsubishi GT2107). I am using the Modbus_TCP protocol.
95% if this macro is working fine.
I have two problems:
1: when starting the software, the UCCNC software gives a problem that there is something wrong with the macro. When I enter a "Thread.Sleep (30);" at the beginning of this macro, this error no longer occurs. This line does give an extra delay in this macro, so I like to avoid this.
2: When I run a program it's not longer possible to give a "FEED HOLD" or a "CYCLE STOP" command via the operator panel. I've already looked at this topic on the forum: "http://www.forum.cncdrive.com/viewtopic.php?f=4&t=1506&hilit=modbus" but without a good result.
I am using software version 1.2113.
I am currently testing it in demo mode (DEMO_UC300ETH_5LPT).
Now I like to replace some buttons, and integrate it on a small touch screen control panel (Mitsubishi GT2107). I am using the Modbus_TCP protocol.
95% if this macro is working fine.
I have two problems:
1: when starting the software, the UCCNC software gives a problem that there is something wrong with the macro. When I enter a "Thread.Sleep (30);" at the beginning of this macro, this error no longer occurs. This line does give an extra delay in this macro, so I like to avoid this.
2: When I run a program it's not longer possible to give a "FEED HOLD" or a "CYCLE STOP" command via the operator panel. I've already looked at this topic on the forum: "http://www.forum.cncdrive.com/viewtopic.php?f=4&t=1506&hilit=modbus" but without a good result.
I am using software version 1.2113.
I am currently testing it in demo mode (DEMO_UC300ETH_5LPT).