Home

Software User`s Manual

image

Contents

1. Reset ReceiveQueue of ComNo Lu uL LL uu LL LET Polling char from ComNo Return RxOK RxTimeOut int PollRAxChar int ComNo char ch 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 30 clock t c1 c2 int ComBase wait time if ComNo zCOM1 ComBase Com1Base else ComBase Com2Base wait Cl clock while inportb LSR amp OxOf 0x01 1 C2 clock if cl 2 c2 1 cl c2 wait_time if wait_time gt MAX RX WAIT TIME return RxTimeOut chzinportb RxD return RXOK void WaitClock int count 1 int temp clock t c1 c2 for temp 0 temp lt count temp 1 cl clock 2 clock while c2 cl 4 2 clock ComSetting com 2 void InitHP int ComNo 1 com ComNo ComNo ComNo com ComNo BaudRate 96001 com ComNo DataFormat Data8bit NonParity Stoplbit RS 485 setting com ComNo CheckSum CHKSUMdisable OpenCOM ComNo HPSendCommand ComNo 02SYST REM HPSendCommand ComNo 02 CLS WaitClock 18 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 40 SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS Close HP in serial port void CloseHP int HPSendCommand ComNo 02 CLS
2. adis 23 Ju asters tain aes 26 2 CONNECTING TO THE HP34401A 34 3 AA OP 34 22 35 2 9 lt A SINGLE 7 5228 37 24 44 2 9 A SINGLE 46 20 MULTI 7523S amp MULETI HP3440 DAS 48 3 COMMAND SETS 50 52 ante a 53 2 9 MB cae 54 Ae CAE DINTIDASESSBIPI 55 56 a 57 CN KE dot M 56 229 59 60 310 XDEEIMITBR ALAC BYPASS tote set esi
3. etes Vet dado uev EQUO Econ Ven cou E 93 qu DUAE WATCHDOG OPERATION PRINCIPLE 84 4 5 OST WATCHDOG APPLICATIONS NOTES wi 84 4 6 MODULE WATCHDOG APPLICATIONS NOTES 95 A SOURCECODEOPETHE 792172223525 95 7521 7522 1522 7523 1524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 2 1 Introduction Introduction There are many RS 232 devices used in industry applications Nowadays linking all these RS 232 devices together for both automation amp information important Usually these devices are far away from the host PC In modern situation multi serial card linking is inefficient Our 752x series products can link multiple RS 232 devices via a single RS 485 network This network protocol offers stability reliability and simple cabling while delivering a low cost easy to maintain product Addressable RS 232 Converter Most RS 232 devices don t support device addresses 1 752 series can assign a unique address to any RS 232 device installed in a RS 485 network Once the host PC sends a command with a device address to the RS 485 network the destination 752x will remove the address field amp pass the other commands to its local RS 232 device The response of this local RS 232 de
4. 7188k Ver 1 016 07 04 2000 Press Fl for help M MM Current setting COM1 AutoRun 12 ALT F9 will auto download change To Line send command to 70005 UR O1lo Remote PC eme Ap 18989 Ver 1 01 6 87 04 2000 Press Fl for help oe Current setting H1 ButoRun HLI F9 will auto download Now in 7521 22 23 test mode just echo message press to quit To Hemote PC To Remate PC 7521 7522 7522 4 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 22 1 5 Downloading New Firmware to 7521 step 1 connect the 7521 to the RS 485 networking as follows Host PC 7521 7522 7522 7523 7524 7527 Host PC RS 232 Signal Male 9 pin D sub Male 9 pin D sub Com 1 2 3 4 or UART port 7522A 7522AD Ext GND 7524 7524D Ext 24V 7527 7527D Remote PC Male 9 pin D sub Com 1 2 3 4 or UART port 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 23 otep 2 otep 3 otep 4 otep 5 Connect DI1 INIT to GND Go to the directory of 7521 7522 7523 driver in the host computer amp execute 188x exe refer to Step 3 Step of Quick Star1 to change the configuration to 115200 N 8 1 Key in dir amp Enter Key and the screen will show as follows mE 7188x Ver 1 01 6 07 04 2000 Press Fl for help Current setting D d r Au
5. RS 232 Device RS 232 Device Host PC HP 34401A RS485 RS 232 Device RS 232 Device HP 34401A RS 232 Device RS 232 Device HP 34401A 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 28 Applications Addressable RS 232 Controller Four channel There is a unique address AA for every 7524 Every 7524 can support three RS232 devices AA 1 AA 2 amp AA 3 Host PC sends commands to all 7524 first The destination 7524 will pass commands to its local RS232 device 1 RS232 device 2 RS232 device 3 or RS232 device 4 Then the 7524 sends back the response of the RS232 device to Host PC COM3 amp of the 7524 can support 1 2 stop bit so it can support two stop bit device such as HP34401A The RS232 device can be used for command type application 1 or null command type application 2 Refer to 7524 c for source code of firmware RS 232 Device RS 232 Device Host PC HP 34401A RS485 HP 34401A HP 34401A HP 34401A 7524 05 HP 34401A HP 34401A HP 34401A 34401A HP 34401A HP 34401A 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 20 6 Addressable RS 232 Controller Seven channel Host PC A add There is a unique address AA for every 7527 Every 7523 can support three RS232 devices AA AA 1 AA 2 3 AA 4
6. command 15 received the host watchdog timer is reset and restarted Use AA3ETT to enable disable setting the host watchdog timer Syntax AA2 chk CrLf 18 a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AASTT chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address 5 0 host watchdog is disable S 1 host watchdog is enable TT 2 character HEX value from 00 to FF unit 0 1 second chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Host watchdog timer of module 01 15 command 012 CrLf disabled response 0Q1000 CrLf command 022 CrLf host watchdog timer of module 02 is enabled response 0210A CrLf and 0 1 10 1 second 7521 Series Module Status Comparison 1 module hardware watchdog reset all D O goes to their start values module status no change accept host D O command to change D O state 2 host software watchdog failure all D O goes to their save values module status 04 gt host watchdog failure ignores all host D O command until module status is cleared to 0 by AA1 command 7521 7522 752
7. 55 Read the module status AA Reset the module status AAV data AA 7521 7522 7522 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 Reference Sec 3 560 32 Sec 3 3 Sec 3 4 Sec 3 3 Sec 3 0 Sec 3 7 Sec 3 8 Sec 3 9 Sec 3 10 Sec 3 11 Sec 3 12 Sec 3 13 Sec 3 14 Sec 3 15 Sec 3 16 Sec 3 17 Sec 3 18 Sec 3 19 Sec 3 20 Sec 3 21 3 22 560329 3 24 560 3 23 Sec 3 26 Sec 3 27 Sec 3 28 Sec 3 29 Sec 3 30 Sec 3 31 Sec 3 32 COM 1 RS232 COM2 RS485 COM3 RS232 4 5232 5 5232 COMO RS232 COM7 RS232 COM8 RS232 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 51 3 1 AAA addr Description Read Set the module address SAAA addr chk CrLf gt set module address AAA chk CrLf gt read module address stored in EEPROM Syntax AAA addr chk CrLf is a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt chk CrLf End Char Response valid command gt AA chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command 1s a delimiter character indicating an invalid command AA 2 c
8. HPSendCommand ComNo 02SYST LOC CloseCOM ComNo I SS SS SS SS Send Command to HP in serial port int HPSendCommand int ComNo char str Int i unsigned char chkz0 1 0 str i 20 i 1 if TxCharCOM com ComNo ComNo str i TxTimeOut return TxTimeOut chk strlil If TxCharCOM com ComNo ComNo Ox0d TxTimeOut return TxTimeOut RS 485 setting return TXOK meme Receive Command to HP in serial port int HPReceiveCommand int ComNo char str int 0 1 0 1 0 lend of rx i 1 str i 0 switch PollRxChar com ComNo ComNo str i 1 case RxOK if str i OxOd RS 485 setting 1 str i 0 end of rx 1 break case RxTimeOut return RXTimeOut case RxOverFlow return RxOverFlow 7521 7522 1522 7523 1524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 41 Pe return i SS SS SS SS SS SS SS Read analog value from HP int ReadHP int ComNo double 1 int ret float A char str1 80 HPSendCommand ComNo O2READ ret HPReceiveCommand ComNo str1 if ret 0 return ret A atof str1 return HP Initial COM port int OpenCOM int ComNo InitCOM com ComNo ComNo com ComNo BaudRate com ComNo DataFormat return O0 eS SS SS SS SS SS SS SS AAA Close Restore COM port int CloseCOM int ComNo return O0 int ShowErrorCo
9. include lt stdio h gt include lt string h gt include lt dos h gt include lt time h gt int TxCharCOM int ComNo char ch clock t c1 c2 int time wait int ComBase if ComNo COMI ComBase Com1Base Set base address else if ComNo COM2 ComBase Com2Base Cl clock 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 38 time wait 0 while inportb LSR 6 0x20 1 Wait until line ready c2 clock if cl 2 c2 1 c2 time_wait if time wait gt COM MAX WAIT TIME return RxTimeOut outportb TxD ch Output char return TxOK Initial Port of int InitCOM int ComNo unsigned long int BaudRate int DataFormat 1 int br ComBase char MSB LSB if ComNo COMI ComBase Com1Base else if ComNo 2 ComBase Com2Base br 115200L BaudRate br amp Oxff00 gt gt 8 LSB br amp Oxff disable outportb LCR 0x80 Set baudrate outportb DLL LSB outportb DLH MSB outportb LCR DataFormat Set DataFormat outportb FCR 0xc1 enable FI FO 14 bit buffer outportb lER 0 Disable all Interrupt inportb LSR inportb RxD outportb MCR 0x09 outportb IER 0x01 Int while receive data outportb TxD OxOd enable return 0
10. 76 3 28 amp AA4S Description Reads power on safe value 1 When the module is first powered on all output channels will go to their power on value 2 When the module is down the hardware module watchdog will reset the module and all output channels will also go to their power on value These power on values may be different from old values before the module was reset Therefore the user must send out a new output command to change all output to their desired states 3 When the host watchdog is enabled and the host is down all output will go to their safe values and module status will change to 0x04 If the module status 15 0 04 all output commands will be ignored before the module status is cleard by AAI command Therefore the user must send AAI1 command first then send out a new output command to change all output to their desired states Syntax AA4P chk CrLf gt read power on value AA4S chk CrLf gt read safe value 15 a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AAV chk CrLf for 1 7042 invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address V
11. CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt chk CrLf End Char Example Assume the AA of 7521 is 01 101 8H response 01 OS CrLf command 01L21 CrLf response 01 OH CrLf command 01L30 CrLf response 01 OH CrLf command 01LE CrLf response 01 OE CrLf Set DO2 ON other DOn are unchanged Set DO3 OFF other DOn are unchanged Set DOO OFF DOI DO2 DO32ON Note If the host fails the AAL command will be ignored And the response string will be YAA In normal situation the response string will be AA PWR 24 DOO 3 25 E ews GND 23 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 80 3 32 SAAR Description Read the expansion board DI 0 1 2 3 Syntax AAR chk CrLf is a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AAN N chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter cha
12. D O for system monitoring Refer 75210DM l c for the source code of firmware RS485 Aie Hibs 5232 Device RS232 Device Application Real time A D Monitoring amp D A Control Master type Refer to applications 1 amp 2 for more information The X301 supports one A D amp one D A amp it can be installed into the 7521 The 7521 301 can read amp analyze the A D in real time The output of D A is controlled based on the value of A D All control operations of A D amp D A are done by the 7521 The host PC only reads the values of A D amp D A for system monitoring Refer to 7521 2 for source code of firmware RS485 nese Device RS232 Device 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 3 Application9 8 channels of long time Event counters Master type Refer to applications 1 amp 2 for more information The X100 supports 8 channel of The 7521 100 can read amp analyze these 8 event counters in real time The timing diagram of the event counter will be latched until host PC s clear command All analysis operations are done by the 7521 The host PC only read the timing values of the event counter for system monitoring Refer to 75210DMY3 c for source code of firmware RS485 7521 X8 X8 J I Event Counter Event C
13. Rev 2 1 Jul 2005 7PS 000 21 26 Application3 Addressable RS 232 Controller Dual channel There 15 a unique address AA for every 7522 Every 7522 can support two RS232 devices AA amp AA 1 Host PC sends commands to all 7522 first The destination 7522 will pass commands to its local RS232 device 1 RS232 device 2 Then the 7522 sends back the response of the RS232 device to Host PC The RS232 device can be used for command type application 1 or null command type application 2 Refer to 7522 c for source code of firmware Host PC a 232 Device Saff RS 232 Device SAK 5 232 Device RS 232 Device RS 232 Device RS 232 Device 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 27 Application4 Addressable RS 232 Controller Three channel There 15 a unique address AA for every 7523 Every 7523 can support three RS232 devices AA 1 amp AA 2 Host PC sends commands to all 7523 first The destination 7523 will pass commands to its local RS232 device 1 RS232 device 2 or RS232 device 3 Then the 7523 sends back the response of the RS232 device to Host PC The of the 7523 can support 1 2 stop bit so it can support two stop bit device such as HP34401A The RS232 device be used for command type application 1 or null command type application 2 Refer to 7523 c for source code of firmware
14. no response gt syntax error or communication error or address error 5 02 CTS is inactive now 1 2 CTS is active HIGH now is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 spe 1010610 response 010 CrLf command 02W CrLf The CTS of COMG is active HIGH now response 021 CrL f ADDRESS MAPPING FOR CTS STATUS COMIRS232 COM3 RS232 A 124 aa O Notel The CTS status is valid for COMI amp COM3 A A A A A A 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 64 314 SAAXV DESCRIPTION SET THE RTS STATE OF 1 3 Syntax AAXV chk CrLf is a delimiter character 2 HEX module address from 00 to FF V 02 set RTS inactive 1 gt set RTS to active HIGH state chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf E
15. 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 7 7523 hp22_m c 7188XC start Multi 7522 link to HP 34401A 75211522 1523 hp23 l c 7188 XC start 7523 link to HP 34401A 1921 7527 17923 hp23 m c 7188 XC start Multi 7523 link to HP 34401A 1520 1522 1523 17521 7188XC DEMO BC 7521 real time control DAO 7521 real time control AD amp DA real time control Event counter real time control Sensor amp Multiplex 175210DM5 7188XC DEMO BC 75214 7521 real time monitor HP34401A amp alarm control lib 7188XB DEMO 7188xbs libfor SMALL program 7522 A 7524 TC BC MSC MS VC 7527 7188 LARGE program TC BC 4 MSC MS VC 7188xb h All the functions declared are in the 7188xb h please use include 7188xb h 7188xb h is put on the same directory as 7188xbs lib lib 7188XC 7188xs lib for SMALL program 7521 7522 TC BC MSC MS VC 7523 7188z21 lib2 for LARGE program TC BC MSC MS VC 7188x h the functions declared are in the 7188x h please use include 7188x h 7188x h is put on the same directory as 7188xs lib 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 9 1 2 Quick Start1 Connecting to the 7521 step 1 connect the 7521 to the RS 485 networking as follows Host PC 7521 7522 224 1523 7524 1527 O Host PC RS 232 Signal Male 9 pin D sub Female 9 D sub Co
16. 9 552 929 648 bytes free 75 hp22 Connect 7522 net command gt 5 gt _ Connect 7522 net in COMI command BH2 1D0NH T UK response HEWLETT PACKARD 35481H 0 18 5 2 command 4 IDN IK response HEWLETT PRCKRRD 344018 0 10 5 2 command U6RERD 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 45 Ask for key in Send Receiving the multimeter command to multimeter command multimeter response 25 Single 7523 amp Two HP34401A The following diagram shows one PC connected to two remote HP34401As in a RS485 network The 7520 is used to convert the PC s RS232 signal to a RS485 signal The 7523 is used as a Addressable RS232 converter for the HP34401A there is no address setting HP34401A One 7523 can connect two HP34401As 7520 ar RS 485 Host PC P wa Bd 7523 HP 34401A 1 RS 232 port HP 34401A 2 RS 232 port The demo program hp23 1 c is designed so that the HOST PC can link to the remote HP34401A Refer to the companion CD for the source code of hp23 1 c The key points of hp23 1 c are given as follows All RTS3 of COMS3 must be set active HIGH first to enable the HP34401A The COM ports of this configuration are given as follows 232 9600 default 9600 defauit 9600 defauit Ev
17. AA 5 AA 6 amp AA 7 Host PC sends commands to all 7527 first The destination 7527 will pass commands to its local RS232 RS232 device 2 RS232 device 3 RS232 device 4 RS232 RS232 device 6 or RS232 device 7 device 1 device 5 Then the 7527 sends back the response of the RS232 device to Host PC COM3 5 COM6 amp COM of the 7527 can support 1 2 stop bit so it can support two stop bit device such as HP34401A The RS232 device can be used for command type application 1 or null command type application 2 Refer to 7527 c for source code of firmware RS 232 Device Maa I s RS 232 Device 7527 01 HP 34401A RS485 HP 34401A RS 232 Device RS 232 Device 1 34401 34401 SPF RS 232 Device SF RS 232 Device 1927 MT HP 34401A HP 34401A 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 HP 34401A HP 34401A HP 34401A HP 34401A HP 34401A HP 34401A HP 34401A HP 34401A HP 34401A Application7 Real time Monitoring amp D O Alarm Master type Refer to applications 1 amp 2 for more information The 7521 will scan amp analyze the onboard if the states a match with the alarm states the onboard D O will drive the alarm device for alarm or safety control All control operations of amp D O are done the 7521 The host PC only reads the values of D I amp
18. Now there are two 7521s in the RS 485 network The module address of one 7521 15 address 01 the other is address 02 The Communication status of these two 7521 will be same as N 8 1 step 3 Execute 7188X EXE in the two Remote PCs Refer to Step3 through Step 8 of Quick Start 1 to change COM port amp status to 9600 N 8 1 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 20 Step 4 Host PC Sends To Remote PC1 to Remote PC1 Keyin 01To Remote PC1 Press the Enter key to send command string to the 7521 The screen on the Host PC will show as follows Te 7188x Ver 1 01 6 07 04 2000 Press Fl for help Current setting 1 Autohun 1 ALT F9 will auto download nge lo Line ModelFor send command to 70005 188x Ver 1 01 6 84 2000 sane Press Fl for help Now in 221 22 23 test mode just echo message press to quit Back to normal mode in 7521 22 23 test mode just echo message press to quit lo Hemote PUl Step 5 Host PC Sends To Remote PC2 to Remote PC2 Keyin 02To Remote PC2 Press the Enter key to send command string to the 7521 Keyin 02To Remote PC2 Press the Enter key to send command string to the 7521 The screen on the Host PC will show as follows
19. an Intelligent Communication Controller 7188 A cost effective embedded controller ntelligent Communication A cost effective Intelligent Communication Controller Controller without isolation on RS 485 port Firmware 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 5 Features Built in Addressable RS 232 Converter firmware Supports about 30 well defined commands Supports Dual Watchdog commands Supports Power up value amp safe value for D O The source code of firmware 15 open amp well documented User can modify the source code according to their specific requirements The firmware can monitor the onboard and control the onboard D O in real time according to user s requirements The firmware can monitor the RS 232 device and control the onboard D O in real time according to user s requirements The 7521 supports one RS 232 device The 7522 supports two RS 232 devices The 7522A supports one RS 232 device The 7523 supports three RS 232 devices The 7524 supports four RS 232 devices The 7527 supports seven RS 232 devices Watchdog timer provides fault tolerance and recovery Low power consumption Ordering Information 7521 Single channel Intelligent Communication Controller 75210 7521 with 5 digit 7 seg LED 7522 Dual channel Intelligent Communication Controller 75220 7522
20. input modules digital and analog sample all their input data immediately and store this data in the internal register of the module Later the host computer can read this data one by one by using the command AA4 read synchronized data Syntax chk CrLf 1s a delimiter character 15 a command character chk 2 character checksum if checksum disabled gt chk CrLf End Char Response no response Example command CrLf Orders all modules to perform synchronized sampling response response command 014 CrLf response C __ command 024 CrLf DII DI2 1 DI3 0 command 034 CrLf Dil 1 DI2 DI3 0 NOTE What s synchronize sampling 2 The host computer can send only one command string at a time If there are two modules the host computer must send and receive the module 1 commands then the module 2 commands So there is a time delay between these two commands The synchronize sampling command is designed for all input modules When receiving CrLf synchronized sampling command all input modules in the RS 485 network will perform the input function at the same time and store these values into the module s memory Then the host computer can send out the AA4 read synchronize data command to read this data separately 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 68 521 7522 7522A 7523 7524 752 3
21. module address from 00 to FF chk 2 character checksum if checksum disable gt no chk CrLf End Char Response valid command gt data chk CrLf invalid command gt AA chk CrL f no response buffer 1s empty or syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Command 01U CrLf Response datal CrLf Command 01U CrLf Retrieves another data data2 from buffer Response data2 Command 02U CrLf Response Retrieves datal from buffer No data is in buffer Warning 1 Change CrLf mode will corrupt the integrity of unread data in the buffer 2 Repeat this command several times to ensure the buffer is empty 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 79 3 31 AAL data ee Description Write to expansion board DO 0 1 2 3 Syntax AALbbbb chk CrLf A ALcb chk CrLf A ALh chk CrLf is a delimiter character AA 2 character HEX module address from 00 to FF b 1 gt set to On 02 set to Off 0 2 DOO 1 gt DOI 2 gt DO2 33 h 4 bit hex value of DO DOO 1 at LSB Valid value 15 0 9 a f A F chk 2 character checksum if checksum disabled gt chk CrLf End Char Response valid command gt AA chk
22. that the five 7 seg LED shows as follows Baud rate 115200 Address 02 Reserved for user Press ALT amp Press the SPACE KEY until 115200 is shown Then press the ENTER KEY to confirm baud rate 1 15200 Press the ENTER KEY to confirm parity bit N Press the ENTER KEY to confirm data bit 8 Press the ENTER KEY to confirm stop bit 1 Key in command gt 02M Then press the ENTER key to send command to the 7521 Check that the 7521 echoes gt 027521 Key in command gt 022 Then press the ENTER key to send command to the 7521 Check that the 7521 echoes gt 02 800 es 89 eres 1 Current setting COMI IHutoRun 12 ALT F9 will auto download Cha nge To Line send command to 70005 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 13 Step 14 Change the Module Address of the the 7521 Key in command gt 02 01 Then press the to send command to the 7521 step 15 Change the baud rate of the 7521 Key in command gt 01B09600 Then press the to send command to the 7521 Press ALT amp C Press the SPACE KEY until 9600 is shown Then press the ENTER KEY to confirm baud rate 9600 Press the ENTER KEY to confirm parity bit N Press the ENTER KEY to confirm data bit 8 Press the ENTER KEY to confirm stop bit 1 Key in command gt 01M Then press the to send command to the 75
23. the checksum status Syntax SAAK checksum chk CrL f 1s a delimiter character AA 2 character HEX module address from 00 to FF checksum 02 checksum disable 12 checksum enable chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA checksum chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 the other AA of 7523 1 04 response 01 CrLf command 04K CrLf The checksum is enabled response 041 CrLf Note the checksum enable disable is valid to COM2 only 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 62 3 12 AATN CrLfMode DESCRIPTION READ SET THE END CHAR OF COMMAND STRING AATN chk CrLf Read the end char of command string stored in EEPROM AATN CrLfMode chk CrLf Set the end char of command string Syntax AATN CrLfMode chk CrLf is a delimiter character 2 HEX module address from 00 to FF N 0 gt Read Set the parity bit of RS485 1 gt Read Set the parity bit of RS232 CrLfMode 0 gt CrLf 0x0D 1 gt Cr
24. 18 SARA Description Reads the synchronized data Syntax AA4 chk CrLf 1s a delimiter character AA 2 character HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AASV chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address S 1 first reading not first reading V DO DII D1 DI2 D2 DI3 chk 2 character checksum if checksum disabled gt chk CrLf End Char Example command CrLf response response command 014 CrLf j DI1 DI2 DI3 1 response 10117 CrLf response 0213 CrL f command 034 CrLf 1 DI2 DI3 0 response 1031 NOTE What s synchronize sampling 2 The host computer can send only one command string at a time If there are two modules the host computer must send and receive the module 1 commands then the module 2 commands So there is a time delay between these two commands The synchronize sampling command is designed for all input modules When receiving CrLd synchronized sampling command all input modules in the RS 485 network will perform the input function at the same time and store these values into the module s memory Then the host comp
25. 21 Check the 7521 echoes gt 017521 SHE COMI HutoRun 12 F9 will auto download Change Line ModelFor send command to 8 T 5 YE PIA L 55202001 501809600 7521 7522 7522 4 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 14 1 3 Quick Start2 Connecting to Single Remote RS232 Device Step 1 connect the 7521 to the RS 485 networking amp remote PC as follows 7521 7522 7522 7523 7524 7527 Remote eo Host PC RS 232 Signal Male 9 pin D sub Com 1 2 3 4 or 7521 7521D Ext GND UART port GND 7522 75220 VS res UN Ext 24V 7523 7523D 02 Remote PC D24 qo RS 485 Signal Male 9 D sub Male 9 pin D sub Com 1 2 3 4 or UART port 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 15 Host PC eo Male 9 pin D sub Female 9 pin D sub Bares Com 1 2 3 4 or UART port Ext GND Ext 24V Remote PC Signal Male 9 pin D sub Com 1 2 3 4 or UART port otep 2 otep 3 otep 4 Execute 7188X EXE in the Host PC Refer to Step3 through o Step 8 of Quick Start 1 to change COM port amp status to 9600 N 8 1 Execute 7188X EXE in the Remote PC Refer to Step3 through Step 8 of Quick Start 1 to change COM port a
26. 21 YES EN 152 NO 1523 _ 154 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 66 3 16 AAZNV DESCRIPTION WRITE TO ONBOARD DO 1 2 3 Syntax AAZNV chk CrLf is a delimiter character AA 2 character HEX module address from 00 to FF 1 gt write DO1 2 write DO2 3 write V 0 set D O off 1 set D O on 2 checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7521 is 01 comme NOLO d response OI CrLf command 01Z21 CrLf Set DO2 ON response OI CrLf sponse response OI CrLf DO MAPPING TABLE DOI DO2 DO3 LLL YES 7523 7524 1523 NO 7524 7527 YES NOTE IF THE HOST FAILS THE AAZNV COMMAND WILL BE IGNORED AND THE RESPONSE STRING WILL BE In normal situation the response string will be AA 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 67 3 1 7 H 7521 7522 7522A 7523 7524 7527 a Description Order all
27. 2A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 JI 3 27 AA3ETT Description Enables disables the host watchdog timer value The host watchdog timer is designed for software host watchdog When the software host watchdog is enabled the host must send HOST 16 OK command to all modules before the timer is up When the command is received the host watchdog timer is reset and restarted Use 2 to read the host watchdog status value Syntax AA3ETT chk CrL f 18 a delimiter character 2 HEX module address from 00 to FF E 0 is disable and 115 enable TT 2 character HEX value from 00 to FF unit 0 1 second chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example disables host watchdog timer of module 01 command 013000 CrLf response 01 CrLf command 02310A CrLf host watchdog timer of module 02 is enabled response 02 CrLf and equal to 0 1 10 1 second 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21
28. 4 HP HPSendCommand ComNo 08SYST REM 5 HP HPSendCommand ComNo 08 CLS 5 HP HPSendCommand ComNo 09SYST REM 6 HP HPSendCommand ComNo 09 CLS 6 HP CloseHP int ComNo HPSendCommand ComNo 02 CLS 1 HP HPSendcCousmand ComNo 502591 1 HPSendCommand ComNo 03 CLS 2 HP HESendcommand comNo 0539YSTiLOG 2 HP HPSendCommand ComNo 05 CLS 3 HP HPSendCommand ComNo 05SYST LOC 3 HP HPSendCommand ComNo 06 CLS 4 HP HPSendCommand ComNo 06SYSI LOC 4 HP HPSendCommand ComNo 08 CLS 5 HP HPSendCommand ComNo 08SYST LOC 5 HP HPSendCommand ComNo 09 CLS 6 HP HPSendCommand ComNo 09SYST LOC 6 HP CloseCOM ComNo 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 49 3 Command Sets 3 0 1 Command Set Table Command AAA addr AABN baud rate AADNUIdata bit AAPN data bit AAONU data bit AAO6 ID AAC delimiter AAD delimiter AA bypass AAK checksum AATN CrLfMode AAW AAXV AAYN AAZNV AA4 5 2 AAO AA2 AA3ETT 4 4 AASP AASS AAU AAL data AAR ZTN Description AA Read Set the Module Address AA AA AAS AA AA AA Synchronized Sampling IAASV Read the synchronized data 5 Read the Reset status Host is OK
29. 61 SAT CHECKS WING a a 62 3 12 SAA TIER EE MODE obti vea re er tote tio 63 MA 64 BN DIP V 65 66 BAIN MAA 67 T 68 69 70 SUL UE Ens 71 wa NS are 71 12 A aa 73 SD IUS 73 De Os FN 74 WA ae 75 ST RM RR RETE 76 3 25 a MM LM E WA AE CLE SEE 77 Di D gt PEPIN IE WA aaa 78 CRIN een 79 dE UU NERO RM 90 SS PN LU 81 4 OPERATIONAL PRINCIPLES amp APPLICATION NOTES 82 Al OPERATION PRINCIPLES ___________ 82 42 YO OPERATINGTPRBINCIP EBS _ 83 4 3 D L OPERATING PRINCIPLE
30. 792 1 7522 7522Al71523 7524 7527 Software User s Manual Warranty All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the original purchaser Warning ICP DAS assume no liability for damages resulting from the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use nor for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 2000 by ICP DAS All rights are reserved Trademark The names used for identification only may be registered trademarks of their respective companies 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 1 Tables of Contents 1 INTRODUCTION 3 1 1 SOFTWARE INSTALLATION amp DEMO 5 2 1 2 OVUCKSITARTI CONNECTING TO THE 9 1 3 QUICK START2 CONNECTING TO SINGLE 5232 20 00 0 0 1110 15 1 4 QUICK START3 CONNECTING TO MULTI REMOTE RS232 DEVICES 2 200200000000 20 1 5 DOWNLOADING NEW
31. AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 response Ol Temperaturel CrLf command 027 CrLf ID of RS232 COM3 is HP34401A 1 response Q2HP34401A 1 CrLf command 037 CrLf ID of RS232 COMA is HP34401A 2 response 03HP34401A 2 CrLf ADDRESS MAPPING REFER TO PAGE 51 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 58 38 SAAC delimiter DESCRIPTION READ SET THE DELIMITER OF COM 1 3 4 5 6 7 8 SAAC chk CrL Read the delimiter of 1 3 4 stored in EEPROM AAC delimiter chk CrLf Set the delimiter of COM 1 3 4 Syntax AAC delimiter chk CrLf is a delimiter character 2 HEX module address from 00 to FF delimiter default delimiter is chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA delimiter chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address 2 checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 sponse VOLO response 01 CrLf command 02C CrLf Reads the delimit
32. DOZDOO D1 DO1 D2 DO3 chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Power on value is all DO 1 2 3 ON command 014P CrLf response 017 CrLf command 024S CrLf Safe value is all DO 1 2 3 OFF response 020 CrLf 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 77 3 29 5 amp AA5S Description Sets current state of digital output as power on safe value 1 When the module is first powered on all output channels will go to their power on value 2 When the module is down the hardware module watchdog will reset the module and all output channels will also go to their power on value These power on values may be different from old values before the module was reset Therefore the user must send out a new output command to change all output to their desired states 3 When the host watchdog is enabled and the host is down all output will go to their safe values and module status will change to 0x04 If the module status 15 0 04 all output command will be ignored before the module status is clear by AAI command Therefore the user must send command first then send out a new output command to change all output to their desired states Syntax AASP chk CrLf gt set power on value AA5S chk CrLf gt set safe value 13 a delimiter character 2 HEX module address from 00 to
33. FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AAV chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address V D1 DO1 D2 DO3 chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example response 017 CrLf response 020 CrLf 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 78 3 30 SAAU Description Read data from the COM port buffer Any 232 device should obey the rules of request reply constitution In other word 232 devices are passive If they have not received any commands they will not send any message out However since the active device frequently appear our controller 15 designed with a buffer to receive these message in this situation Buffer operation rules Rule 1 buffer is enabled after power on Rule 2 delimiter AA command ref Sec 3 10 disables buffer operation of that port Rule 3 after disabling buffer the first incoming message will transfer to COM2 Then controller waits for 10 seconds If no message has arrived the buffer is enabled again Syntax AAU chk CrLf gt read first data in buffer is a delimiter character AA 2 character HEX
34. HP 34401A Emergency 485 Network 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 33 2 Connecting to the HP34401A 2 1 The 7521 amp the HP34401A The stop bit of the HP34401A must two stop bit The of the7521 7522 amp 7523 can support 1 stop bit only So COMI cannot link to the HP34401A That is to say the 7521 can not link to the HP34401A The of the 7522 amp COM3 COM4 of the 7523 can support 2 stop bit so they can link to the HP34401A The 7522 can link to one HP34401 A The 7523 link to two HP34401As Refer to Sec 2 2 Sec 2 6 for more information 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 34 2 2 The amp the HP34401A APC can link to the HP34401A by COM1 or COM2 as follows The default setting of the HP34401A are given as follows Baud rate 9600 Data bit 7 Parity bit EVEN otop bit 2 TXD send command to RS232 HOST RXD receive command from RS232 HOST DIR HP34401A set it active HIGH to enable RS232 HOST for sending commands DSR RS232 HOST set it active HIGH to enable the HP34401A for sending results back to RS232 HOST 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 35 The demo program hp34401a c is designed so that a PC cab connect to HP34401A Refer to the companion CD for the source code of hp34401a c The flow chart
35. Lf 0x0D 0x0A 2 gt CrLf 0x0A 3 gt CrLf 0x0A 0x0D 4 gt No end char chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA data bit chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 reponse ACH response 014 CrLf command 01T1 CrLf response OI I CrL f command 02T1 CrLf response 022 CrLf command 03T1 CrLf The end char of is 0x0A 0x0D response 033 CrLf ADDRESS MAPPING REFER TO PAGE 51 The end char of COMI is OxOD 0x0A The end char of is OxOA Note the default 4 gt the default CrL 2NONE for all port 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 63 7521 7522 7522 A 7523 7524 7527 3 13 AAW DESCRIPTION READ THE CTS STATUS OF COM 1 3 SYNTAX SAAW CHK CRLF is a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AAS chk CrLf invalid command gt AA chk CrLf
36. The software host watchdog is designed to monitor the host computer If the host computer fails the output of the 7521 series will automatically go to their safe states to avoid unnecessary damage The flow chart for the host computer is given as follows Set Safe Value Enable host watchdog to reset the host watchdog Function n Send oio CrLf 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 84 4 6 Module WatchDog Applications Notes The AA5 command is designed to detect the module hardware watchdog failure If the module is down the module hardware watchdog circuit will reset this module After reset the output state of module will go to their start values The start value may be different from those output value before module reset Therefore the user needs to send output commands again to the module to maintain the same output state before and after module watchdog reset The flow chart for module hardware watchdog failure detection 1s given as follows Send AA5 and find S 1 All D O will be in their start Send AA5 and find S value now Send AAZNV command to contro D O S 0 modules to desire states Function 1 Function n n 4 7 Source Code of the 7521 7522 7523 1 The source codes of the 7521 are given in the companion CD User can modify these files for individual applications All source codes are well documented so t
37. aracter indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 22 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 Wed response OI CrLf command 01D17 CrLf Changes of RS232 COMI to 7 response 01 CrLf command 02D17 CrLf response 02 CrLf command 03D17 CrLf response 03 CrLf Changes data bit of RS232 COMS3 to 7 Changes data bit of RS232 COM4 to 7 ADDRESS MAPPING REFER TO PAGE 51 VALID DATA BIT 7 8 7523 7 8 7 8 7 8 7 8 7527 7 8 7 8 7 8 7 8 7 8 7 8 7 8 7 8 7521 7522 1522 7523 1524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 54 3 4 SAAPN data bit DESCRIPTION READ SET THE PARITY BIT OF 1 2 3 4 5 6 7 8 AAPN chk CrLf Read the parity bit of COM 1 2 3 4 stored in EEPROM AAPN parity bit chk CrLf Set the parity bit of COM 1 2 3 4 Syntax AAPN parity bit chk CrLf is a delimiter character 2 HEX module address from 00 to FF N 0 gt Read Set the parity bit of RS485 1 gt Read Set the parity bit of RS232 parity bit O NONE IZEVEN 2 ODD chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA data bit chk CrLf invalid command gt AA chk CrLf no response gt syntax e
38. chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt chk CrLf End Char Example module status 0x04 gt host is down command Q10 CrLf response 0104 CrLf command 01211 CrLf Output command is ignored response CrLf command 011 CrLf clears module status response OI CrLf command 010 7 response Q100 CrLf command 01211 CrLf response gt CrLf module status 0x00 Output command is OK 7521 Series Module Status Comparison 1 module hardware watchdog reset all D O goes to their start values module status no change accept host D O command to change D O state 2 host software watchdog failure all D O goes to their save value module status 04 gt host watchdog failure ignores all host D O command until module status is cleared to 0 by AA1 command 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 74 3 26 AA2 Description Reads the status of host watchdog and the host watchdog timer value The host watchdog timer is designed for software host watchdog When the software host watchdog is enabled the host must send HOST is OK command to all modules before the timer is up When the
39. cksum if checksum disabled gt no chk CrLf End Char Example response 01A2 0 CrLf response 02A3 0 CrLf 3 21 AAM Description Reads the module name Syntax SAAM chk CrLf 1s a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt chk CrLf End Char Response valid command gt AA name chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address name 4 character or 5 character for module name chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example response 017521 CrLf response 027523 CrLf 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 71 7521 7522 7522A 7523 7524 7527 3 22 AA2 pue Description Reads the configuration code of COM2 RS485 stored in EEPROM Syntax SAA2 chk cr 1s a delimiter character AA 2 character HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk cr 0x0D Response valid command gt AA40BDPK chk cr invalid command gt AA chk cr no response syntax error or communication error or address error is a delimiter character indicating a val
40. de int error code int main char argc char int ret ComNo double Al int 0 Int i char 5 80 if argc 2 1 printf No COM port assigned n printf Use HP 1 for COMI HP2 COM2 0 if argv 1 0 1 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 42 printf Connect COM1 n ComNo COMI Ise 1 0 2 printf Connect HP in COM2 n ComNo COM2 Ise printf Use HP 1 for COMI HP2 COM2 0 nitHP ComNo while Bye if Kkbhit 1 1 if HPSendCommand ComNo 02READ lt 0 ShowErrorCode ret if ret HPReceiveCommand ComNo str 20 printf nreading svV str else ShowErrorCode ret WaitClock 12 CloseHP ComNo return 0 int ShowErrorCode int error_code printf n switch error code 1 case RxOK v printf RxOK B break pe 144 case TXOK printf TxOK break case HP printf HP OK break fr Be case TxTimeOut printf TxTimeOut break 10 case RxTimeOut printf RxTimeOut break 11 case RxOverFlow printf RxOverFlow break AER EU defualt printf error d error code break return 0 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 43 24 Multi 7522 amp Multi HP34401A The following diag
41. e 7 7 0 The address mapping of this configuration is given as follows address of 7523 Comesponding COMB Corresponding address address e The InitHP CloseHP of hp23 1 c are given as follows void InitHP int ComNo comlcomNo zocomNo com ComNo BaudRate 9600L com ComNo DataFormat Data8bit NonParity Stoplbit com ComNo CheckSum CHKSUMdisable OpenCOM ComNo HPSendCommand ComNo 02SYST REM 1 HP HPSendCommand ComNo 02 CLS 1 HP HPSendCommand ComNo 03SYST REM 2 HP HPSendCommand ComNo 03 CLS 2 HP WaitClock 15 void CloseHP int ComNo HPSendCommand ComNo 02 CLS 1 HP HPSendCommand conNo U7s029YSTs LOC 1 HP HPSendCommand ComNo 03 CLS 2 HP HPSendCommand ComNo 03SYST LOC 2 HP CloseCOM ComNo 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 47 2 6 Multi 7523s amp Multi HP34401As The following diagram shows one PC connected to multiple remote HP34401As in a RS485 network The 7520 is used to convert the PC s RS232 signal to a RS485 signal The 7523 is used as a Addressable RS232 converter for the HP34401A there is no address setting in HP34401A One 7523 can connect to two HP34401A Every 7523 has a unique address in the RS485 network Every HP34401A shares the same address range with its 7523 so every HP34401A has a unique addre
42. e RS 485 network will perform the input function at the same time and store these values into the module s memory Then the host computer can send out the AA4 read synchronize data command to read this data separately 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 83 4 4Dual WatchDog Operation Principle All 7521 series modules are equipped with hardware module watchdog and software host watchdog The 7521 series are designed for industry applications therefore they are able to work in harsh envioronments There is much couple noise or energy transient such an environment The modules may shut down if this noise is too large The built in hardware module watchdog can reset the module if it is down due to too large a signal Sometimes even the host PC may shut down for hardware or software reasons The software host watchdog can monitor the status of host PC If the host PC is down all the output of the 7521 series modules will go to their predefined safe states for safety protection If the RS 485 network is open all the host commands cannot be sent to remote modules This is very dangerous in real world application The output module of the 7521 series will force their output to go to their predefined safe state for safety consideration if the host watchdog is enabled This dual watchdog feature will increase the system reliability a great deal 4 5 Host WatchDog Applications Notes
43. er KEY MiniOS7 will prompt you to confirm deletion of files Key in Enter KEY Key in dir amp Enter KEY MiniOS7 will show you there no files in the controller number is 0 lautoexec bat 87 12 2000 09 10 04 90008 12002 QOO COU2 0001 1 7571 exe 0710 2000 08 81 19 71706105706 12004 0004 6531 0009 File number is 2 Free Space 75302 byles 188 load File will save C531 808H slar Addr gt CA08 5315 Press ALT_E to download file Input filename 7921 Send file info total 83 blocks Block Iransfer time 15 6 648357 seconds Back Terminal mode M188 del Total File number is 3 do you really want to delete yn FLA dir lotal File number is Free space 19653 6 byles 188 refer to Step 5 download autoexec bat 7521 the screen will show as follows 3 el 22 ala Alls Send file info total 1 blocks lock Iransfer time 15 8 189890 seconds Hack 15 lerminal mode 1188 gt load File will save to CODZ QUU Star tAddr gt C000 0023 Press ALT_E to download file 8885 Input Filename 7521 Send File info total Ba blocks Block 83 time is 6 396462 seconds Back to Terminal mode dir bat 0 12 2000 09 10 04 amp 12002 08 902 Dmm 1 1521 180 280H 08 03 19 71706105206 CANS 0004 0221 lotal File
44. er of RS232 COM3 gt response 02 CrLf 4 command 503 Changes the delimiter of RS232 COM4 gt response 03 CrLf ADDRESS MAPPING REFER TO PAGE 51 Notel The delimiter of COM1 3 4 5 6 7 8 can be different Note 2 The default delimiter is gt Note 3 the delimiter cannot CR amp LF 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 59 7521 7522 7522A 7523 7524 7527 3 9 AAD pem DESCRIPTION READ THE DELIMITER OF COM 1 3 4 5 6 7 8 Syntax AAD chk CrLf is a delimiter character AA 2 character HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA delimiter chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error delimiter default delimiter 1s 15 a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 sponse VOLO response 01 CrLf command 02D CrLf Reads the delimiter of RS232 COM3 response 02 CrLf command 03D CrLE Reads the delimiter of RS232 COM4 gt response 03 CrLf ADDRESS MAPPING REFER TO PAGE 51 Notel The delimiter
45. haracter HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example response 02 CrLf command 02AA0 CrLf APIS command 00A CrLf response O2 CrLf address stored in EEPROM 02 NOTEI THE AA WILL BE SHOWN IN THE LEDI LED2 REFER TO SEC 1 2 QUICK START 1 FOR MORE INFORMATION NOTE2 CONNECT THE DII INIT TO GND amp USE 004 COMMAND TO READ OUT THE ADDRESS STORED IN EEPROM 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 32 3 2 AABN baud rate Description Read Set the baud rate of COM 1 2 3 4 5 6 7 8 SAABN chk CrLf Read baud rate of COM 1 2 3 4 stored in EEPROM SAABN baud rate chk CrLf Set baud rate of COM 1 2 3 4 Syntax AABN baud rate chk CrL f 1s a delimiter character 2 HEX module address from 00 to FF N 0 Read Set baud rate of RS485 N21 gt Read Set baud rate of 5232 baud rate 300 600 1200 2400 4800 9600 19200 38400 57600 1 15200 2 checksum if checksum disabled gt no chk CrLf End Char Response valid command gt l AA baud rate chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 cha
46. he user can change code easily Use BC to compile amp link 2 There are two files autoexec bat amp 7521 EXE stored in the flash ROM of the 7521 So the 7521 EXE will be executed after the power is supplied amp the DII INIT pin is floating It is also similar for the 7522 4 7523 3 There are some ODM programs are provided for the 7521 Refer to the readme doc for more information These ODM programs are given as follows 7521O0DMI c 7521 real time control DAO 752 ODM2 c 7521 real time control AD amp DA 7521 0DM3 c 7521 real time control Event counter 75210DMA c 7521 real time control Sensor amp Multiplex 75220DMS5 c 7522 real time monitor HP34401A alarm control More ODM functions will be available in the future 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 85
47. hould read the module once and will find that 5 Then the user should read the module continually and find that 5 0 If S is changed to 1 this module has been reset by module hardware watchdog circuit at least once And all output is going to its start value now Therefore the user needs to send an output command again to control all output values to desired states Example response 011 CrLf command 015 CrLf It is normal response 010 CrLf command 015 CrLf It is normal response 010 CrLf This module has been reset by module 15 CrL 015 CrLf hardware watchdog Therefore all output is going to its Start values now command response 011 CrLf 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 70 7521 7522 7522A 7523 7524 7527 3 20 AAF Description Reads the firmware version number Syntax AAF chk CrLf is a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA number chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command 1s a delimiter character indicating an invalid command AA 2 character HEX module address number 4 character for version number chk 2 character che
48. id command is a delimiter character indicating an invalid command AA 2 character HEX module address B short code for baud rate refer to Sec 3 2 D data bit refer to Sec 3 3 P party bit refer to Sec 3 4 K checksum status refer to Sec 3 5 chk 2 character checksum if checksum disabled gt chk cr 0x0D Example assume DII INIT GND command 002 cr address 01 is 7521 series module 9600 BPS response 01406800 N81 checksum disable checksum disable command 002 cr address 02 is 7521 series module 115200 response 10240A 801 cr BPS N81 checksum enable 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 12 7521 7522 7522A 7523 7524 7527 3 23 Description Host computer sends this command to tell all modules Host is Syntax chk CrLf is a delimiter character chk 2 character checksum if checksum disabled gt chk CrLf End Char Response no response Example command CrLf response No Response 7521 7522 7522A 7523 7524 7527 3 24 0 Description Reads the module status The module status will be latched until 1 command 15 sent If the module status 0x04 all output commands will be ignored Syntax AAO chk CrLf 15 a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt
49. id command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command 1s a delimiter character indicating ad invalid command AA 2 character HEX module address chk 22 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 command 02012 CrLf Changes the stop bit of RS232 COMS3 to 2 response 02 CrLf command 03012 CrLf Changes the stop bit of RS232 COM4 to 2 response 03 CrLf ADDRESS MAPPING REFER TO PAGE 51 Valid stop bit 81 7522 _ 75224 COMIRSS2 COMI RS232 1 1 zo W e NA 1082 1082 Na 1082 INA NA 1082 COMIRS232 Na Na NA NA 1062 8 85232 N A IN The com3 of 7522A is RS 422 485 e Note The stop bit of COMI amp 2 is always 1 e Note The stop bit of HP34401A must be 2 So COMI of 7521 7522 7523 cannot link to HP34401A e Note COM3 amp 4 of 7522 7523 can link to HP34401A Na COMARS22 Na Na N A N A N A N A 1 1 7521 7522 7522 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 56 36 DESCRIPTION SET THE ID STRING COM 1 3 4 5 6 7 8 MAX 50 CHARACTERS Syntax AA6 ID chk CrLf is a delimiter character 2 HEX module addres
50. m 1 2 3 4 or UART port Ext GND Ext 24V 7521 7521D 7522 7522D 7522A 7522AD 7523 7523D 7524 75240 7527 75270 Signal Male 9 pin D sub 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 9 Step 2 Execute 7188X EXE in the Host PC Step 3 Select the active COM port of HOST PC lf the 7520 15 connected to COM1 then Press ALT amp 1 lf the 7520 is connected to COM2 then Press ALT amp 2 Step 4 Change the baud rate to 9600 Press ALT amp C first Then press the SPACE key several times until baud rate 9600 Press the ENTER key to confirm otep 5 Change the Parity bit to N Press the SPACE key several times until Parity bit N Press the Enter key to confirm otep 6 Change the Data bit to 8 Press the SPACE key several times until Data bit 8 Press the Enter key to confirm otep 7 Change the Stop bit to 1 Press the SPACE key several times until Stop bit 1 Press the Enter key to confirm otep 8 Change the 7188x to Line Command mode Press ALT amp L The screen will show as follows 1188x Var 1 01 6 87 04 2000 Press Fl fer help Current setting AutoRun 12 F9 will auto download Change To Line ModelFor send command to 70005 PC Step 9 Power on the 7521 make sure DI INIT is floating Check that the five 7 seg LED shows as follows Baud rate 9600 Address 01 Reserved for u
51. may be different from real D O states latched the 7521 series Host PC must send the AAZNV command to set these D O to expected states 4 The Host PC can use AA5 command to detect the hardware watchdog reset Refer to Sec 4 6 for more information If the 7521 series is reset by hardware watchdog the Host PC should send out S AAZNV command to set all D O to their expected states 5 If the host watchdog fails all the D O will go to their safe values immediately and the module status will be set to 04 If the host computer sends out AAZNV to these modules now the modules will ignore this command and return as warning information The host use the command to clear the module status to 00 then the 7521 series will accept the AAZNV command again 4 3 Operating Principles The I 7000 series D I commands are given as follows 1 synchronized sampling all modules will sample DI at the same time 2 AA4 reads synchronized sampling data 3 SAAYN reads current state of D I The host computer can send only one command string at a time If there are two modules the host computer must send and receive the module 1 commands then the module 2 commands So there is a time delay between these two commands The synchronize sampling command is designed for all input modules When receiving OxOD synchronized sampling command all the input modules in th
52. mp status to 9600 N 8 1 Host PC Sends abcde to Remote PC Keyin 01abcde Press the Enter key to send command string to the 7521 Check that the response string from Remote PC is abcde The screen should be shown on Host PC as follows 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 16 r r 88 Ver 1 01 8 US 10 700B Press F1 for help Current setting COM Hutaltun HLT F9 will auto download 7521 7522 7522 4 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 The screen on the Remote PC should show as follows e 7188x Ver l 01 8 08 10 2000 mmn Press Fl for help mmm SHAPE AEP Current setting COM FlutoRun echo4 85x exe F9 will auto download Change To Line send command to 70005 ALT 1 2 CUM1 2 ALT C Setup F1 Help ALT K Duit __ 20025 1 step 5 Host PC Sends 12345 to Remote PC Keyin 70112345 Press the Enter key to send command string to the 7521 Check that the response string from Remote PC is 12345 The screen should be shown on Host PC as follows 1188x 1 81 8 08 10 2080 Press Fl for help i bh iah bi a hE bh h hi h bE _ Current
53. nd Char Example Assume the AA of 7523 is 01 pone WORD response OI CrLf command 02X1 CrLf Sets the RTS of COMG to active HIGH state response 02 CrLf ADDRESS MAPPING FOR RTS STATE 7 COMIGS232 COMNRS232 A asa AA Notel The RTS state 15 valid for COMI amp COM3 A A A A A A 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 65 7521 7522 7522 A 7523 7524 7527 3 15 AAYN pum DESCRIPTION READ THE ONBOARD DI 1 2 3 Syntax AAYN chk CrLf is a delimiter character AA 2 character HEX module address from 00 to FF 1 gt read DII 2 gt read DD 3 read DI3 chk z2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AAS chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command 1s a delimiter character indicating an invalid command AA 2 character HEX module address S 0 DI Low 1 gt DI High DI floating will get High chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7521 is 01 command 01Y1 CrLf response command 01Y2 CrLf DD High response command 01Y3 CrLf response DI MAPPING TABLE DI3 Low 7521 YES YES YES 7522 YES 7523 YES YES 7524 19
54. nnels and 5 digital output channels The I 7523 provides three RS 232 ports one RS 485 port The I 7524 provides 4 RS 232 ports two RS 485 ports 1 digital input channels and 1 digital output channels The I 7527 provides seven RS 232 ports two RS 485 ports 1 digital input channels and 1 digital output channels The COM of the I 7521 1 7522 I 7522A 1 7523 I 7524 and I 7527 can be used as RS 232 port or RS 485 port The 7188XC XB amp 752X series The 7521 22 22 23 24 27 is really an embedded controller before any firmware is downloaded After downloading the firmware the 7521 22 22A 23 24 27 acts as Intelligent Communication Controller The only difference between the 7521 22 23 amp the 7188XC is the 3000V isolation on the RS 485 port In general the 7521 22 23 is equivalent to 7188XC 7510 Therefore the 7521 7522 7523 can be used as an embedded controller with an isolated RS 485 port The only difference between the 7522A 24 27 amp the 7188XB 15 the 3000V isolation on the RS 485 port In general the 75224 24 27 is equivalent to 7188 7510 Therefore the 7522A 7524 7527 can be used as an embedded controller with an isolated RS 485 port Cost Effective Solution The 7188 7188XA 7188XB 7188XC is designed as an embedded controller Therefore an any software can be downloaded to them If the firmware for Intelligent Communication Controller 16 downloaded to the into 7188 7188XA 7188XB 7188XC they will act as
55. no chk CrLf End Char Response valid command gt AASS chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command 1s a delimiter character indicating an invalid command AA 2 character HEX module address SS 2 character HEX status value as following Bit_O reserved Bit reserved Bit 22 0 gt OK 1 gt host watchdog failure 2 checksum if checksum disabled gt no chk CrLf End Char Example command 010 CrLf Status of module 01 is OK response Q100 CrLf command Q20 CrLf Status of module 02 is host watchdog response O204 CrLf failure gt HOST is down now 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 73 325 AAT Description Resets module status The module status will be latched until AAI command 15 sent If the module status 0x04 all output commands will be ignored Therefore the user should read the module status first to make sure that the module status 1s 0 If the module status is not 0 only the 1 command can clear the module Status Syntax AA1 chk CrLf 13 a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA chk CrLf invalid command gt AA
56. number is 2 Free space 175382 bytes 2 MEER ALT 1 2 C0M1 2 C Setup Fl Help ALT a Qui Step 7 disconnect the DI1 INIT pin from GND amp power off then power on the 7521 7522 7523 The MiniOS7 will auto execute the new firmware 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 25 1 6 Typical Applications Application1 Addressable RS 232 Controller Command Type There is a unique address for every 7521 Host PC sends commands to all 7521 first The destination 7521 will pass commands to its local RS232 device Then the 7521 sends back the response of the RS232 device to Host PC Refer to 7521 c for source code of firmware Host PC a521 CC ae HP 34401A HP 34401A HP 34401A Application2 Addressable RS 232 Controller Null command Type The barcode reader can scan barcode anytime the 7521 will store these barcodes in the internal buffer 1K bytes Host PC sends null command to all 7521 first The destination 7521 will check its internal buffer If there is any barcode in buffer then 7521 will send back one barcode to Host PC Host PC can send more null commands to read all barcodes stored in the internal buffer of the 7521 Refer to 7521 c for source code of firmware RS485 F 7521 01 02 RS232 RS232 RS232 7521 7522 7522A 7523 7524 7527 Software User s Manual
57. of COM1 3 4 5 6 7 8 can be different Note 2 The default delimiter is gt 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 60 3 10 delimiter AA bypass DESCRIPTION BYPASS DATA STRING TO 1 3 4 5 6 7 8 Syntax delimiter AA bypass chk CrLf 2 HEX module address from 00 to FF bypass data string send to COM 1 3 4 chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command 1s a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt chk CrLf End Char Example Assume the AA of 7523 is 01 the delimiters for COM1 3 4 are command Olabcde CrL f response 01 CrLf Sends abcde to command 02123456789 CrLf response O2 CrLf Sends 123456789 to cows command O3test CrLf response O3 CrL f Sends test to ADDRESS MAPPING REFER TO PAGE 51 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 61 3 11 AAK checksum DESCRIPTION READ SET THE CHECKSUM STATUS SAAK chk CrL Read the checksum status stored in EEPROM AAK checksum chk CrLf Set
58. of hp34401a c is given as follows Set multimeter into remote control mode N Ask for measuring Set multimeter back to local Acquire mode end Anykey pressed Note the COM port of PC should be 16550 compatible 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 36 2 3 A Single 7522 8 Single HP34401A The following diagram shows one PC connected to a remote HP34401A in the RS485 network The 7520 is used to convert the PC s RS232 signal to RS485 signal The 7522 is used as a Addressable RS232 converter for the HP34401A there is no address setting in the HP34401A RS 485 Host PC HP 34401A RS 232 port aem Af 7522 24V RS 485D RS 485D S 7521 7522 7522 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 37 The demo program hp22_1 c is designed so that the HOST PC can link to a remote HP34401A Refer to the companion CD for the source code of hp22 1 c The key points of hp22_1 c are given as follows 53 of COMS3 must be set active HIGH first to enable the HP34401A The flow chart of hp22_1 c is given as follows Set multimeter to remote control mode Set multimeter back to local mode Anykey pressed Note the COM port of PC should be 16550 compatible The source code of hp22 1 c is given as follows include com h include lt conio h gt
59. ounter ie M RS232 Device RS232 Device Pad arp Multiplex Control Master type Refer to applications 1 amp 2 for more information The onboard D O of the 7521 can drive relay directly The onboard D I can link to photo sensors for event triggering The 7521 DN PR4 can trigger by photo sensor amp control the multiplex to select the expected analog signal All control operations are done by the 7521 host PC can read the 3 channel A D signals without the multiplex control Refer to 75210DMd c for source code of firmware Application11 Real time Analog Signal Monitoring amp Alarm tvpe Refer to applications 1 amp 2 for more information The COMI of host PC is used as host 485 network Host PC will send commands amp receive responses through this RS485 network CONG of host PC is used as an emergency 485 network 7522s will automatically monitor the analog signal connected to HP34401A If the emergency event occurs the 7522 will send the emergency command to this RS485 network If multi 7522s send emergency commands to host PC at the same time these 7522s will re send emergency commands to host PC until confirmation from host PC All analysis operations are done by the 7522 The host PC only reads the analog values for system monitoring Refer 75220DMS c for source code of firmware Host 485 Network gt 7522
60. racter checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 response 01 CrLf command 01819600 Changes e S COMI to 9600 BPS response OI CrLf command 02B138400 CrLf RS232 COM3 to 38400 BPS response O2 CIL f command 03B157600 CrLf cR SSI COMA to 57600 BPS response O3 CIL f ADDRESS MAPPING REFER TO PAGE 51 SHORT CODE FOR BAUD RATE 300 1 600 2 1200 3 2400 4 4800 5 9600 6 19200 7 3840028 57600 9 115200 A THE SHORT CODE OF BAUD RATE WILL BE SHOWN IN THE 7 SEGMENT LED3 REFER TO SEC 1 2 QUICK START 1 FOR MORE INFORMATION 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 53 3 3 AADN data bit DESCRIPTION READ SET THE DATA BIT OF 1 2 3 4 5 6 7 8 SAADN chk CrL Read the data bit of COM 1 2 3 4 stored in EEPROM S AADN data bit chk CrLf Set the data bit of COM 1 2 3 4 Syntax AADN data bit chk CrLf 1s a delimiter character 2 HEX module address from 00 to FF N 0 gt Read Set the data bit of RS485 1 gt Read Set the data bit of RS232 data bit 7 or 8 chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt l AA data bit chk CrL f invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter ch
61. racter indicating an invalid command AA 2 character HEX module address S 07 DI Low 1 gt DI High DI floating will get High chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7521 is 01 DI2 pin 21 Not connected command 01R CrLf response 1015 CrLf DI3 DI1 low O DI2 DIO high 1 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 81 4 Operational Principles amp Application Notes 4 1 DI1 INIT Pin Operation Principles The 7521 series modules contains an EEPROM to store configuration information Therefore it is difficult for the user to find out the status of the 7521 series modules The steps to get the configuration data stored in EEPROM are given as follows Stage 1 refer to Step Step4 of Sec 1 6 Stage 2 7521 amp Enter key to execute 7521 exe DII INIT 15 connected to GND now Stage 3 send command to 7521 for configuration reading Then the 7521 series modules will go to the factory default setting without changing the EEPROM data The factory default setting is given as following address 00 baud rate 9600 checksum DISABLE data format 1 start 8 data bits 1 stop bit N81 If disconnecting the DII INIT pin pin the 1 7000 module will auto configure based on the EEPROM data For the user it 15 easy to find the EEPROM configuration data in the default setting The
62. ram shows one PC connected to a multiple remote HP34401As in the 5485 network The 7520 is used to convert the PC s RS232 signal to a RS485 signal The 7522 is used as Addressable RS232 converter for the HP34401A there is no address setting HP344014A Every 7522 has a unique address in the RS485 network Every hp34401A shares the same address range with its 7522 so every HP34401A has a unique address in this configuration Host PC 7522 1 7522 3 V 7522 5 HP 34401A RS 232 34401A RS 232 34401A RS 232 2 4 6 The demo program hp22 is designed so that the HOST PC can link to the remote HP34401A Refer to the companion CD for the source code of hp22 m c The key points of hp22 m c are given as follows The configuration of 7522 is given as follows COMB 232 9600 defauit 9600 default Nondefau Even ___ 70 All RTS3 of must be set active high first to enable HP34401A The address mapping of this configuration is given as follows 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 44 Set multimeters to remote control mode Set multimeter key q or 9 back to local end pressed mode Execution examples STETIT ERE za 962 06 39 90 14 31 0W EKE EXE 132 11 93 88 9 18 9 file s 168 925 bytes B dir s
63. rror or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 pone OUCH response 01 CrLf command 01P10 CrLf Changes parity bit of RS232 COM1 to NONE response 01 CrLf command 02P11 CrLf Changes parity bit of RS232 COM3 to EVEN response 02 CrLf command 03P12 CrLf Changes parity bit of RS232 COM4 to ODD response 03 CrLf ADDRESS MAPPING REFER TO PAGE 51 VALID PARITY BIT 51 52 72 74 7527 COM8 RS232 The Com3 of 7522A is RS 422 485 N E O 7521 7522 7522 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 55 3 5 AAON stop bit DESCRIPTION READ SET THE STOP BIT OF COM 3 4 5 6 7 8 AAON chk CrLf Read the stop bit of COM 3 4 stored in EEPROM AAON stop bit chk CrLf Set the stop bit of COM 3 4 Syntax AAPN stop bit chk CrLf is a delimiter character 2 HEX module address from 00 to FF N 0 gt Read Set the parity bit of RS485 1 gt Read Set the parity bit of RS232 stop bit 1 for COMI 2 1 2 for COM3 4 chk 2 character checksum if checksum disabled gt chk CrLf End Char Response valid command gt AA data bit chk CrLf inval
64. s from 00 to FF ID ID string max 50 characters 2 checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA chk CrLf invalid command gt AA chk CrLf no response gt syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command AA 2 character HEX module address chk 2 character checksum if checksum disabled gt no chk CrLf End Char Example Assume the AA of 7523 is 01 command 016Temperature1 CrLf ID of RS232 COM1 is 1 command 026HP34401A 1 CrLf ID of RS232 COM3 is HP34401A 1 command 036HP34401A 2 CrLf D CR S232 COMJ is HP34401A 2 response ADDRESS MAPPING REFER TO PAGE 51 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 57 3 7 SAAT DESCRIPTION READ THE ID STRING OF COM 1 3 4 5 6 7 8 Syntax AA7 chk CrLf is a delimiter character AA 2 character HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AA ID chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error ID ID string max 50 characters is a delimiter character indicating a valid command is a delimiter character indicating an invalid command
65. ser step 10 Get the Module Name of the 7521 Key in command gt 01M Then press the to send command to the 7521 Check that the 7521 echoes gt 017521 Step 11 Get the Version of the 7521 Key in command gt 01F Then press the to send command to the 7521 Check that the 7521 echoes gt 01A1 0 Key in command gt 012 Then press the ENTER key to send command to 7521 ai that the 7521 echoes gt 016800 Cur reni sett ing AutoRun 12 F9 will auto download VERON Line ModelFor send command to 70005 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 step 12 Change the Module Address of the 7521 Key in command 01A02 Then press the ENTER key to send command to the 7521 Check that the five 7 seg LED will shows as follows LT Baud rate 9600 Address 02 Reserved for user Key in command gt 02 Then press the to send command to the 7521 Check that the 7521 echoes gt 027521 ee ERO ew 188 Ver 1 81 6 07 08 2000 ann Press Fl for help Current setting AutoRun 12 HLI F9 will auto download Change Line Mode For send command to 70005 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 12 step 13 Change the baud rate of the 7521 Key in command gt 02B0115200 Then press the ENTER key to send command to the 7521 Check
66. setting COMI Hutohun F9 will auto download Change lo Line send command to 79085 7521 7522 7522 4 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 18 The screen on the Remote PC should show as follows c Alle 7188x Ver 1 01 8 08 10 2000 Press Fl for help ee Current setting COM HutoRun echo amp B5x exe HLT F9 will auto download Note If no Remote PC is available One can connect TxD and Rxd to the same COM port to test fF e 188 Ver 1 01 6 O7 O4 7000 Press Fl for help Current setting AutoRun Ia211es1 exe will auto download Line ModelFor send command to 70005 71521 7522 7522 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 19 1 4 Quick Start3 Connecting to Multi Remote RS232 Devices Step 1 Refer to Quick Start1 for wiring amp change the 7521 to Address 02 amp 9600 N 8 1 Step 2 connect the second 7521 to the RS 485 networking amp two remote PCs as follows RS 485 Host PC EA 7521 7522 7522 752111522 15222 i 7523 7524 7527 7523 7524 7527 address 01 01 01 address 02 03 02 01 01 01 04 05 08 Remote PC 1 2
67. ss in this configuration xx HP 34401 A RS 232 address 02h Host PC Xx HP 34401 A RS 232 address 03h RS 485 xx 34401A RS 232 address 05h Pes HP 34401A RS 232 address 06h m HP 34401A RS 232 address O08h 1 HP 34401A RS 232 address 09h address 07h The demo program hp23 is designed so that the HOST PC can link to the remote HP34401A Refer to the companion CD for the source code of hp23_m c The key points of 1 are given as follows All RTS3 of COMS3 must be set active HIGH first to enable the HP34401A 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 48 The COM port setting of this configuration is given as follows PEEL COM322 COMA232 uii SO OC ST 8 default 2 2 e The and CloseHP of hp23 are given as follows void InitHP int ComNo com ComNo ComNo ComNo com ComNo BaudRate 96005 com ComNo Datarormal Datacbitl NonParity Stoplbrt com ComNo CheckSum CHKSUMdisable OpenCOM ComNo HPSendCommand ComNo 02SYST REM 1 HP HPSendCommand ComNo 02 CLS 1 HP HPSendCommand ComNo 03SYST REM 2 HP HPSendCommand ComNo 03 CLS 2 HP HPSendCommand ComNo 05SYST REM 3 HP HPSendCommand ComNo 05 CLS 3 HP HPSendCommand ComNo 06SYST REM 4 HP HPSendCommand ComNo 06 CLS
68. steps are shown as following Step 1 power off and connect DII INIT pin to pin Step 2 power on amp refer to step4 of Sec 1 6 Step 3 keyin 7521 amp Enter key to execute 7521 exe Step 4 send command string 00M 0x0D Step 5 record the module name Step 6 send command string 00A 0x0D Step 7 record the module address Step 8 send command string 00B 0x0D Step 9 record the baud rate Step 10 send command string 00D 0x0D Step 11 record the data bit Step 12 send command string 00P 0x0D Step 13 record the parity bit Step 14 send command string 00K0 0x0D Step 15 record the checksum status Step 16 power off and disconnect INIT pin and GND pin Step 17 power on the 7521 series will work in the same status as your record Note step 6 to step 15 can be replaced by 002 0x0D command 7521 7522 7522 A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 82 4 2 D O Operating Principles 1 The D O of the 7521 series will go to their start values after first powering on 2 The D O output will change to desired state if the AAZNV command 15 received Then all the D O will remain in the same states until next SAAZNV command 3 If the 7521 series is reset by the hardware watchdog all D O will go to their power on values immediately These power on values may be different from the original states before reset So the D O states stored in Host PC
69. t the help of host PC 3000V isolation on RS 485 site The COM2 of the I 752x is an isolated RS 485 port with 3000V isolation This isolation will protect the local RS 232 devices from transient noises coming from RS 485 network Self Tuner ASIC inside The I 752X Self Tuner ASIC for RS 485 port This chip can auto detect and control the send receive direction of the RS 485 network Therefore the application programs don t have to take care of the direction control of the RS 485 network Embedded control capabilities Besides Intelligent Communication Controller the 1 752 series products can be used as an embedded controller Every 1 752 controller has a MiniOS7 embedded O S The MiniOS7 provides equivalent functions of ROM DOS and has more features The user can use well developed libraries and demo programs to implement his controller Wide range selection The I 752X series products have I 7521 1 752 10 I 7522 I 7522D 7522 7522 1 7523 I 7523D 1 7524 I 7524D 1 7527 and l 75270 7521 provides RS 232 port one RS 485 port 3 digital input channels and 3 digital output channels 1 7522 provides two RS 232 ports one RS 485 port two digital input channels and one digital output channel The I 7522A provides one RS 232 RS 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 4 485 port one RS 485 port one RS 422 RS 485 port 5 digital input cha
70. tofun 7521 exe ALI F9 will auto download ICP_DAS MiniOS for I 7 188 Ver 1 02 build 007 Jul 18 2000 12 25 82 SRAM 128K FLASH MEMORY 256K dir Blautoexec bal O 12 27000 89 10 04 amp JCA 8890 2002 0095 1 7521 exe 07 10 2000 08 03 19 21206195206 12084 0004 531 0008 lora File number is 2 Free space 17538 bytes Loge Key in load amp Enter KEY Press Alt E Key in 7521 exe Then the MiniOs7 will download 7521 exe from the host PC to the module After the download operation the screen as follows AutoRun 7521 exe ALT F9 will auto download ICP DAS MiniOS for I 188x Ver 1 07 build 007 18 2000 12 25 02 SHAM 178K FLASH 256K r 188x dir Alautoexec bat 87 12 2000 09 10 04 amp 00004 12002 0000 0002 AAAA 1 7521 exe 07710 2000 08 03 19 212854105206 10004 0004 0531 000A Total File number is 2 Free 1 752002 bytes 1885 oad File will save te C531 8000H 5 tar gt 0088 5319 Press ALT E to download filet Input filename 7521 exe Send file info total blocks yt ae Transfer time 15 6 64895 seconds Back to lerminal mode JEE 7521 7522 7522 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 24 Step 6 If Step 5 fails please use the del command to delete all files in 7521 7522 7523 Then download autoexec bat amp 7521 7522 523 exe to the module Key in del amp Ent
71. uter can send out the AA4 read synchronize data command to read this data separately 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 69 7521 7522 7522A 7523 7524 7527 3 19 5 Description Resets status read back This is the only command to detect the module hardware watchdog failure If the module 15 down the module hardware watchdog circuit will reset this module This reset will cause the output state of the module to go to their start value The start value may be different from those output values before module reset Therefore the user needs to send an output command again to the module for maintaining the same output state before and after module watchdog reset Syntax AA5 chk CrLf is a delimiter character 2 HEX module address from 00 to FF chk 2 character checksum if checksum disabled gt no chk CrLf End Char Response valid command gt AAS chk CrLf invalid command gt AA chk CrLf no response syntax error or communication error or address error is a delimiter character indicating a valid command is a delimiter character indicating an invalid command S 0 it has not been reset since the last reset status read 1 it has been reset since the last reset status read 2 checksum if checksum disabled gt no chk CrLf End Char Note When first powering on the user s
72. vice will be returned to the host PC via the I 752x Master type Addressable RS 232 Converter ICPDAS 752x products are unique Our 752X products are Master type converters while other converters are Slave type Slave type converters are helpless without a host PC real industrial applications customers are not satisfied with Slave type converters because they can not adapt to individual demands The powerful 752x series analyzes local RS 232 devices or D O without a host PC Refer to Application 5 9 for more information Onboard 1K byte Queue buffer The I 752X equips a IK byte queue buffer for its local RS 232 device All input data can be stored in the queue buffer until the host PC has time to read it These features allow the host PC to link thousands of RS 232 devices without losing any data 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7 5 000 21 3 Onboard signal trigger The I 752X 1s equipped with 3 channels of digital input for sensor interfacing These D I are linked to a photo sensor switch to act as a signal They also can be used as general purpose D I The 752X can read amp analyze these D I without the help of host PC Onboard D O for emergency control The I 752X equips 3 channels of digital output for emergency control The D O can directly drive relay or led They can be used to control the local devices for emergency event The 752x can control these D O withou
73. with 5 digit 7 seg LED 7522A Single channel Intelligent Communication Controller 7522AD 7522A with 5 digit 7 seg LED 7523 Three channel Intelligent Communication Controller 75230 7523 with 5 digit 7 seg LED 7524 Four channel Intelligent Communication Controller 75240 7522 with 5 digit 7 seg LED 7527 Seven channel Intelligent Communication Controller 7527D 7522 with 5 digit 7 seg LED 7521 7522 7522A 7523 7524 7527 Software User s Manual Rev 2 1 Jul 2005 7PS 000 21 6 1 1 Software installation amp demo programs Software Installation e make a working directory in your computer then insert the installation CD and wait for autorun or Run auto32 exe click Toolkits Softwares Manuals click 718XA B C amp 7521 2 2A 3 4 7 Series click Demo Program the following like window 15 shown a i Leesa Tlo8xb 71885 exe 1 e Select all the files and directories and copy them to the working location directory e Copy the 7188X EXE 7188XW EXE to the PATH directory for example C DOS or CAWINDOWS then you can execute 7188X EXE 7188XW EXE from any location Files description Xbyymmdd img 7188XB DEMO The image file for MiniOS7 7522 7524 00 2000 1327 mm month dd day Xcyymmdd img 7188XC DEMO The image file for MiniOS7 7521 7522 yy 00 2000 7523 mm month dd day 7521 7522 7522A 7523 7524

Download Pdf Manuals

image

Related Search

Related Contents

Laura Ashley PXS211 Instructions / Assembly  ASUS Z87-PLUS J7831 User's Manual  User`s Manual  USER MANUAL  - Biotechnique Avance  Model D5020 - User Manual, Revision 1.01  le pré-programme (PDF - 858 Ko) - Ministère de l`écologie, du  A Beginner`s Guide to EndNote X7 for PC  

Copyright © All rights reserved.
Failed to retrieve file