@WSAR1-V1@T@COMMENT@Read CJC Temperature@DPS@ 2)b[:Us_~zSdCPy& tY:-KBd_M=Y *ks[M=Y *krSͽpٍ!|YD:-K\`Q}mPy& yR}@umPuCuY޽@NOTE@CJC_STS Read/Write CJC compensation of the I-7018,I-7019,I-87018 *** Target : I-8417/8817/8437/8837 , I-7188EG , I-7188XG *** call: REMOTE_ : boolean must be a constant value , not a variable If REMOTE_ is TRUE, it means I-7018,I-7019 and I-87018 are used as remote I/O . If REMOTE_ is FALSE, it means I-87018 is plugged in Main Control Unit. ADR_ : integer must be a constant value , not a variable If REMOTE_ is TRUE, ADR_ means the remote I/O module's address (1 ~ 255) If REMOTE_ is FALSE, ADR_ means slot No. , 0 - 7 SET_STS_ : boolean If SET_STS_ is FALSE, Disable CJC compensation If SET_STS_ is TRUE, Eable CJC compensation return: Q_ : boolean work ok.: TRUE " IF Q_ IS FALSE , IT MEANS COMMUNICATION IS BAD, THE FOLLOWING RETURN VALUE HAS NO MEANING. " NOW_STS_ : boolean If NOW_STS_ is FALSE, Disable CJC compensation now If NOW_STS_ is TRUE, Eable CJC compensation now notes(Very Important): If the I-87018 is plugged in the Main Control Unit, please connect the 87018 or 87018A I/O board first. "CJC" function block can work. before connection please .... on I/O module side, please using "7000 utility" : 1.Set "address" to a unique No. (1~255) 2.Set configuration table with "checksum disable" and "2's complement" 3.Set communication parameter to a "baud rate" and "8,N,1" 4.Set "Input range" on I-8xx7/I-7188EG/I-7188XG side: 1.Connect I/O complex equipment "bus7000" and set its "baud rate" equal to the setting "baud rate" of I/O module 2.max to 64 remote I/O modules can be connected 3.use each i_7*** function block to connect to I/O modules ICP DAS , Taiwan Dec.26,2003 @PARAM@7#BQ_ #B>NOW_STS__ @SRC@/* function block name: cjc */ #include #include typedef struct { } str_data; uint16 FBINIT_cjc (uint16 hinstance) { return (sizeof (str_data)); } void FBACT_cjc (uint16 hinstance, str_data *data, str_arg *arg) { } #define BOO_VALUE ((T_BOO *)value) #define ANA_VALUE ((T_ANA *)value) #define REAL_VALUE ((T_REAL *)value) #define TMR_VALUE ((T_TMR *)value) #define MSG_VALUE ((T_MSG *)value) void FBREAD_cjc (uint16 hinstance, str_data *data, uint16 parno, void *value) { } ABP fbldef_cjc (char *name, IBP *initproc, RBP *readproc) { sys_strcpy (name, "CJC"); *initproc = (IBP)FBINIT_cjc; *readproc = (RBP)FBREAD_cjc; return ((ABP)FBACT_cjc); } @DEFS@/* function block interface name: cjc_sts */ typedef long T_BOO; typedef long T_ANA; typedef float T_REAL; typedef long T_TMR; typedef char *T_MSG; typedef struct { /* CALL */ T_BOO _remote_; /* CALL */ T_ANA _adr_; /* CALL */ T_BOO _set_sts_; } str_arg; #define REMOTE_ (arg->_remote_) #define ADR_ (arg->_adr_) #define SET_STS_ (arg->_set_sts_) #define FBLPNO_Q_ 0 #define FBLPNO_NOW_STS__ 1 @END@