Using async to run a motor to take measurements
I am currently trying to develop a test plan to take measurements of a control board that drives a motor that uses rs-485 for its communication protocol. I’m currently using C# to communicate with the board, I can send messages to the board and everything and get it running momentarily, but it stops almost immediately. I have tried several iterations of async methods to have it run as I probe it, but I needed to record measurements from the modbus registers as well. Holding registers are 40001- 400006. 40001 is rpm, 40002 is start motor, 40005 is to clear any faults, and 40006 is a heartbeat that needs to be maintained to keep the motor running. the values i need to read are from 30001 to 30012, hence the readwritemultipleregister command. my issue is, as soon as i start the code, it seems to send a single command to the controller, and continues with the rest of the measuring. any help is appreciated!