Home
CSIG USER MANUAL
Contents
1. Field Name Description Table Name The name of this protocol definition This name will be used in CSIGCFG csv file E g GE PLC Protocol Type In current CSIG 4 protocol types are supported They are 1 BINARY For general Binary MASTER SLAVE protocol The CRC can be of many types The response won t check CRC except CH01 ModBus RTU CRC16 2 ASCII For general ASCII MASTER SLAVE protocol 3 BinEvent For Binary Event protocol In this protocol CSIG won t send poll out only listen to the incoming message and update Ai Bi accordingly 7 24 A Fg CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 4 ASCEvent For ASCII Event protocol In this protocol CSIG won t send poll out only listen to the incoming message and update Ai Bi accordingly Table Desp Description of the table lt Al gt lt END gt block Field Name Description Name N2 point name It must start with ai1 without any skip E g at ai2 ai3 ai4 is a legal definition But ai1 ai3 ai4 is a wrong definition since it skips ai2 Description Point definition Poll This data is got from which polling This polling name must match one of the poll name in lt POLL gt lt END gt block Data Size The data is composed by how may bytes Position The start position of data in response stream Convert type How to convert the vendor data into N2 data Please refer to
2. 0 Troubl 1 Alarm 2 CEnum2 ENUM type Data offset from n a ASCII ASCEvent ai ao validation end string CBCD BCD normal 12H 1 2 4 or BINARY BinEvent ai 12f 1234H 1234f 12345678H others ao 12345678f Below is the detail implementation of the conversion types switch cvttype_r case C01 unsigned E g 40E20100 123456 switch datasize case 1 f float unsigned char msg byteposi break case 2 f float unsigned int msg byteposi break case 4 f float unsigned long msg byteposi break default WarnLog No such datasize DIS_ALL break case C02 unsigned swap E g 0001E240 123456 switch datasize case 1 f float unsigned char msg byteposi same as no swap break case 2 c 0 msg byteposi 1 c 1 msg byteposi f float unsigned int c break case 4 c 0 msg byteposi 3 16 24 A FG CS CONTROLS Release 3 4 2 Issued Mar 05 2011 c 1 msg byteposi 2 c 2 msg byteposi 1 c 3 msg byteposi f float unsigned long c break default WarnLog No such datasize DIS_ALL break case C03 signed E g CO1DFEFF 123456 switch datasize case 1 f float char msg byteposi break case 2 f float int msg byteposi break case 4 f float long msg byteposi break
3. if DI NULL return 0 strxfrm str p1 strlen strvalid byteposi datasize 1 break default return 0 f atof str f a f b switch cvttype_r case CBIT Bi get value by bitwise if msg byteposi amp bitValue bitposi return TRUE else return FALSE case CBYTE Bi get value by comparing byte value return msg byteposi cbyte TRUE FALSE case CTF Direct read True False from head of string return bincmp1 msg byteposi datasize http www cs controls com 19 24 A Fg CS CONTROLS Conversion Type Write Definition http www cs controls com Release 3 4 2 Issued Mar 05 2011 strTrue 1 strTrue 0 default ErrLog No such cvt type in getb_mod return FALSE only clear compile warning Below are the conversion types write supported by the present version of CSIG and their definitions in C code Convert Type Write Type Description Data Protocol type Name Size Cwo1 Unsigned 1 2 4 BINARY ao CW02 Unsigned swap 1 2 4 BINARY ao CW03 Signed 1 2 4 BINARY ao CW04 Signed swap 1 2 4 BINARY ao CW05 IEEE 32 bit float 4 BINARY ao CWO06 IEEE 32 bit float swap 4 BINARY ao CWO07 32bit unsigned byte swap no 4 BINARY ao word swap CW08 32bit signed byte swap no 4 BINARY ao word swap CW11 IEEE floating in Modbus E g 4 BINARY ao 615B3F6C 0 9234 CWBit Write value by bitwise 1 2 BINARY bo CW Direct data writing Replac
4. o 18 24 A FG CS CONTROLS Release 3 4 2 Issued Mar 05 2011 break default WarnLog No such datasize DIS_ALL break case C22 32 bit modulus 10000 signed format it breaks a 32 bit value into two 16 bit registers the value reg_high 10000 reg_low e g reg_high 1234 FB2E reg_low 5678 E9D2 value 1234 10000 5678 12345678 switch datasize case 4 case 6 case 8 n datasize 2 dbf 0 for i 0 i lt n i msg byteposi i 2 1 c 1 msg byteposi i 2 0 ff i float signed int c dbf dbf 10000 fffi c 0 1 i f dbf break default WarnLog No such datasize break case CBITWISE A bitwise unsigned Several bits in one byte E g 10010011 bit0 4 3 d unsigned int msg byteposi c1 OxFFFF if bitp2 lt bitp1 return 0 Cl c1 lt lt bitp2 bitp 1 1 cts ci d d gt gt bitp1 dd c1 f float d break case CBCD BCD normal E g 12h 12f 1234h 1234f 12345678h 12345678f f BCD2Float msg byteposi datasize any size can handle break default WarnLog No such datatype DIS_ALL break switch cvttype_r case C101 ASCII direct convert position from string start E g 12345 6 12345 6 strxfrm str msg byteposi datasize 1 break case C102 A ASCII direct convert position start from validation end E g 12345 6 12345 6 p1 strstr msg strvalid
5. 0 add sign strepy c strcat c str else strcpy c str switch datasize case 1 i atoi c char amp msg 1 char i msg 0 1 break case 2 int amp msg 1 atoi c msg 0 2 break case 4 long amp msg 1 atol c msg 0 4 break default WarnLog No such datasize DIS_ALL datasize 0 break case CW04 signed swap E g FFFE1DCO 123456 str fevt fvalue 0 amp dec amp sign if sign 0 add sign strepy c strcat c str else strcpy c str switch datasize case 1 i atoi c char amp msg 1 char i msg 0 1 break 21 24 A FG CS CONTROLS Release 3 4 2 Issued Mar 05 2011 case 2 int amp msg 1 atoi c swap msg 1 2 msg 0 2 break case 4 long amp msg 1 atol c swap msg 1 4 msg 0 4 break default WarnLog No such datasize DIS_ALL datasize 0 break case CWO5 IEEE 32 bits E g 0020F1C7 123456 float msg 1 fvalue msg 0 4 break case CWO6 IEEE 32 bit swap E g C7F12000 123456 float msg 1 fvalue swap msg 1 4 msg 0 4 break case CW07 unsigned byte swap word not swap E g E2400001 123456 str fevt fvalue 0 amp dec amp sign ul strtoul str amp endptr 10 switch datasize case 4 unsigned long amp msg 1 ul swap msg 1 2 swap msg 1 2 2 msg 0 4 break
6. default WarnLog No such datasize DIS_ALL break case C04 signed swap e g FFFE1DCO 123456 switch datasize case 1 f float char msg byteposi same as no swap break case 2 c 0 msg byteposi 1 c 1 msg byteposi f float int c msg byteposi 3 c 1 msg byteposi 2 msg byteposi 1 f float long c break default WarnLog No such datasize DIS_ALL break case C05 IEEE 32 bits E g 0020F1C7 123456 f float msg byteposi break case C06 IEEE 32 bit swap E g C7F12000 123456 c 0 msg byteposi 3 c 1 msg byteposi 2 c 2 msg byteposi 1 c 3 msg byteposi f float c break case C07 unsigned byte swap word not swap E g E2400001 123456 switch datasize case 4 c 0 msg byteposi 1 c 1 msg byteposi 0 c 2 msg byteposi 3 c 3 msg byteposi 2 f float unsigned long c break default WarnLog No such datasize DIS_ALL break case C08 signed byte swap word not swap E g 1DCOFFFE 123456 switch datasize case 4 c 0 msg byteposi 1 http www cs controls com 17 24 A Fg CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 c 1 msg byteposi 0 c 2 msg byteposi 3 c 3 msg byteposi 2 f float long c break default WarnLog No such datasize DIS_ALL
7. int 0 99 2 BINARY BinEvent Low decimal 0 5 E g ai ao 25 5 1905 H 5 0 0500H C11 IEEE floating in Modbus E g 4 BINARY BinEvent 615B3F6C 0 9234 ai ao Signed swap MSB is the sign 2 BINARY BinEvent ai C12 E g 8123H 291 ao 1 word is a data ranged from 4 6 8 BINARY BinEvent C20 0 10000 E g ai ao E g 04D2162E 12345678 15 24 A Fg CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 1 word is a data ranged from 4 6 8 BINARY BinEvent ai C21 0 10000 but swap ao E g 04D2162E 56781234 Signed modulus 10000 4 6 8 BINARY BinEvent ai C22 E g FF439EB2 ao 1234 10000 5678 12345678 CBitwise bitwise unsigned 1 2 bit0 BINARY BinEvent E g 10010001 bit0 4 ai 17 15 ai ao CBit Bi get value by bitwise 1 2 BINARY BinEvent bi bo CByte Bi get value by comparing byte 1 BINARY BinEvent value bi bo CTF Direct read True False from n a ASCII ASCEvent bi head of the msg True False bo values is defined in poll C101 ASCII direct conversion Data n a ASCII ASCEvent ai offset from start of msg e g ao bi bo 12 3 gt 12 3 Start gt True if Value true Start C102 ASCII direct conversion Data n a ASCII ASCEvent ai offset from validation end ao bi bo CEnum1 ENUM a set of pre defined n a ASCII ASCEvent ai ao value type Data offset from string start of msg E g Normal
8. sprintf str m_seed strFmt value Seed2Real msg m_seed strData str pp gt len_msg strlen msg return pp ASCII BO switch m_pbo idx gt cvttype_w case CW default pp m_pw m_pbo idx gt idx_pw strcpy msg pp gt msg_proto Seed2Real msg m_seed strAddr addr value is a unsigned in Modbus but a BOOL in others if value Seed2Real msg m_seed strData pp gt strTrue else Seed2Real msg m_seed strData pp gt strFalse pp gt len_msg strlen msg return pp Below are the conversion types write supported by the present version of CSIG and their definitions in C code Type Name Description A01 1 byte binary address e g 01 A02 1 4 bytes Hex vendor address E g 12 gt 12H 1234 gt 1234H 1234CD gt 1234CDH 123456CD gt 123456CDH A101 ASCII direct address e g 01 Type Name Description D101 ASCII direct data replacement 23 24 E Fg CS CONTROLS Check Sum Type Seed Format type Seed http www cs controls com Release 3 4 2 Issued Mar 05 2011 Type Name Description CHO1 Modbus RTU crc16 CHOZ for ISOMAG Millennium 3 energy meter checksum 1 crc initial to zero 2 crc loop rotated to the left by one bit 3 crc crc block bytes E g 11 FF 00 00 84 here 84 is the chksum CHO03 Simple add Just add all previous bytes together in one byte E g
9. wtdrf and copy the widrf exe into it Put Pcomm dll in c windows system32 and add the wtdrf exe path in autoexec bat E g PATH PATH c wtdrf This will allow the user to use wtdrf without typing path 2 Link RS232 cross cable to link the PC and CISG COM1 The RS232 cross cable is defined as follows DB9 DB9 AX Seek 3 EE 2 GND 5s 5 3 Plug a jumper on JP1 4 Push reset button and the LCD board should display Waiting for hand shake 5 Use the command as follows to download upload files Command Function wtdrf rp d Display a list of files in CSIG wtdrf rp e Delete a file in CSIG filename widrf rp t filename Copy a file TO CSIG wtdrf rp f filename Copy a file FROM CSIG Note rp is the port number for the PC E g If port 1 is used the above command will be implemented as widrf rp1 d display the file list on the CSIG wtdrf rp1 e table0 csv delete the file table0 csv wtdrf rp1 t csigcfg csv copy the file csigcfg csv from PC to CSIG wtdrf rp1 f csig ini copy the file csig ini from CSIG to PC 6 After finishing unplug the jumper on JP1 push the reset button and the CSIG will enter operation mode 6 24 Fg CS CONTROLS TABLE0 CSV http www cs controls com Release 3 4 2 Issued Mar 05 2011 Configuration CSIG configuration includes 2 types of csv files modification and downloading on 2 types of csv files File Name
10. Appendix for the definition of the Convert type a coefficient b offset Validation If vendor value f N2 Al value a f b If vendor value f N2 Al value a f b Validation string In certain conversion type e g C102 the CSIG uses validation string to location the value position lt BI gt lt END gt block Field Name Description Name N2 point name It must start with bi1 without any skip E g bt bi2 bi3 bi4 is a legal definition But bi1 bi3 bi4 is a wrong definition since it skips bi2 Description Point definition Poll This data is got from which polling This polling name must match one of the poll name in lt POLL gt lt END gt block Data Size The data is composed by how may bytes Position Bit posi or Byte Val The data position in response stream The BI is defined in which bit in the byte E g if Data position 3 bit poi 4 that means this BI is corresponding to ST byte 4 bit of the response stream In Cbyte type this field is for the byte value E g if Data start position 3 bit posi byte Val 123 that means this BI is True if 3 byte value is 123 Convert type How to convert the vendor data into N2 data Please refer to Appendix for the definition of the Convert type Validation Validation string In certain conversion type e g C102 the CSIG uses validation string to location the value positi
11. Convert type Write lt BO gt lt END gt block How to convert the N2 data into vendor data Please refer to Appendix for the definition of the Convert type Field Name Description Name N2 point name It must start with bo1 without any skip E g bo1 bo2 bo3 bo4 is a legal definition But bo1 bo3 bo4 is a wrong definition since it skips bo2 Description Point definition Poll This data is got from which polling This polling name must match one of the poll name in lt POLL gt lt END gt block Data Size The data is composed by how may bytes Position The data position in response stream Bit posi or Byte Val The BI is defined in which bit in the byte E g if Data position 3 bit poi 4 that means this BI is corresponding to SP byte 4 bit of the response stream In Cbyte type this field is for the byte value E g if Data start position 3 bit posi byte Val 123 that means this BI is True if 3 byte value is 123 Convert type Read How to convert the vendor data into N2 data Please refer to Appendix for the definition of the Convert type Validation Validation string In certain conversion type e g C102 the CSIG uses validation string to location the value position Value True The string indicates the true value In certain conversion type e g C102 CSIG check the response string If the string match the Value True E g response START if the
12. Description CSIG INI Define slave protocol type N2 BACnet MS TP or Modbus RTU slave and other parameters CSIGCFG CSV The CSIG configuration which includes N2 BACnet Modbus slave address vendor address and so on TABLEO CSV The protocol definition files for vendor device communication It includes all of Al BI AO and BO definition table1 csv table2 csv Same as table0 csv CSIG can support table15 csv 16 different tables Vendor Family Normally TABLE0 CSV can be obtained from CSIG table library or ordered from Chen Sen Controls Ltd if it s a special application The user needs to modify CSIGCFG CSV file by him her It is recommended that the user use CSIG sample Excel file to modify and save as csv file That can reduce the mistake CSIG can define and download 16 tables The name must be TableO csv to Table15 csv In a working CSIG it must include at least 1 table file tableO csv Guidelines for string definition in table definition 1 An unprintable ASCII code can be expressed as a Hex decimal with single quotes E g Od is ASCII CR 2 A printable ASCII can also be expressed in hex decimal E g 32 is ASCII 2 The content in quotes is case insensitive E g Od is the same as OD 3 In one pare of quotes only ASCII code can be defined no more no less E g 0d0a is illegal Od 0a is a right expression lt TYPE gt lt END gt block
13. TROUBL 1 ALARM 2 Field Name Description Name ASCII string Value A integer 12 24 Fg CS CONTROLS CSIGCFG CSV http www cs controls com Field Name Release 3 4 2 Issued Mar 05 2011 Description N2 BACnet Modbus slave Address N2 BACnet address on which one vendor device will be mapped For N2 address range is 1 255 For BACnet MS TP address range is 4 127 For Modbus slave address rang is 1 254 Table name The protocol definition table name it must match the table name defined in TABLEO CSV Vendor Address 1 255 or others based on the protocol definition Port The com port that the vendor device will Time out ms link to In current CSIG version only PORT_Acan be used The spelling PORT AT must right Polling time out E g 1000 Scan dly ms The time delay between two success polling E g 500 Retry The retry of the polling if polling fails 0 is no retry or 1 polling 1 is one retry or 2 poling E g 2 Port Name Port Def CSIG internal port name definition Users should not modify this field Define which com port will be assigned to the port name Users should not modify this field Baud Rate 2400 4800 9600 19200 38400 For N2 slave protocol PORT_N2 baud rate should be 9600 not adjustable For BACnet MS TP slave protocol PORT_N2 baud rate should be 38400 adjustable For Modbus RTU slave PO
14. default WarnLog No such datasize DIS_ALL break case CWO8 signed byte swap word not swap E g 1DCOFFFE 123456 str fcevt fvalue 0 amp dec amp sign if sign 0 add sign strepy c streat c str else strcpy c str switch datasize case 4 long amp msg 1 atol c swap msg 1 2 swap msg 1 2 2 msg 0 4 break default WarnLog No such datasize DIS_ALL break case CW11 IEEE 32 bit modbus swap E g 615B3F6C 0 9234 float msg 1 fvalue swap msg 1 2 swap msg 3 2 msg 0 4 break case CWBCD 12345678f to 12345678H Float2BCD msg 1 fvalue datasize msg 0 datasize break default WarnLog No such datatype DIS_ALL break BINARY BO switch cvttype http www cs controls com 22 24 A Fg CS CONTROLS Address Type Seed Data Type Seed http www cs controls com Release 3 4 2 Issued Mar 05 2011 case CWBIT Binary bitwise setting Modbus func 6 16 special handle in n2device msg 1 char amp bvalue 1 msg 2 char amp bvalue swap msg 0 2 break case CW str bvalue pp gt strTrue pp gt strFalse bincpy msg str break default unsigned msg 1 bvalue msg 0 2 ASCII AO switch m_pao idx gt cvttype_w case CW default pp m_pw m_pao idx gt idx_pw strcpy msg pp gt msg_proto Seed2Real msg m_seed strAddr addr
15. value could be START OFF the Bi will be set TRUE Otherwise False Poll Write To define the poll used to write the N2 data to 9 24 E FG CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 vendor device This polling name must match one of the poll name in lt POLLW gt lt END gt block Convert type Write How to convert the N2 data into vendor data Please refer to Appendix for the definition of the Convert type 10 24 A Fg CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 lt POLL gt lt END gt block For poll reading lt POLLW gt lt END gt block For poll writing Field Name Description Name For lt POLL gt Poll name It must start from p00 and in continues E g p00 p01 p02 are 3 legal polls But p00 p01 p03 will give error since there is short of p02 between p01 and p03 For lt POLLW gt Same guideline but the poll name should be wp00 wp01 wp02 POLL Poll definition 1 for Binary table type E g addr 060002 data crc addr is the part to be replaced with a vendor address in real poll data is the part to be replaced with the data in real poll crc is the part to be replaced with CRC16 or other checksum algorithm Please refer to the lt SEED gt block and appendix for the addr data crc details For binary table type Modbus_RTU CSIG will take ou
16. 55 AA 01 02 03 04 09 here 09 is the chksum CHOA The 16 bit checksum the 2 s complement of the sum E g CH05 Simple one byte check sum except first byte E g 68 OB 00 01 3F 00 09 00 00 01 00 00 55 16 55 is the check sum add from 0B Type Name Description F101 ASCII c sprintf format e g f5 1 means length 5 decimal position 1 24 24
17. RT_N2 baud rate should be 9600 adjustable Data bits 7 8 for 7 8 data bits Parity N E O for None Even Odd Stop bits In current CSIG version only 1 can be set 13 24 Fg CS CONTROLS CSIG INI Release 3 4 2 Issued Mar 05 2011 Field Name Description VENDOR_PORT Please keep the content as Vendor_Port PORT_A Ethernet Please keep the content as LocallP 192 168 211 211 Subnet_mask 255 255 255 0 GateWayIP 0 0 0 0 FTP Please keep the content as Timeout 30000 UserlD admin Password 1 234 PROTOCOL Slave protocol type and max master address for BACnet MS TP If the slave protocol is N2 configure as follows PROTOCOL Protocol_ Type N2 Protocol_ Type MODBUS Protocol_ Type BACNET If the slave protocol is BACnet MS TP configure as follows PROTOCOL Protocol_Type N2 Protocol_ Type MODBUS Protocol_ Type BACNET Max_Master 10 If the slave protocol is Modbus RTU slave configure as follows PROTOCOL Protocol_Type N2 Protocol_ Tyoe MODBUS Protocol_ Typbe BACNET N2 definition CSIG should be configured as the VND type in Metasys N2 http www cs controls com 14 24 E Fg CS CONTROLS Protocol Type Definition Conversion Type Read Definition http www cs controls com Release 3 4 2 Issued Mar 05 2011 Appendix 1 Binary It s a binary string 2 ASCII It s an ASCII
18. Release 3 4 2 Fg CS CONTROLS Issued Mar 05 2011 CSIG USER MANUAL INTRODUCTION cicesnccceecneesccvesetccensueestctcesnncdtneneensesestacevescucdsncestocdvecteadseieestaccedeceeddinerancuesenudcaners 2 STEE 2 CAPAGITY eceran E EEEE ERE TEER RENEA TEER debi aidedenedaacacieaadtecsbeatedevase 2 INSTALLATION PROCEDURES scccessecsseeeeseeeenseeeesseeeseneeeeseeeenseeesaesaseaeeaseaeeeeeseaseaeensnaeenaes 4 INSTALLATION ns aeaea ENE See ce ausded At Aat Ee Rn 4 OPERATION PROCEDURES scccssseeseeeeeeeeeeesneeeneneeeneeee sae saseeeenseeeseaesasaeeenseeeseesesnaeenseeeeees 5 OPERATION MODE ifssecdessasetenssuasediesdeecsacdaseed E E duberdensubuidadJabsndbesubuisaedaexncatdusencbiedewneads 5 DOWNLOAD MODE cscsiecccivastdcestadicccavineacebe slocetuesuvaeccuissvedeaesd cctawsitecsdeudbeceectvedseavanedessasgieceeevuete 6 CONFIGURATION ege SEENEN 7 RRE RE 7 GS IGE GE CSV recta eecat echt eah eege eege vanceeettcgegt is acacia 13 EE TEE EE 14 N2 DEFINITION scntssacdetesdeceeniadtadeaeddcaethcaatccvansde ewhied deals dndd waetacnetavwanddedevwandd aee aanetaveaaddvhdaddetvaats 14 KEREN 15 PROTOCOL TYPE DEFINITION E 15 CONVERSION TYPE READ DEEIWMITTION 15 CONVERSION TYPE WRITE DEFINITION ecceeeeeceeeeeceaeeeeseeceeeeeceaeeesaaeseeaeeseeeeseaeeeeaeeneaeees 20 ADDRESS TYPE SEED EE 23 DATA TYPE E EE 23 CHECK SUM TYPE SEED iisisti ea ania aai ada aAa a aa ni da aAa aaa AE 24 FORMAT TYPE SEED EE 24 http www cs cont
19. S SS ETR232i CN1 COM1 RS232 OO OH zZ ETR232i o000 00 oo0oo0oo0o0 o Battery COM S OoOoOoOoOo0oOoOO ETR232i CN2 D o o o o o O o o Q Figure 2 CSIG Board Layout Operation Procedures During operation a CSIG has 2 modes Operation Mode and Download Mode Operation Mode CSIG can establish communication with both vendor device and N2 host It s the working mode in routine operation Download Mode User can download files to CSIG by WTDRF for configuring or upgrading During this time the CSIG will stop polling and cannot get Slave online In this mode the LCD should display CSIG ver 3 x IP 192 168 211 211 License Yes After delay 3 seconds the LCD will display communication message and error message if any Message Description TX XXXXXXXXXX The communication stream which CSIG is sending to vendor device RX XXXXXXXXXX The communication stream which CSIG received from vendor device 5 24 A Fg CS CONTROLS Download Mode http www cs controls com Release 3 4 2 Issued Mar 05 2011 Operation mode is the most often used mode In this mode CSIG will implement integrator s functions polling with vendor device and exchanging data with N2 host WTDRF exe is a DOS software which can be used to download software to CSIG It can work on standard RS232 port or USB RS232 port 1 Installation Create a working directory c
20. break case C11 IEEE 32 bit modbus E g 615B3F6C 0 9234 c 0 msg byteposi 1 c 1 msg byteposi 0 c 2 msg byteposi 3 c 3 msg byteposi 2 f float c break case C12 signed swap 16bit MSB is sign E g 31794 974 switch datasize case 2 c 0 msg byteposi 1 c 1 msg byteposi 0 if c 1 amp 0x80 0 f1 13 else f1 1 c 1 c 1 amp Ox7F f float int c f D I break default WarnLog No such datasize DIS_ALL break case C20 same as MIG RD21 E g 04D2162E 12345678 H 1234 04D2H 5678 162EH 9012 2334H 3456 0D80H H 0x04 Oxd2 0x16 0x2e 0x23 0x34 0x0d 0x80 result 1234567890123456 switch datasize case 4 case 6 case 8 n datasize 2 dbf 0 for i 0 i lt n i c 0 msg byteposi i 2 1 c 1 msg byteposi i 2 0 ff i float unsigned int c dbf dbf 10000 ff i f dbf break default WarnLog No such datasize DIS_ALL break case C21 same as MIG RD21 E g 04D2162E 56781234 H 1234 04D2H 5678 162EH 9012 2334H 3456 0D80H H 0x04 Oxd2 0x16 0x2e 0x23 0x34 0x0d 0x80 result 3456901256781 234 switch datasize case 4 case 6 case 8 n datasize 2 dbf 0 for i 0 i lt n i msg byteposi n 1 i 2 1 msg byteposi n 1 i 2 0 a c 0 c 1 ff i dbf float unsigned int c dbf 10000 ff i f d
21. e n a BINARY bo ASCII ao the seed data in pollw directly bo with the ASCII value string analog or valuetrue valuefalse defined in pollw E g WV Aoi data gt WV Aol 23 4 WV Boi data gt WV Boi start Here start is the valuetrue defined in pollw CWBCD BCD normal 12345678f 1 2 4o0r BINARY ao 12345678H others BINARY AO switch cvttype case CW01 unsigned E g 40E20100 123456 str fevt fvalue 0 amp dec amp sign ul strtoul str amp endptr 10 switch datasize case 1 msg 1 char amp ul msg 0 1 break case 2 unsigned amp msg 1 unsigned amp ul msg 0 2 break case 4 unsigned long amp msg 1 ul msg 0 4 20 24 A Fg CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 break default WarnLog No such datasize DIS_ALL datasize 0 break case CWO2 unsigned swap E g 0001E240 123456 str fcvt fvalue 0 amp dec amp sign ul strtoul str amp endptr 10 switch datasize case 1 msg 1 char amp ul msg 0 1 break case 2 unsigned amp msg 1 unsigned amp ul swap msg 1 2 msg 0 2 break case 4 unsigned long amp msg 1 ul swap msg 1 4 msg 0 4 break default WarnLog No such datasize DIS_ALL datasize 0 break case CWO3 signed E g CO1DFEFF 123456 str fevt fvalue 0 amp dec amp sign if sign
22. n on configuration files user can use WTDRF to communicate with CSIG and normally only need to change and download the following files 1 CSIGCFG CSV 2 TABLEO CSV 3 CSIG INI Ki Ze Slave protocol supported Johnson Controls N2 BACnet MS TP or Modbus slave Slave port supported 1 Vendor RS232 port supported 1 Vendor protocol supported ANY RS232 485 protocol Maximum N2 devices supported per port 50 Maximum BACnet MS TP devices supported per port 32 Wi Ze Ai Ze Ai Ze Wi Ze Ai Ze 2 24 A Fg CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 Wi Ze Maximum Modbus devices supported per port 32 Note 1 Maximum types of table per port 16 Note 2 Points per N2 device o Al 255 o Bl 255 o AO 255 o BO 255 d Points per BACnet MS TP device o Al No limitation BI No limitation AO No limitation BO No limitation The points number is restricted by hardware resource Points per Modbus RTU slave device o BI No limitation o The points number is restricted by hardware resource o Present version CSIG can only support function 2 Read Input Status Wi Ze Wi Ze O OO O Note 1 Maximum Modbus devices supported Logically you can address over 250 devices however the RS 485 transceivers are not capable of physically driving that many devices Modbus protocol states that the limit is 32 devices and most RS 485 tran
23. on Value True The string indicates the true value In certain conversion type e g C102 CSIG check the response string If the string match the Value True E g response START if the value could be START OFF the Bi will be set TRUE Otherwise sets False 8 24 A Fg CS CONTROLS http www cs controls com lt AO gt lt END gt block Release 3 4 2 Issued Mar 05 2011 Field Name Description Name N2 point name It must start with ao1 without any skip E g ao1 ao2 ao3 ao4 is a legal definition But ao1 ao3 ao4 is a wrong definition since it skips ao2 Description Point definition Poll This data is got from which polling This polling name must match one of the poll name in lt POLL gt lt END gt block Data Size The data is composed by how may bytes Position The start position of data in response stream Convert type Read How to convert the vendor data into N2 data Please refer to Appendix for the definition of the Convert type a coefficient If vendor value f N2 Al value a f b b offset If vendor value f N2 Al value a f b Validation Validation string In certain conversion e g C102 the CSIG uses validation string to location the value position Poll Write To define the poll used to write the N2 data to vendor device This polling name must match one of the poll name in lt POLLW gt lt END gt block
24. rols com 1 24 A Fg CS CONTROLS Overview Capacity http www cs controls com Release 3 4 2 Issued Mar 05 2011 Introduction CSIG Chen Sen Integrator is an integrator product which can interpret vendor protocols e g Modbus RTU into another protocols e g Johnson Controls N2 BACnet MS TP Modbus RTU CSIG hardware includes 1 CPU board An Emtronix ETR232I board It includes two RS232 ports and one Ethernet port CSIG used 2 of the RS232 ports 2 LCD board ALCD board which can link with CPU board It will display the error message which is very useful for new user CSIG software includes The software listed below is the software that has been downloaded to CPU board 1 USER BAT The batch file which let CPU board know which exe file will execute 2 CSIG EXE CSIG main software 3 SITEKEY CSV The file includes sitekey Without site key the CSIG can work with full functions for 10 days After that the CSIG will stop working and need to re start by push reset button 4 CSIG INI CSIG settings such as protocol port and so on 5 CSIGCFG CSV CSIG main configuration file To define the linkage between devices 6 TABLEO CSV Table file for interface protocol CSIG can define and download 16 table files TABLEO CSV to TABLE15 CSV For most application one table file TABLEO CSV is enough The software files listed above have been downloaded to CPU board by factory setup For modificatio
25. rs with the validation string at position 75 The user must define validation string Validation If fill in a string 1 CSIG will double check the response for this validation string before considers the response 11 24 E Fg CS CONTROLS http www cs controls com Release 3 4 2 Issued Mar 05 2011 as a legal one 2 Some of the convert type will use validation string as the start of Position counting If leave it as blank no validation Value true The value that the software recognizes as Boolean TRUE only useful for lt POOLW gt Value false The value that the software recognizes as Boolean FALSE only useful for lt POOLW gt Comments Comments from user e g the calculation of response bytes No use to the CSIG only for user s reference lt SEED gt lt END gt block Seed block is to define the addr data checksum and other string call seed which is used in poll definition for replacement with real values in real communication Field Name Description Name Seed name String in poll The string represents seed in the poll string CSIG will search this string in poll and recognizes the string as seed Type Seed type Please refer to the Appendix for the type definition lt ENUM gt lt END gt block Enum block is to define the enumric data type It is used to convert a string into a pre defined integer E g NORMAL 0
26. sceivers will agree with this Only if all devices on the network have low load transceivers can you have more than 32 devices Note 2 Maximum types of table You can connect different devices on the same RS 485 bus as far as they have the same physical property For example you can connect different Modbus RTU devices into one CSIG Each vendor device will have different mapping table The maximum different mapping table you can have is 16 Note 3 Maximum IO Points supported Since the CSIG is acted as a Protocol Converter There is NO limitation on the total number of points supported However there is a limitation on the Johnson Controls Supervisory Controllers Supervisory Controller Max IO Point Support NCM350 8 800 N30 500 NCE25 500 NAE35 500 NAE45 1 000 NAE55 2 000 3 24 A FG CS CONTROLS Release 3 4 2 Issued Mar 05 2011 Installation Procedures Figure 1 CSIG Installation 1 http www cs controls com Connect 5V DC power supply included to CSIG and RS232 RS485 Converter Use RS232 cable or RS485 RS232 converter to link vendor device to COM1 Set jumper on JP2 to RS485 default Link N2 BACnet MS TP or Modbus RTU slave cable to RS 485 Check there is no jumper on JP1 and no jumper on CN10 pin15 16 4 24 A Fg CS CONTROLS Operation Mode http www cs controls com Release 3 4 2 Issued Mar 05 2011 EN ETR232iEVB V3 0 2004 9 GPRS h Reset JP1 LED COM2 TTL S
27. string 3 ASCEvent BINEvent For ASCII Binary Event protocol In this protocol CSIG won t send polling out only listen to the incoming message and update point accordingly ASCEvent is for the incoming message that is ASCII string BINEvent is for the incoming message that is binary string At present CSIG version ASCEvent has the limitations as follows e Can not work together with other type of protocol e Can only support Al and BI Can support multi slave devices e In CSIGCFG csv recommend to set Time out ms 1000 to 5000 Poll dly ms 0 Retry 0 e Each of the poll must define validation since the ASCEvent BINEvent is using validation to get the current poll Below are the conversion types read supported by the present version of CSIG and their definitions in C code Convert Type Read Type Description Data Protocol type Name Size CO Unsigned 1 2 4 BINARY BinEvent ai ao c02 Unsigned swap 1 2 4 BINARY BinEvent ai ao C03 Signed 1 2 4 BINARY BinEvent ai ao c04 Signed swap 1 2 4 BINARY BinEvent ai ao C05 IEEE 32 bit float 4 BINARY BinEvent ai ao C06 IEEE 32 bit float swap 4 BINARY BinEvent ai ao C07 32 bit unsigned byte swap no 4 BINARY BinEvent word swap ai ao C08 32bit signed byte swap no 4 BINARY BinEvent word swap ai ao Cog signed byte swap word not 4 BINARY BinEvent ai swap E g 1DCOFFFE ao 123456 C10 2 bytes High
28. t space in the poll definition before sending send real poll that is 01 02 03 is the same as 010203 This can make the poll definition more readable 2 for ASCII or ASCEvent table type E g WR aa ANALOG_OUT AO dd 0d aa is the part to be replaced with a vendor address in real poll dd is the part to be replaced with the data in real poll Please refer to the lt SEED gt block and appendix for the aa dd details Resp bytes or end msg 1 If fill in only a number CSIG recognizes it as BY_LENGTH A successful respond is a fixed number of character E g 10 means wait for 10 bytes as a legal response If the vendor response bytes got by CSIG is more than or less than this number it will be considered as a wrong response 2 If fill in a string started with w4 and followed with a substring CSIG recognizes the substring as BY_ENDMSG E g w4 END means wait until get the string END and then consider the response as a legal response 3 If fill in a string started with w4 gt and followed with a number CSIG recognizes the substring as BY_TIMEOUT The poll will wait until time out and then check whether the response number of chars is more than designed number If yes the response is OK if not the response failed AH fill in a string with 2 digit separated with a CSIG recognizes it as BY_VALID E g 80 75 means the respond is 80 characte
Download Pdf Manuals
Related Search
Related Contents
HP E2443B Intel Pentium CPU Preprocessor Interface User`s Guide ESPRIT - Shopify Guide d`installation rapide Lirio by Philips 36753/11/LI Canon 9356B001 Digital Camera User Manual TA7011 and TA7012 User`s Manual Samsung Samsung C5130 Käyttöopas Horizon Fitness T101 Owner's Manual Haier HNSE05SS combi-fridge Copyright © All rights reserved.
Failed to retrieve file