Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb.net to micrologix plc

Status
Not open for further replies.

kcor

Electrical
May 5, 2007
2
i have a micrologix 1100 plc, that i can connect to using the built in webserver and view data in the plc using internet explorer.

Question - If i download the free vb.net will i be able to create a application and then create a bargraph or a dashboard type speedometer that is linked to a register in the plc and use that register value to control the bargraph or dashboard type speedometer.
If so, could someone possibly post a example on how you would accomplish this.
I have no background in vb at all, so any advice would be greatly appreciated.

Thanks
 
Replies continue below

Recommended for you

There are two questions here:
1) is the task possible?
2) can you do it?

Clearly it is possible. However I don't think you will be able to do it in any reasonable period of time. Sorry, but there is a world of difference between using a browser and writing a TCP/IP interface, even starting from an example. The fact that you have no experinece with VB.NET is the clue. You would have picked C++.NET or C#.NET if you had experinece with those languages, so it seems from the scant data available that your programming knowledge is quite small. If I am wrong on this then please don't be offended; I am just trying to fill in the gaps in your post.

I think the current system is sending HTML code to the browser. This is not what you want for your application. You would want to make a direct TCP link using a TCP socket. If the manufacturer can't supply an example program for this then anyone would have a difficult time. then you need to write a socket at the other end.

Your best bet is to ask if they have Labview drivers. National Instruments graphical programming interface Labview is designed to do what you want.
 
Well no my program experience is not with vb, but i have 26 years of designing automated equipment with allen bradley, omron, mitsubishi, siemens, but no vb.
Have written hundreds of programs using the hmi's for the above, but now some of our management folks have asked what would it take for them to be able to bring up some equipment in one of our plants in europe,asia,china,etc. and view production, effieciency, etc.
I looked into using indusoft, iconics and a couple of others, but thought if I could start to learn vb.net, I could learn to write a file that you could start and with some animated type graphics be able to show these type of things.
can do this with excel with the ab plc's that we have that are webenabled. But without the facy dashboard type items.
The excel route was very cheap to do, I know vb would not, but since it was a free download, I was hoping someone may share a sample that they may have done.
Its okay you discussed how little programming skills that I had, no problem
 
Hiya-

If you don't mind going with other free software there are other programming packages that one can use.

If you have access to a "standard" server, there are many different solutions to solving your problem.

a. Perl or C with a cgi-bin interface on the web server. This approach allows the html code to refresh it's page from a "special directory" that has a script or program executed every time the page is accessed.

b. Dynamic scripting language like PHP in place of VB.net. This could be incorporated with a standard database like MySQL or Postgres to interrogate the last entr(y)(ies) or a logging program like round robin database (rrd) and form the graph desired using a graphing package like gd.

c. Just use rrd directly. You can find it on the web at:

The above 3 solutions have somewhat of a downside as implimented. BTW, I've used all three in the past. The problem is that the entire page is refreshed each time. This could lead to some time delay and some additional bandwidth on the network.

Alternative programming models that don't have this limitation include:

a. Java. However this could be slow with the engine running on the clients if they are of slower performace. Also the java engine can be painfully slow to be loaded the first time off the web. It took over 1/2 hour many years ago when I had to download the client engine on an analog line.

b. AJAX (asynch javascript and XML). This uses a special request that will allow the javascript program in the client to request an update for a portion of the page (one of the elements) from the server which it can then update the portion.

All of the above are either open source (I think with the exception of Perl on Windoze. Active Perl on Windoze is free but closed source). Also, it looks like RRD is only in the 'nix side of things and uses Linux, BSD, or any varient of Unix).

One or more of those with an Apache http server shoulg get you on the road. However, you might find the learning curve somewhat steep.

Hope this helps!

Cheers,

Rich S.
 
I think anyone can make a simple vb application. You may be able to do what you want with nearly any MS Office application. Office comes with VBA (visual basic for applications) and contains a decent library of active-x controls. If nothing else, you can use it to learn how to make simple applications and use active-x controls.

I'm not going to go through the keystrokes here, but basically you want to create a form and place the approprite active-x control (bargraph, speedometer, etc) on the form. If you don't like the available controls, there are thousands of different ones out there for sale. Depending on the format of the data, you may be able to set the control's data-source property to automatically read data off the web page and automatically update. (Just like you would with a control in an HMI). In the worst case, you'll have to write some code to capture the data and put it into the control's value property.
 
The web server in the MicroLogix is not user-configurable. That is, it's not the "standard" web server that Rich is referring to. AB does make web server modules for the CompactLogix and ControlLogix platforms that enable you to do exactly what you're describing, however. Check out the 1768-EWEB and 1756-EWEB, respectively.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor