I struggled with this for a long time, and eventually I got a solution, but it was ugly, and I hope to get a little wisdom from the stackoverflow community on how this should be done.
Basically, I work with motors that connect to a computer using the built-in USB connection, and I have to communicate with them using the SerialPort class in .Net, and through some driver installed on the computer, it talks to the motors via USB.
The problem is that the motors are connected in series, and when I ask
for information from one or tell him to do something, I need to wait until the result returns before doing anything else with this engine or with any other.
I just did not have enough time, and I am sure that there are more effective ways to work with serial communication, which I have never encountered. Are there any good recommendations or recommendations for this kind of thing? This is a pretty standard thing to do (serial communication β usb through the driver installed on the computer).
I work with six IMS MDrive23Plus Motion Control engines .
I can provide more details, but I'm not sure if this will result. Hope this is specific enough for StackOverflow, although I know this is kind of vague. I just donβt know how best to ask.
In fact, what does this apply to, how to synchronize communication efficiently and how can I wait and read data efficiently? I know this is probably very simple for some people, but it just doesn't work well for me.
Max schmeling
source share