@WSAR1-V1@@COMMENT@8 CH. A/O (0~20mA or 4 ~ 20mA) @DPS@ 2)b[:Us_~O"pٍ!uTM=Y *kcDumPy& qS`mPy& yR:-K\~_M=Y *kr@q]ͽpٍ!|Y]|UͽpTcDy:@NOTE@i_87028CW connect to extension modules i-87028CW , 8-Channel current output ( 0 ~ 20 mA or 4 ~ 20 mA ) *** Target : i-8xx7/I-8xx7-80 : driver version 4.14A or later iPAC-8x47 : driver version 1.04 or later WinPAC-8xx7 / 8xx6 : driver version 1.08 or later VP-25W7 / 23W7 / 25W6 / 23W6 XP-8xx7-CE6 / XP-8xx6-CE6 VP-2117 Analog Output Channels: 8 Output Ranage: 0 ~ 20mA , 4 ~ 20mA ******** PLEASE SET 87028CW to "ENGINEER UNIT" by DCON utility *********** call: ADR_ : integer address of i-87028CW (1~255) , must be a constant value , not a variable N1_ ~ N8_ : integer 8-Ch. analog output value (Output range is set by DCON utility) 0mA 20mA 0 ---> 32767 4mA 20mA 0 ---> 32767 return: Q_ : boolean work ok.: TRUE " IF Q_ IS FALSE , IT MEANS COMMUNICATION IS BAD. " notes(Very Important): before connection please .... at I/O module side, please using "DCON utility" : 1.Set "address" to a unique No. (1~255) 2.Set configuration table with "checksum disable" and "Engineer unit" 3.Set communication parameter to a "baud rate" and "8,N,1" 4.Set "Output range" at ISaGRAF PAC side: 1.Connect I/O complex equipment "bus7000b" and set its "baud rate" equal to the setting "baud rate" of I/O module 2.use each i_87*** function block to connect to I/O modules ICP DAS , Taiwan Mar.25,2010 @PARAM@P#AQ_ @SRC@/* function block name: i_7021 */ #include #include typedef struct { } str_data; uint16 FBINIT_i_7021 (uint16 hinstance) { return (sizeof (str_data)); } void FBACT_i_7021 (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_i_7021 (uint16 hinstance, str_data *data, uint16 parno, void *value) { } ABP fbldef_i_7021 (char *name, IBP *initproc, RBP *readproc) { sys_strcpy (name, "I_7021"); *initproc = (IBP)FBINIT_i_7021; *readproc = (RBP)FBREAD_i_7021; return ((ABP)FBACT_i_7021); } @DEFS@U/* function block interface name: i_87028c */ typedef long T_BOO; typedef long T_ANA; typedef float T_REAL; typedef long T_TMR; typedef char *T_MSG; typedef struct { /* CALL */ T_ANA _adr_; /* CALL */ T_ANA _n1_; /* CALL */ T_ANA _n2_; /* CALL */ T_ANA _n3_; /* CALL */ T_ANA _n4_; /* CALL */ T_ANA _n5_; /* CALL */ T_ANA _n6_; /* CALL */ T_ANA _n7_; /* CALL */ T_ANA _n8_; } str_arg; #define ADR_ (arg->_adr_) #define N1_ (arg->_n1_) #define N2_ (arg->_n2_) #define N3_ (arg->_n3_) #define N4_ (arg->_n4_) #define N5_ (arg->_n5_) #define N6_ (arg->_n6_) #define N7_ (arg->_n7_) #define N8_ (arg->_n8_) #define FBLPNO_Q_ 0 @END@