Thank you huythai for your reply,
Somehow I managed to operate the motor with KRL.
Currently, I use lots of SIGNAL, WAIT SEC and WAIT FOR, so the latency add up. But it has fulfilled the requirement I need.
I still have many things to learn, like SOE, PDO, and editing ESI. Once I have sorted these things out, I'll put a simple instruction of how I have done these. Hope that will help newbies like me.