GE GFK-0804B 用户手册
![GE](https://files.manualsbrain.com/attachments/ab9edb4caba5619c2fde3c8024ebd3386de893ab/common/fit/150/50/5e42700264754ddc6c8abde125a62fae9215a8ad130cb92d4b61e1d54d06/brand_logo.jpeg)
B
B-8
Micro PLC Programmer’s Guide – Aptil 1994
GFK-0804B
Communications Functions
The MCROCOMM.C file contains a driver that implements the following functions. Note that a driver
function is not available for every feature supported by the underlying protocol.
function is not available for every feature supported by the underlying protocol.
Microsoft C (Large Model: Compile w/ -AL Option)
H Function
: Read Register
Call
: int
MCL_Rreg (port, memtype, addr, count, buf);
Inputs
: int
port;
/* 0–COM1, 1–COM2
*/
int
memtype;
/* 0–IR, 1–OR, 2–R
*/
int
addr;
/* Adrs. of the 1st register to read
*/
int
count;
/* Number of words to read
*/
Return
: int
*buf;
/* Data read
*/
True / False
H Function :
Write
Register
Call
: int
MCL_Wreg (port, memtype, addr, count, buf);
Inputs
: int
port;
/* 0–COM1, 1–COM2
*/
int
memtype;
/* 1–OR, 2–R
*/
int
addr;
/* Adrs. of the 1st register to write
*/
int
count;
/* Number of words to write
*/
: int
*buf;
/* Data to write
*/
Return
True / False
H Function
: Read Bit
Call
: int
MCL_Rbit (port, memtype, addr, count, buf);
Inputs
: int
port;
/* 0–COM1, 1–COM2
*/
int
memtype;
/* 0–DI, 1–DO, 4–C
*/
int
addr;
/* Adrs. of the 1st discrete to read
*/
int
count;
/* Number of bits to read
*/
Return
: char
*buf;
/* Data read
*/
True / False
H Function :
Write
Bit
Call
: int
MCL_Wbit (port, memtype, addr, count, buf);
Inputs
: int
port;
/* 0–COM1, 1–COM2
*/
int
memtype;
/* 1–DO, 4–C
*/
int
addr;
/* Adrs. of the 1st discrete to write
*/
int
count;
/* Number of bits to write
*/
char
*buf;
/* Data to write
*/
Return
True / False