Author Topic: Modbus RTU / TCP addressing  (Read 2002 times)

steerex

  • Newbie
  • *
  • Posts: 19
    • View Profile
Modbus RTU / TCP addressing
« on: May 09, 2016, 05:33:07 PM »
Hey Guys,

I hope this isn't too far off-topic. If it is, I apologize.

I have, like some other users, had some problems with MODBUS addressing. The project I'm currently working is AdvancedHMI talking to Automation Direct DL05's over MODBUS TCP.

I got tired of trying to figure out the mapping every time an address changed. So, I created a simple VB app to do all the calculations. Later, I may expand it to include other addressing schemes like Allen Bradley, Click, Omron, Etc...

The problem I have, not being a "real" programmer, is how to make the program so that it will install on other computers. In other words, how do I create an installation package that will resolve all the dependencies and optionally install everything for the program to run.

Is there a particular application that will build the whole install for me?

If anyone knows of an on-line tutorial, that's easy to follow, please let me know.

I have included a snapshot of the app.

Thanks, Steve Robertson

rbelknap

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Modbus RTU / TCP addressing
« Reply #1 on: May 10, 2016, 07:20:07 AM »
Steve,

That looks great.  You can use Visual Studio to create a simple installer. 

I don't know what version of Visual Studio you are using.I'm most familiar with 2010, just starting to use 2015.

Right-Click on your solution
in the Add popout, select New Project
in the Templates select the Visual Studio Installer type.
Pretty much follow the wizard from there.

It's been a while since I did it, but that should get you started.

Good luck,

Rich


steerex

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Modbus RTU / TCP addressing
« Reply #2 on: May 10, 2016, 01:23:19 PM »
Rich,

Thanks.. after much searching, I did manage to find a solution. Pretty much like you said but, with a few more details.

I am using VS 2010 since many of the newer versions just won't run on my older systems under XP. I am able to build most additional controls without a new version of VS by editing the solution file, in an editor, and changing the version (11 or 12) to 10. Occasionally, it still throws error but, for the most part works.

If anyone is interested, I'll upload the program.

Thanks again,
Steve   

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Modbus RTU / TCP addressing
« Reply #3 on: May 10, 2016, 07:12:41 PM »
Steve,

When I joined this forum, initially I was asking if anyone is interested in stuff that I created and/or found interesting.

At one point in time, I just decided to post pretty much anything without asking if anyone was interested (the posts would include links/solutions/controls...). This for as long as it doesn't infringe some copyrights or similar.

My suggestion to you, and everyone else, is to just do the same and if anyone is interested then they don't have to make any special requests but could eventually post a feedback afterwards.

For this last post of yours, could you provide links and/or details about solution that you found as well as your program?
« Last Edit: May 10, 2016, 07:14:59 PM by Godra »

steerex

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Modbus RTU / TCP addressing
« Reply #4 on: May 11, 2016, 06:19:28 AM »
Thanks Godra,

My thought was that this is a forum dedicated specifically to AHMI topics and the VB Build Process is a more general topic and maybe best left in a VB forum. At the same time, a Modbus Calculator program would seem to be a useful tool so, it certainly does fit the agenda. And, as you're likely aware, it's nice to get some affirmation about the value of one's projects.

Anyway, your point is well taken and I do appreciate the input.

That being said, there are some very good tutorials on how to build VS applications for redistribution. Users might find this one helpful:

http://www.technical-recipes.com/2011/how-to-create-an-installer-in-microsoft-visual-studio/

I have attached my ModBus calculator for anyone that wants to use it. While it is specific to the DL05, it shouldn't be difficult to create a similar application for different PLCs.

I don't have computer handy to use as a test platform so, it's possible it won't run on yours. If it's missing any needed components, I'll try to fix it but, might need assistance from some of the more VB literate folks.

Later, Steve Robertson

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: Modbus RTU / TCP addressing
« Reply #5 on: May 11, 2016, 01:21:07 PM »
I use Advanced Installer and it is wonderful for creating an simple install file that you can distribute among users. It's free and works great. I did post it several months back in a post.