adccommunitymod (AutomationDirect) asked a question.

Modbus VB sample code

Created Date: September 19,2006

Created By: Ken

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Hi everyone, Does anybody have any VB code they could post that shows how to send and receive data using Modbus protocol. Thank you in advance for any and all help. Bet regards, Ken


  • adccommunitymod (AutomationDirect)

    Created Date: September 27,2006

    Created by: Ken

    Judging from the lack of responses it would seem that no one has any code to post or it's just to involved to get into it in this forum. I'm new to modbus and would like to see some code so I can better understand how it works. I 've read the standards and I can follow them to some degree but, looking at some VB code with comments would go a long way in helping me out. Thank you for any help you can give me on this subject.

    Regards,

    Ken

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 27,2006

    Created by: bcarlton

    Go to http://www.modbus.org for information on the MODBUS protocol. Then you can start into writing the extensive library needed to implement this code.

  • adccommunitymod (AutomationDirect)

    Created Date: September 27,2006

    Created by: Tech Guy

    I'd try over on the MODBUS.ORG forums.

  • adccommunitymod (AutomationDirect)

    Created Date: September 28,2006

    Created by: Ken

    Thank you for taking the time to answer my post. I did try Modbus.org and got a little better understanding but, for a newbe it was a little overwhelming in certain areas.

    MacS, that looks like something I can try and work with. That is to say go line by line and try to understand it.

    Once again thank you everyone for the input and if anyone can add to this post that would be great.

    Regards,

    Ken

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 28,2006

    Created by: Ken

    MacS,

    Would it be to much to ask if you could post the object form.

    Ken

  • adccommunitymod (AutomationDirect)

    Created Date: September 28,2006

    Created by: MacS

    Ken,

    I don't know what you mean by 'object form '. Do you mean main.frm?

  • adccommunitymod (AutomationDirect)

    Created Date: September 28,2006

    Created by: Ken

    Yes the main form (Form1.vb )

  • adccommunitymod (AutomationDirect)

    Created Date: September 28,2006

    Created by: MacS

    The VB source code is attached.

    There are many companies that have Modbus controls for use in VB that are much easier to use then the attached example. I have used the one from WinTECH ( www.win-tech.com ) in other projects and found it easy to use.

  • adccommunitymod (AutomationDirect)

    Created Date: September 19,2006

    Created by: Ken

    Hi everyone,

    Does anybody have any VB code they could post that shows how to send and receive data using Modbus protocol. Thank you in advance for any and all help.

    Bet regards,

    Ken