English 中文(简体)
What can I use to communicate with HMS AnyBus AB7007 gateway to PLC
原标题:

I need to develop a simple website to display some values that are inputted to a PLC connected to a hardware Gateway( HMS AnyBus AB7007) already installed that converts RS485 Modbus to Ethernet Modbus TCP/IP. I am developing my code using .Net (C Sharp)

As I am quite a novice in PLC interfacing, is there a component, AcitiveX control or dll etc (low cost or preferably free:) ) that I can use to communicate with this gateway and get the required values to display on my webpage. I am not aware if a webservice on this gateway already exists.

Any help is sincerely appreciated!

问题回答

The HMS AnyBus has a built in web server. It has to be set up correctly (see the manual here : http://www.hms.se/upload/110-3445-ABC-EIP_2_04.pdf) but can be used to serve, among other things, data stored in the input and output data areas of the device.

Check out the section on SSI (Server Side Includes) on how to use those special tags for including dynamic content in a web page. You shouldn t need any third-party software, at least I don t think so.

Perhaps to elaborate a bit - what you would do is set up a simple html document (with the SSI tags) directly on the AnyBus which displayed a list of the relevant data points you were interested in. If you were writing a page to be served from a separate server, your code there would query the web page on the AnyBus, parse the data, and format it however you wanted for output to your new, more elaborate, web document to be served from your main server.

Reading data via built in Anybus web server is too slow if you want to read many tags. Anybus is a gateway, and your Anybus model is a gateway between MODBUS RTU and MODBUS TCP networks. This means that it is a MODBUS TCP server for the ethernet side of the gateway, and it is just a TCP server at port 502 which you can access from .NET with library like this: http://code.google.com/p/nmodbus. Modbus TCP standard allows concurrent access, so you will not have PLC problems if you read data this way.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签