Several realms of OPC server development

Source: Internet
Author: User

OPC server development is more difficult than OPC client, the development of OPC server mainly applies COM technology, the main application of books for Pan write "com Getting started and applications", a lot of technology has a great reusability, after the development of a program, Basically all the stuff can be reused and republished.

There are three ways of development:

1. Simple: It is the application of such as DDE to OPC or serial to Opc,modbus to OPC and other software to turn your device into the relevant OPC server. The method is simple and practical, the cost is reasonable and fast, so that you immediately catch the OPC Express. Main flaw: Your device must be compatible with standard equipment or more standard equipment. This method is more suitable for the rapid transformation of products manufacturers, or the provision of OPC related products.

2.. General: The application of third-party development package development, this method is relatively less difficult to develop, and the third party has the corresponding technical support, developers specializing in this product, the product has a certain degree of stability. This approach is dependent on the development package, and the stability of the OPC server relies on the development level of the third party. This method is suitable for the boss to ask you to develop the OPC product is ^_^, or the novice use. Domestic related development package has Huafu and forest development package.

Foreign reference: Http://www.opcconnect.com/source.php above can also, but now found there are dead links, but his hints are really good.

3. Difficult: Apply COM development. This way of development is the most can learn things. But need to have a certain foundation, and need to have a certain degree of knowledge of English. The main involved in the knowledge there are a few points.

    1. Have a certain experience in C + + programming---code must be written
    2. can apply the VC development environment--no dragon knife How can you do it?
    3. Mastering a certain COM knowledge------Advanced stuff
    4. Read the relevant OPC development document----Sunflower treasure
    5. Development-------------own kill pork to be delicious
    6. Hash table related content, mainly for a large number of nodes when the query--killing in the invisible

Basically according to this learning idea, for the first two there are too many introductions, here do not say.

COM Technology learning can refer to vchelp http://www.vckbase.com/com content, other sites are casually said just. Books can see Pan's "COM Principles and Applications", "com Essence" and other books.

OPC documentation can be seen in data Access Custom Interface and OPC Common definitions and Interfaces.

Source code can refer to LIGHTOPC and GE source code, if there is no back that can send me an email, as if the Internet does not provide download

The

OPC server source code download Http://download.gongkong.com/file/2004/9/21/opccode.zip

GE's program is well written and clearly structured, but it is too old for us to aged respected.

LIGHTOPC program is relatively too much, feel the structure is not too good, a bit messy, it may be I did not go into.

Hash of the east I have not touched, but the data structure has been learned, rapid positioning. Now the memory is so big, realize a little hash

Table, you can, of course, a good hash function is not limited. This is the development process to consider.

As for the development is not certain to use MFC and ATL to see yourself, do not need to, can also be used. The feeling difference is not too big, if does not have to learn, because these two are not so easy to grasp. But COM will need to know.

There are no good or bad points for these three methods, only look at your needs. The more time you pay, the less money you pay, the more flexible and the more you learn, and that's social law. In the field of industrial control is to choose the most suitable.

I am now reading the source code began to develop their own OPC Server, I hope that more colleagues to discuss.

Several realms of OPC server development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.