VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

ModBus Communications Protocol

Tom Pydeski  (16 Submissions)   Complete Applications   VB Script   Advanced   Wed 3rd February 2021

This one is mostly for Controls Engineers.
Emerson Control Techniques manufactures Servo drives that communicate via the ModBus Protocol.
This was and old GWBasic version of the protocol that I think I got from Taylor Software 10 years ago.
I have adapted it for VB 6.0 (Win XP is my OS) using flexgrid to display the register contents. I also set this demo up to poll the physical I/O and velocity of an Emerson EN-208 Base drive. It can be adapted to communicate with any serial device that uses the ModBus Protocol.

Inputs
Enter the Node address; starting address; and quantity of registers to be read.

Assumes
Don't try to run this program unless you are connected to a valid ModBus device.

Returns
The contents of the queried registers/inputs/outputs.

Side Effects
I did not do a lot of commenting on this, so be warned that you may not understand some sections... Also, I am running on WinXP, so the beep function will not work on Non-NT OS's.

API Declarations
NTBeep and SendMessageBynum

Rate ModBus Communications Protocol (7(7 Vote))

Download ModBus Communications Protocol

ModBus Communications Protocol Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters