Home
UIF 420A User`s Manual
Contents
1. 3 lf of ff ES 3 O 2 Fl r E r E r r r SH AA A A A A A i ye S i F A 1 1 4 I 1 1 I A 1 l 1 1 1 1 4 I a i MON gt a UIF420 PANEL CUTOUT BACK VIEW Unit mm Comtfile Technology Inc www comfiletech com page 3 COMFILE MET 1 Exterior Dimensions 190 FRONT VIEW 33 2 Support Height 7mm 4ea for Add On Board a LL Connector Pin 1 for Add On Board 151 27 51 81 BOTTOM VIEW Comtfile Technology Inc www comfiletech com page 4 nada 420 TECHNOLOGY 5 Names and Functions of Parts Front No Name Function Text Strip Writable paper labels Character displays English alphabets LCD numbers and symbols Key value is transmitted in SPI communication Connector connector port I2C communication Connector connector port RS232 communication speed setting 12 address setting RS232 and I2C mode Switch setting Check all keys status and check key value buzzer sound ON OFF PONET E 9 24V Inputs A support is connected here 30 tab when a board is connected to the backside adjusts the brightness of the RS232 communication Input voltag
2. 12C SPI communication port COMFILE Technology Inc www comfiletech com page 1 When CUBLOC is used as the main controller since the commands such as PRINT and GETPAD are supported to facilitate the use of the UI When this product is used with other main controllers MCUs it still provides a friendly UI as data is 2 The Product s Main Features 1 Key inputs are transmitted through SPI or RS232 protocol 2 A built in 20 x 4 character LCD on which I2C SPI or RS232 protocol can be displayed 3 Software controlled backlight ON OFF 4 Four 4 on off LEDs 5 A buzzer sound that can be controlled down to milliseconds 6 Key buzzer sound ON OFF feature 7 All keys s working condition and each key value can be checked 8 RS232C communication speed can be selected from 4800 to 115200 bps 9 CuNET I2C address that can be selected from 0 to 7 3 Product Specification 1 Power specification Voltage Power Consumption 9 24 VDC 1 2W Max 1 6 VA 2 Operation Range Temperature 0 50 Humidity 3585 RH without dew condensation 3 Membrane Switch life 100 000 pushes 250 of 4 Interface Communication Protocol Synchronization Asynchronous SCK sampling position Rising edge Comtfile Technology Inc www comfiletech com page 2 COMFILE izado 4 Exterior and Panel Dimensions Panel Dimensions J Fa Fa F y i j A ral ff A
3. OO Locate 0 0 Set cursor position Primet 1011 Print character string on screen Do Infinite Looping Loop ABC A Getpad 1 Read the key input value of 1 byte and store it in variable A Locate 1 1 Set cursor position Print Hex2 A Print the A value in Hexadecimal Return lt This source code is from UIF420A_TEST1 CUL file One can go to www comfiletech com and then to UIF420A where this file can be downloaded gt Com file Technology Inc www comfiletech com page 15 nada 420 TECHNOLOGY Converting Scan Codes to Meaningful Data using a Table lt The original key scan codes of UIF 420A gt As you can see in the above picture scan codes are random values unrelated to the displayed key labels on the product Therefore 1t 1s better to use converted values For example since a value of 3 is transmitted when the key labeled 1 is pressed using the table conversion we can convert the value 3 to 1 In this manner the other keys scan code can be converted to respective corresponding values This process is called table conversion Const Device CB280 Dim SCODE1 As Byte Dim SCODE2 As Byte Dim SCODE3 As Byte Conste Byte Ss ECES ele 7r 8 9 227 18 10 0 eae ly 12 13 14 Dim A As Integer Set Display 2 0 0 200 Set Pad 0 12 20 On Pad Gosub KEYPROCESS Prine 7 72 THO BATE SS TEM els Wait 10 ESTOT Locate 0
4. Operation Sets the position of characters or symbols on the screen Transmission Example x axis 0 y axis 0 Hexadecimal 1B 4C 00 00 SetDisplay Locate 0 0 Opencom OC_ Locate 0 0 Comtfile Technology Inc www comfiletech com page 10 naa 420 TECHNOLOGY Character LCD BACK LIGHT ON OFF ESC BL n parameter n O OFF 1 ON Operation turns the LCD s back light on off Transmission Example Backlight ON Hexadecimal 1B 42 4C 01 SetDisplay Light 1 Opencom OC_Light 1 LED ON OFF ESC 1 byte 1 byte parameter n1 LED selection 1 4 parameter n2 0 OFF 1 ON Operation can choose an LED to turn ON or OFF Transmission Example Turn the 2 4 LED ON Hexadecimal 1B 45 02 01 SetDisplay Print 27 69 2 1 Opencom OC_Led 2 1 Set Buzzer ON Time ESC 1 byte 1 byte 1 byte 1 byte parameter n1 buzzer sound time lower limit parameter n2 buzzer sound time upper limit Operation sounds the buzzer as long as specified in the command Transmission Example 700 mS buzzer sound Hexadecimal 1B 5A BC 02 SetDisplay Print 27 90 188 2 Opencom OC_BZ 700 Send With Check Byte ESC Operation When the UIF sends a key value to an external device a regular data byte and its inversed data byte value 1s transmitted a total of 2 bytes The receiver compares the date value of the two bytes to check for transmission error Transmission Example Hexadeci
5. TECHNOLOGY 8 Bottom Switch Setting SW1 SW2 SW3 RS232 I2C O ON X OFF Comm Speed Address 19200 584 ON 12C SPI OFF 88232 ON Key Buzzer OFF OFF Key Buzzer ON ON keys status check and key value check x A new switch setting takes effect only when power is turned off and on again 1 gt Via RS232 communication RS232 MODE transmits key value and displays English letters symbols and numbers on the character LCD On the other hand the I2C SPI MODE uses SPI communication to transmit key value and or uses 2C communication to display English letters symbols and numbers on the character LCD 2 gt Whenever a key is pressed a short buzzer sound is made This buzzer sound can be turned on off using switch 5 SW5 8 gt When the power is turned on with SW6 in ON state the UIF checks the status of all the keys If there is a problem such is displayed on the character LCD as KEY STATE NO GOOD When all keys operate normally the character LCD displays KEY STATE GOOD KEY VALUE And when the key is pushed the key value is displayed in decimals Using this mode one can find out the key value that was transmitted to SPI or RS232 9 LCD Control Commands When an ASCII code is sent to UIF the corresponding ASCII code s content is displayed on the LCD screen But when you want special effects such as changing the position of the cursor or clearing the entire screen y
6. nada 420 TECHNOLOGY UIF 420A Beginners Guide when RS232C is used 1 How to connect CUBLOC and UIF 420A via RS232C When CUBLOC CUSB 22R and UIF 420A are far apart it is safer to use RS232 connection to send and receive data The two devices are connected as shown in the picture below Here the RS232 cable should be a cross cable where both ends are of DSUB 9pin MALE type Cross cable is a type of RS232 cable where the Pin 2 and Pin 3 are crossed Comfile Technology Inc www comfiletech com page 18 nada 420 TECHNOLOGY Input source code as follows Const Device CB280 Dim A As Integer Dim B As Integer E 5 1 Ser Uir 271 xS Use this command to set che type On Recvl Gosub ABC xS Jumo to ABC when a key ie pressed GES Wait 10 EStTOrE Locate 0 0 OS Do Brinte LOC 10 0 Dee B TCL B Wait 500 Loop ABC A Get 1 1 Bring data from RS232 receive buffer peime LOG 1L 1 He A Return SET UIF command is a command supported for UIF in CUBLOC STUDIO version 3 0 d or higher SET UIF lt display type gt lt channel no gt display type 1 UIF416H 2 UIF
7. 0 Pines COME TLE Do Loop KE YPROCESS SCODE1 Getpad 1 SCODE2 Getpad 1 Debug HEX2 SCODE1 HEX2 SCODE2 Cr SCODE2 Not SCODEZ2 If SCODE1 lt gt SCODE2 Then Return If two key values are not the same then ignore the values SCODE3 SCANCODETB SCODE1 Locate 2 2 Print DEC2 Remanan Com file Technology Inc www comfiletech com page 16 COMEILE izado lt This source code is from UIF420A TEST2 CUL file which can be downloaded from website www comfiletech com s UIF420A page gt Owing to the above program 1 6 source code the UIF s keys values are converted as shown in the picture below That is when a number key is pressed the code of same value as labeled is transmitted and other keys when pressed transmit a values larger than 10 lt The Key Code Values obtained via Table Conversion gt Regarding 2 Byte Reception In this program there is a command which transmits key data in 2 bytes Originally a scan code is only 1 byte But here the original byte s inverted value is sent together with the original byte to prevent error or noise that may happen during communication PRINT 27 72 Once this command is executed whenever a key is pressed a 2 byte value is transmitted The above source code includes a part which compares the original byte and its inversion and ignores the transmitted value if the two values differ Comfile Technology Inc www comfiletech com page 1
8. 420A channel no 1 RS232 Ch1 2 RS232 Ch2 3 RS232 Ch3 When UIF is used in the RS232 mode first the RS232 channel has to be opened using the OPENCOM command and then the display type has to be specified using the SET UIF command When a key is pressed data is received via RS232 Ch1 The data value can be checked using the GET command lt THE END gt Com file Technology Inc www comfiletech com page 19
9. COMFILE TECHNOLOGY User Interface Panel User Manual UIF 420A Safety Precautions Safety precautions are for your correct and safe use of the product to prevent accidents Therefore you MUST keep these safety measures A Warning 1 When there is a danger of accident related to this product s malfunction or anomaly help prevent an accident by installing a double shutdown circuit externally 2 Do not use this product where there is flammable gas explosive gas humidity direct sunlight radiation vibration or impact 3 Never disassemble improve or repair this product 4 To prevent damage or malfunction of this product always only use the specified power source Z Precautions 1 Avoid places where there are reactance e g near power line or load line static or magnetic noise 2 Use the product in the temperature range of 0 50 and humidity in the range of 35 85 RH without dew condensation 3 When cleaning the product do NOT use water or any organic solvent Instead use a dry towel to clean the product 4 Always detach the product after the power is turned off Otherwise malfunction or damage may occur 5 Do not let dirt or a foreign object inside the product 1 Product Summary This product 1 e UIF 420A provides an easier to use user interface UI that is a must in industrial controller design It has a built in 20 x 4 character LCD and 23 keys to communicate with the main controller through RS232 or
10. e 5V RS232 I2C SPI connection Comtfile Technology Inc www comfiletech com page 5 nada 420 TECHNOLOGY 6 PIN Connection i Backside Connector 3 Explanation 5V RXD connects to CUBLOC or a microcontroller s TXD le 5V TXD connects to CUBLOC or a microcontroller s RXD SpA a A When 5V RS232 is used connector 42 s 12V RS232 cannot O be used OTE OS 8 mso 3 3 3 3 3 o AA 15 16 5V 1A output 19 20 Input voltage output DC 9 24V 3 4 9 10 13 14 17 16 Male HRS PCN10 20P 2 54DSA K Female HRS PCN10C 20S 2 54DSA K i Backside Connector 12 Explanation When 12V RS232 is used connector 42 s 5V Ee 12V RS232 TX terminal RS232 cannot be used 12V 12V RS232 RX terminal RX terminal GND terminal terminal 9 SV 1A output 1 4 6 7 8 x When UIF and PC are connected a direct cable is used Pa RX 29 a Y RX TX 3a be 0 4 e 066 am GND UIF RS232 PC RS232 Comfile Technology Inc www comfiletech com page 6 TECHNOLOGY l Bottom Connector 12C MES SS 1 Bottom Connector Bee DC 9 24 GND Bottom Connector 9 GND Comfile Technology Inc www comfiletech com page 7 TECHNOLOGY 7 External Wiring Diagram 1 When connecting via RS232 User Board POWER 1 When connecting via 12C or SPI Comtfile Technology Inc www comfiletech com page 8 nada 420
11. mal 1B 48 SetDisplay Print 27 72 Opencom OC_SWCB Comfile Technology Inc www comfiletech com page 11 UIF 420A User Interface Panel User Manual TECHNOLOGY COMFILE 10 Key Scan Code UIF420A has a total of 23 keys and each key has its own unique scan code assigned ama a 0 ee ee MMMM mm Comtfile Technology Inc www comfiletech com page 12 nada 20 TECHNOLOGY UIF 420A Beginners Guide when using 12C or SPD 1 How to connect CUBLOC and UIF 420A via I2C or SPI connection CUBLOC CUSB 22R and UIF 420A are connected as follows RS232C download Keypad SPI CUNET 12C AC220V Power Input 9V DC Power Input Set UIF 420A s dipswitches as in the picture below 1 e only SW4 ON the rest OFF By setting SW4 ON select I2C CUNET communication Remember that you MUST turn the power off and o
12. n again after a new dip switch setting as the new dipswitch setting is read in when the power is turned back on Comtfile Technology Inc www comfiletech com page 13 nada 20 TECHNOLOGY Open CUBLCO Studio input a simple source code shown below and download it lt Cubloc Studio d YYcubasic_trYfuifA2D0a_testl cul IEE Hate aa 2485 Seah 432 rmi E E FI BASIC F2 LADDER Ladder Mnemonic i Const Device CB280 2 Dim A As Integer 3 Set Display 2 0 0 200 5 Set Pad 0 1 20 On Pad Gosub ABC 8 Cls 2 Wait 10 10 Csroff ti Locate 0 0 2 Print COMFILE 14 Do 15 Loop 17 ABC A Getpad 1 Locate 1 1 Print Hex A Return FAW Id 6233538 Then in the UIF s LCD window the text COMFILE will be displayed and when a key is pressed the corresponding scan code will also be displayed COMF ILE de Comtfile Technology Inc www comfiletech com page 14 COMEILE izado The following 15 a line by line description Const Device CB280 Declare device Dim A As Integer Declare variable Set Display 2 0 0 200 Declare display mode CLCD mode I2C type address 0 buffer size as 200 bytes Set Pad 0 1 20 Declare key input mode SPI type buffer size as 20 bytes On Pad Gosub ABC On key input jump to label ABC in the source code ins Clear screen Wait 10 Have delay of 10 milliseconds STO
13. ou need to use a control code UIF s LCD control command begins with an escape code ESC which is represented by HEX code 1B followed by one English character which is followed by necessary parameters j UIF Setting to use the LCD with CUBLOC Set Display n1 n2 n3 n4 Parameter n1 2 CLCD Parameter n2 0 CuNET 12C 1 RS232 CH1 2 RS232 CH2 3 RS232 CH3 Parameter n3 RS232C communication speed and CuNET 12C address Parameter n4 transmission buffer size Example of transmission using RS232 CH1 Set Display 2 1 19200 200 Com file Technology Inc www comfiletech com page 9 nada 420 TECHNOLOGY Character LCD Cursor ON Esc s Operation turns cursor on Transmission Example displays cursor Hexadecimal 1B 68 SetDisplay Csron Opencom OC_Csron Character LCD Cursor OFF ESC 1 byte 1 byte Operation turns cursor off Transmission Example displays cursor Hexadecimal 1B 73 SetDisplay Csroff Opencom OC_Csroff Clear Character LCD ESC 1 byte 1 byte Operation clears the entire screen 1 Transmission Example clears the entire screen Hexadecimal 1B 43 SetDisplay Cls Opencom OC_Cls After this command is issued about 20ms of delay is needed Set Character LCD s Character Coordinate ESC parameter n1 LCD x axis See explanation for coordinates parameter n2 LCD y axis See explanation for coordinates
Download Pdf Manuals
Related Search
Related Contents
MANUAL DE INSTRUCCIONES Cargador Universal de Toshiba AT1S0-10013G 16GB 3G Black tablet Black & Decker TO1160C Use & Care Manual Frigidaire 800 Dishwasher User Manual 取扱説明書(PDF) Copyright © All rights reserved.
Failed to retrieve file