@WSAR1-V1@@COMMENT@I-87019ZW 10-CH Analog Input@DPS@ 2)b[:Us_~O! pٍ!uTM=Y *kcDumPy& qS`mPy& yR:-K\~_M=Y *kr@q]ͽpٍ!|Y]|UͽpTcDy:@NOTE@i_87019ZW connect to remote I/O modules i-87019ZW http://www.icpdas.com.tw/product/solutions/remote_io/rs-485/i-8k&i-87k/i-87019zw.html *** Target : Target 1: I-8417/8817/8437/8837 , I-7188EG , I-7188XG Target 2: W-8xx7/8xx6 Target 3: uPAC-7186EG Target 4: iPAC-8x47 Target 5: WinPAC-8xx7 / 8xx6 Target 6: VP-25W7 / 23W7 / 25W6 / 23W6 Target 7: XP-8xx7-CE6 / XP-8xx6-CE6 ******** PLEASE SET i-87019ZW to "2's Complement" by DCON utility Ver. 5.2.0 or advanced version *********** ----------------------------------------------------------------------- User may set the following special "TYP1_" to "TYP10_" value to get a clear "Degree Celsius" or "Degree Fahrenheit" temperature value. Format: 16#TTRR (Hex.) . *** This is special setting *** TT=10 (Convert to "Degree Celsius") TT=20 (Convert to "Degree Fahrenheit") RR: "range" setting of the related temperature input module Format: 16#RR (Hex.) . *** This is normal setting *** 16#00 : -15mV ---> +15mV ( Val is -32768 to 32767 ) 16#01 : -50mV ---> +50mV ( Val is -32768 to 32767 ) 16#02 : -100mV ---> +100mV ( Val is -32768 to 32767 ) 16#03 : -500mV ---> +500mV ( Val is -32768 to 32767 ) 16#04 : -1V ---> +1V ( Val is -32768 to 32767 ) 16#05 : -2.5V ---> +2.5V ( Val is -32768 to 32767 ) 16#06 : -20mA ---> 20mA ( Val is -32768 to 32767 ) , with 125 ohm (Jumper Selectable) 16#07 : 4mA ---> 20mA ( Val is 0 to 32767 ) , with 125 ohm (Jumper Selectable) 16#08 : -10V ---> +10V ( Val is -32768 to 32767 ) 16#09 : -5V ---> +5V ( Val is -32768 to 32767 ) 16#0A : -1V ---> +1V ( Val is -32768 to 32767 ) 16#0B : -500mV ---> +500mV ( Val is -32768 to 32767 ) 16#0C : -150mV ---> +150mV ( Val is -32768 to 32767 ) 16#0D : -20mA ---> 20mA ( Val is -32768 to 32767 ) , with 125 ohm (Jumper Selectable) 16#1A : 0mA ---> 20mA ( Val is 0 to 32767 ) , with 125 ohm (Jumper Selectable) For example, setting "TYP1_" to "TYP_10" as (1) 16#100F : the input value will be "Degree Celsius", unit is 0.01 degree, range= "F : K-type , -270 ---> 0 ---> +1372 degree Celsius", address=26(Dec.). That results input value of "42356" = 423.56 Degree Celsius, "-4089" = -40.89 Degree Celsius, "999990" = sensor broken line. (2) 16#2018 : the input value will be "Degree Fahrenheit", unit is 0.01 degree, range= "18 : M-type , -200 ---> 0 ---> +100 degree Celsius". That results input value of "-4512" = -45.12 Degree Fahrenheit, "500" = 5.00 Degree Fahrenheit, "999990" = sensor broken line. (3) 16#1A : The input value will be Default value, -32768 to +32767 ----------------------------------------------------------------------- Channels : 10 Analog input call: ADR_ : integer the address of this I/O modules (1-255), must be a constant value , not a variable TYP1_ to TYP10_ : Each channel can use different type setting. Set as "16#RR" as the above description to get default input value of -32768 to +32767. Set as Speical temperature "16#TTRR" as the above description will get a clear temperature value in unit of 0.01 degree. return: Q_ : boolean work ok.:TRUE " IF Q_ IS FALSE , IT MEANS COMMUNICATION IS BAD, THE FOLLOWING RETURN VALUE HAS NO MEANING. " NI1_ ~ NI10_ : integer Analog input value of channel 1 ~ 10 Min ---> ---> Max -32768 0 32767 (or clear temperature value in unit of 0.01 degree) ------------------------------------------------------------------------ Special Format Setting at "TYP1_" to "TYP10_" (Thermo-couple) : 16#100E : J-type , -21000 ---> 0 ---> +76000 , unit is 0.01 degree. (Celsius) 16#200E : J-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#100F : K-type , -27000 ---> 0 ---> +137200 , unit is 0.01 degree. (Celsius) 16#200F : K-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1010 : T-type , -27000 ---> 0 ---> +40000 , unit is 0.01 degree. (Celsius) 16#2010 : T-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1011 : E-type , -27000 ---> 0 ---> +100000 , unit is 0.01 degree. (Celsius) 16#2011 : E-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1012 : R-type , 0 ---> +176800 , unit is 0.01 degree. (Celsius) 16#2012 : R-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1013 : S-type , 0 ---> +176800 , unit is 0.01 degree. (Celsius) 16#2013 : S-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1014 : B-type , 0 ---> +182000 , unit is 0.01 degree. (Celsius) 16#2014 : B-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1015 : N-type , -27000 ---> 0 ---> +130000 , unit is 0.01 degree. (Celsius) 16#2015 : N-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1016 : C-type , 0 ---> +232000 , unit is 0.01 degree. (Celsius) 16#2016 : C-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1017 : L-type , -20000 ---> 0 ---> +80000 , unit is 0.01 degree. (Celsius) 16#2017 : L-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1018 : M-type , -20000 ---> 0 ---> +10000 , unit is 0.01 degree. (Celsius) 16#2018 : M-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. 16#1019 : L-type (DIN43710) , -20000 ---> 0 ---> +90000 , unit is 0.01 degree. (Celsius) 16#2019 : L-type , Same temperature range & unit (Fahrenheit) value of "999990" = sensor broken line. ------------------------------------------------------------------------ notes(Very Important): before connection please .... on I/O module side, please using "DCON utility Ver.5.2.0" : 1 Set "address" to a unique No. (1~255) 2.Set configuration table with "no checksum" 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 & W-8xx7 side: 1.Connect I/O complex equipment "bus7000b" and set its "baud rate" equal to the setting "baud rate" of I/O module 2.max to Target1: 64 (Target 2: 255) remote I/O modules can be connected 3.use each i_7*** function block to connect to I/O modules ICP DAS , Taiwan Aug.23,2011 @PARAM@#AQ_ #A>NI1_ #A>NI2_ #A>NI3_ #A>NI4_ #A>NI5_ #A>NI6_ #A>NI7_ #A>NI8_ #A>NI9_ #A>NI10_ @SRC@/* function block name: i_7018 */ #include #include typedef struct { } str_data; uint16 FBINIT_i_7018 (uint16 hinstance) { return (sizeof (str_data)); } void FBACT_i_7018n (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_7018 (uint16 hinstance, str_data *data, uint16 parno, void *value) { } ABP fbldef_i_7018 (char *name, IBP *initproc, RBP *readproc) { sys_strcpy (name, "I_7018N"); *initproc = (IBP)FBINIT_i_7018; *readproc = (RBP)FBREAD_i_7018; return ((ABP)FBACT_i_7018n); } @DEFS@e/* function block interface name: i_7018z */ 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 _typ1_; /* CALL */ T_ANA _typ2_; /* CALL */ T_ANA _typ3_; /* CALL */ T_ANA _typ4_; /* CALL */ T_ANA _typ5_; /* CALL */ T_ANA _typ6_; /* CALL */ T_ANA _typ7_; /* CALL */ T_ANA _typ8_; /* CALL */ T_ANA _typ9_; /* CALL */ T_ANA _typ10_; } str_arg; #define ADR_ (arg->_adr_) #define TYP1_ (arg->_typ1_) #define TYP2_ (arg->_typ2_) #define TYP3_ (arg->_typ3_) #define TYP4_ (arg->_typ4_) #define TYP5_ (arg->_typ5_) #define TYP6_ (arg->_typ6_) #define TYP7_ (arg->_typ7_) #define TYP8_ (arg->_typ8_) #define TYP9_ (arg->_typ9_) #define TYP10_ (arg->_typ10_) #define FBLPNO_Q_ 0 #define FBLPNO_NI1_ 1 #define FBLPNO_NI2_ 2 #define FBLPNO_NI3_ 3 #define FBLPNO_NI4_ 4 #define FBLPNO_NI5_ 5 #define FBLPNO_NI6_ 6 #define FBLPNO_NI7_ 7 #define FBLPNO_NI8_ 8 #define FBLPNO_NI9_ 9 #define FBLPNO_NI10_ 10 @END@