I have been working with the NI Modbus VIs now for the past 4-5 months to communicate with an AC Motor Drive...
I have no problem communicating, sending and receiving messages or anything like that... but as my program and the project it deals with gets more complex... the inner workings of these VIs have more recently gained my attention... With special attention to the seemingly long delays in a typical modbus query.
The problem that brought on this investigation was when I tried reading an encoder position off the AC motor drive, 32767 counts per rev. I noticed each query took on average 50mS to respond... this is quite unacceptable as I need 5 mS between data points... AT MOST. I am trying to read torque as the motor rotates at a very slow rate along with the encoder position readouts, this will allow me to interpolate the torque reading to the angular position of the motor.
I can take that data and make a cool polar coordinates plot of the change in torque in respect to angle so you can see the different torque spikes with respect to the angle of rotation of the motor... soo cool!!

........ but Im getting off topic.... sorry I get excited.......
So I suppose my first round of question become... where is this delay comming? I know the modbus requires certain delays to wait for the devices to respond to queries and such. TWO delays in question are posted in pictures below, and are found in the MB Serial Receive. I can only assume these delays are necessary to assure all the proper data sent out is read. These two delays still only account for 20mS of the 50mS delay it takes to query the drive through the LabVIEW modbus commands... I am running 19.2 KBaud which is the fastest the drive allows... but it's still not meeting my needs. Literature on MODBUS leads me to believe that data reads/writes are dependent on CPU speed, and even a slow processor by todays standards should more then meet my needs.
Just to recap , I am using MODBUSRTU, 19.2 KBaud, RS-232 serial cable, reading a register address off an AC Drive, getting a 50mS delay between queries using "MB Serial Master Query.vi"
Im am trying to narrow the problem down... I've expressed concern that the queries to the Drive seem slow, but the Drive guys will pin the guilt on labview.... and I know us Labview gurus would question the Drive's speed. So let's just start with these two delays found in the MB Serial Receive.vi .... maybe go from there??