It is recommended that you use the project file TECH.MDP for building the driver.
If you are familiar with the project development environment provided by Microsoft Visual C++, it's very easy to re-build the driver after you add any device-dependent code into the Tech Pack. When you have any problems regarding language itself, please refer to Microsoft Visual C++ on-line or printed manuals for help.
The following lists several basic steps that you may take to build an ONSPEC I/O driver with Tech Pack, and some hints that may be helpful for your work.
The I/O Template collects real-time data from and sends real-time data to the field instruments such as DCS, PLC, Controllers, Data Acquisition Equipment, I/O Cards/Boards. The data communication is usually accomplished through serial ports, network or direct memory access (DMA).
Start Microsoft Developer Studio from Microsoft Visual C++ program group.
Click File | Open Workspace... to load Tech Pack project file.
If you want to add extra modules to the project, click Insert | Files into Project....
Open DEVICE.C and USERCONV.C files, add all the device-dependent code into them.
Click Build | Build tech.exe to re-build the driver.
If the compiler or linker reports any error, check your code and fix it.
If no more error is reported, you will end up with an executable file TECH.EXE. The most important task remaining is to test your driver very carefully. You have to ensure that every function and feature works properly before you release it. In most cases you need to use the DEBUG tool embedded in the Microsoft Visual C++ language to debug the driver. Also Steps 5, 6 and 7 may need to be repeated many times.
Before leaving Microsoft Visual C++, don't forget to save all the changes you made to the disk.
To change the name of the driver, just rename TECH.EXE to whatever name you wish.