C # communication with Panasonic Fp∑ programmable controller

Source: Internet
Author: User
Tags visual studio

This paper introduces the communication between the host computer and Panasonic FPG-C24R2 PLC by introducing ActiveX control MSComm and programming with C # language, and gives the engineering example. The method is simple, reliable, easy to transplant, and has a wide application in industrial control.

Key words: C # serial communication real-time monitoring ActiveX control

First, the preface

The C # language is. NET technology, the core development language, is a simple, modern, object-oriented and type-safe programming language, it enables rapid application development, cross-platform deployment, access to the inherent resources of the platform, support COM and. NET technology, with the powerful functions of C + + language, The cross-platform features of the Java language and the convenience and rapidity of the Delphi language are many excellent qualities. Fp∑ is a small programmable controller produced by Panasonic Electric Co., Ltd. in Japan, it has many specifications, with small size, light weight, full-featured, simple programming, cheap and other advantages, in industrial control applications are very wide. This article compiles a simple communication program with Visual Studio. NET 2003 under Windows XP to explore the implementation of serial communication with the FPG-C24R2 PLC using the MSComm control.

Ii. Introduction of ActiveX controls

You must have MSCOMM.SRG, MSCOMM32.OCX,MSCOMM32.DEP files in your Windows system directory (note Winnt under System32), and it must be registered correctly. You can install VB6.0 to obtain, after installing vb.6.0, the MSComm control automatically registers on your computer, this is more convenient than manual registration control, Visual.Studio.NET2003 in Project Project (Solution) To insert a MSComm control: After you create a new program, click Tools-->add/remove Toolbox items (Add/Remove toolbox items) to open the Customize Toolbox (Customize Toolbox) dialog box, and then select COM Components (COM component) item, and in the presence of the control you can find Microsoft Communications control,version 6.0, select the item, and then click OK. You will see the phone icon for the MSComm control in the Toolbox Control Toolbox, and drag it to the form.

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.