8.3 Programming I/O

According the feature list, it mentioned EDG-4508+/4516+ provide the D/I AND D/O handling function. In order to help customer to create the I/ O event handling environment. We provide a programmable I/O sample program for customer use. After installing the EDG COM Port Utility, the sample programs will be on the location as follow:

C:\Program Files\Advantech\EDG COMPort Utility\samples\vc\ edgevtio.

How to use the sample files?

(1) The sample programs include following file and the develop envi- ronment is based on Microsoft Visual C++.

edgevtio.cpp

edgevtio.dsp

edgevtio.dsw

edgevtio.ncb

edgevtio.opt

edgevtio.plg

mbtcp.h

(2)Compiler the sample program

(3)Run the sample program

After compiler the program and run the program, the system will change to Server mode to trigger any D/I event and sent back to sys- tem to active the D/O event.

(4)You can modify the program and create your own event handling process.

(5)Sample files list and description as follow:

edgevtio.cpp : Defines the entry point for the console applica- tion.edgevtio.dsp

edgevtio.dsp : Microsoft Developer Studio Project File

edgevtio.dsw : Microsoft Developer Studio Workspace File

edgevtio.ncb : Microsoft C/C++ program database edgevtio.opt

edgevtio.plg

mbtcp.h

In this sample files, we provide the note for the parameter for program- mer use.

For example:

In edgevtio.cpp file content, line 32 to line 41

EDG-4508+/4516+ User Manual

90

Page 102
Image 102
Vicks EDG-4508+, EDG-4516+ user manual Programming I/O, How to use the sample files?