VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ModBus Communications Protocol

by Tom Pydeski (16 Submissions)
Category: Complete Applications
Compatability: VB Script
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

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.
Code 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

Download ModBus Communications Protocol

Download ModBus Communications Protocol (30 KB)

ModBus Communications Protocol Comments

No comments have been posted about ModBus Communications Protocol. Why not be the first to post a comment about ModBus Communications Protocol.

Post your comment

Subject:
Message:
0/1000 characters