Appendix a: communications driver, Compiling and linking, Compatibility – Watlow CLS200, MLS300 and CAS200 User Manual
Page 85: Commands, Init_comm_port(), Compiling and linking compatibility commands
Appendix A: Communications Driver
Communications Specification 79
Appendix A:
Communications Driver
Compiling and Linking
The driver is compiled and linked with any Microsoft
™
compiler
version 5.1 or later. This code is probably compatible with many other C
compilers, but it has not been tested as such.
Include the file “def.h” in any module that contains calls to the driver.
Calls are explained in the Commands section below. A sample program
and makefile have been included as a guide to using the
communications driver.
Compatibility
The Anafaze Communications Driver is compatible with the CLS and
MLS family of controllers. If you have a custom controller with custom
data table values, you can change or add entries in the
Set_Comm_Params() routine in “cmmd.c” to reflect the correct values.
Commands
The driver package consists of four commands:
•
Init_Comm_Port()
•
Close_Comm_Port()
•
UpLoad()
•
DownLoad()
This appendix covers only the usage of these commands. Setting up
data, an interpreting status byte, etc., is covered in the Anafaze/AB
Protocol chapter in this manual.
Init_Comm_Port()
Use Init_Comm_Port to open and initialize the comm port that is
desired for communications.
BOOLEAN Init_Comm_Port(unsigned int com_port, BOOLEAN
hi_baud, char error_check);
unsigned int com_port; This is either COM1 = 0, or COM2 = 1.
BOOLEAN hi_baud;
Set TRUE for 9600 baud, or FALSE for
2400 baud.