Jump to content

Faster readout of data through COM Port (Modbus)


Recommended Posts

[English]

Hy!

I read out a controller of a BergerLahr axles via RS232 (with an "RS232 to RS485" adapter) and I

use the "Modbus" protocol to do this task.

Everything works fine, but the readout rate is too slow... I am only able to achieve a rate

of approx. 10-15Hz to get the data.

Is there a possibility to boost the readout value ... (the more the better)?

- in the attachment there is the screenshot of the VI (auslese01.JPG)

- the VI itself (auslese.vi)

- and the modbusprotocol f

Link to comment

I'm not sure if you can get the cycle "PC sends -> controller receives -> controller sends -> PC receives" to run any faster. It's possible that the controller itself is limited in how many times a second it can respond to your requests.

One thing to note about your code is that you're building an array inside a loop. This requires LabVIEW to keep allocating memory all the time and can slow your program down or even crash it eventually.

You're better off making an array large enough before the loop and replacing elements inside it.

Link to comment
  • 2 weeks later...

Hey!

In connection with LabView Support we managed it to "boost" the thing... now it is possible that I am able to get data each 10ms (more than 15x faster)... so my measurement is a lot faster than before. (A "Wait" command was adjusted in the modbuslib, so that an important part of the VI runs every 1ms instead of 10ms)

Thank you for your help!

Harry

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.