EasyManua.ls Logo

Azbil C1M - Page 223

Azbil C1M
306 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7-19
Chapter 7. CPL Communication Function
z
Compiling
The following is an example of compiling with Visual Studio 2019.
After launching x86 Native Tools Command Prompt for VS 2019 from the start
menu, compile using the cl command.
Example of execution results
C:\Sample>cl cpl.cpp
Microsoft(R) C/C++ Optimizing Compiler Version 19.29.30133 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cpl.cpp
Microsoft (R) Incremental Linker Version 14.29.30133.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:cpl.exe
cpl.obj
z
Running the sample program
This program reads and writes data using COM port 1. When executed, the
application layers of the instruction and response messages communicated are
displayed.
command:RS,14356W,2
result:00,0,0
command:WS,14357W,2
result:00
Example of execution results
z
Processing of the sample program
Setup for communication
Call open () and initialize the RS-232C port.
Executing commands
Set a desired character string in “command” and call AppCPL().

Table of Contents

Related product manuals