Do you develop commercial product or you do it for fun ?
I have almost finished my devices ( now they are in test phase). I have ethernet motion controller ( originally it was using USB, but I decided for ethernet for final version).I plan to sell plugin software + design ( so everybody can do it himself)
You are in the beginnig of the road with your motion controller - there are many things to go until you have it running.I can help you answering your questions, but for something "how can I solve it" - this sound like consultancy.
There are some examples in SDK ( in source code of old plugins).
I wanted to create open source motion plugin, but I ended up making it myslef in 99% ( there was no help :-( ), that is why this become commercial ( if you want it this way, contact me with private message).
About dwelling - in some cases ( like M3, when the spindle starts) you need to process Mach request to "delay" motion processing. You need stat machine in your plugin ( for this and e.g. jogging and homeing). Your plugin is "locked" until you finish the request.