Sample Program

Contains send and receive sample that show how to use basic usage.
Please refer to it along with the contents of the Tutorial and use it for program development.

 

Appearance

  

  This is the appearance of the .NET6 sample program in Visual Basic .NET.
  TThe appearance of the sample program differs depending on the version and development language used. Thank you for your understanding.

 

Overview

  - The content of the sample program differs depending on the language used.
    For NET6 and .NET Framework, this is a sample program that shows how to use basic usage of SerialPort class.
    For Visual C++(MFC), this is a sample program that shows how to use basic usage of Win32 communication API functions.
    For Python, this is a sample program that shows how to use basic usage of the PySerial module.

  - Transmits the data entered from the keyboard serially and displays the received serial data on the screen.
    By default, the received data is displayed when 16 bytes have been received.

    For Python, data can be received up to 50 characters at a time.
    If the received string is less than 50 characters, it will timeout in 1 second and display it on the screen.

  - Initial values of communication parameters
    Baud Rate: 9600, Data Bit: 8, Stop Bit:1, No Parity, Full Duplex, No Flow Control

 

Folder structure

The sample program folder is configured as follows in the location where the COM-DRV(WDM) development environment is installed.

 Samples\

               |

               |

               |________ VB\

               |         |________ DotNetFramework4\      Visual Basic.Net (.NET Framework) Samples

               |         |________ DotNet6\               Visual Basic.Net (.NET) Samples

               |

               |________ VC\

               |         |________ Vc2015\                Visual C++ (MFC) Samples

               |

               |________ VCS\

               |         |________ DotNetFramework4\      Visual C# (.NET Framework) Samples

               |         |________ DotNet6\               Visual C# (.NET) Samples

               |

               |________ Python\

                         |________ Python3\               Python Samples

      

Note: The underlined part is the default folder name of the COM-DRV(WDM) installer.
      If the default folder name is changed during COM-DRV(WDM) installation, it will be changed.

 

Project Name

Development Language Project Name
Visual Basic .NET SerialPort.vbproj
Visual C# SerialPort.csproj
Visual C++ (MFC) SerialPort.vcxproj
Python comwriteread.py