B

Turbo C (Small Model: Compile w/ -ms Option)

H

Function

: Read Register

 

 

 

Call

: int

TCS_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

TCS_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

TCS_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

TCS_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

 

 

GFK±0804B

Appendix B Micro PLC Protocol

B-11

Page 99
Image 99
GE GFK-0804B manual Turbo C Small Model Compile w/ -ms Option