Do you have a question about the CUTOUCH CT1820 and is the answer not in the manual?
Questions and answers
Summary of Contents for COMFILE CUTOUCH CT1820
Page 1
An LCD Touch Screen with an Integrated BASIC & Ladder Logic Controller CUTOUCH CT1820 Last Updated 2015-06-08 www.ComfileTech.com Comfile Technology, Inc CT1820 User's Manual 1 Of 93...
Page 2
The data memory has been reduced: 28KB 7KB FRAM non-volatile memory has been added: 32KB The number of communication ports have been increased: 1 to 3 I/O can be extended with Comfile Technology's MODPORT (Field I/O) The enclosure is rated waterproof IP65. CT1721C...
RTC and RTC Battery Built-in Built-in The CT1820 does not contain a backup battery for the data memory. To retain data between power cycles, please use the FRAM non-volatile memory instead. Comfile Technology, Inc CT1820 User's Manual 5 Of 93...
LCD, and PLC can be significant, but the Cutouch provides and integrated solution at a relatively low cost.. Futhermore, the Cutouc is programmed is BASIC, a language that is quite easy to learn and use. Comfile Technology, Inc CT1820 User's Manual 6 Of 93...
Cubloc Studio is the Integrated Development Environment used to program the CT1820 in both BASIC and Ladder Logic. It is a free download available from www.ComfileTech.com. * To program the CT1820, be sure to #include "CT18XX" at the top of the source file. Comfile Technology, Inc CT1820 User's Manual 10 Of 93...
CT1820 end is a 3-pin Molex SPOX 5268 female connector. If the host PC does not have any built-in RS-232 serial ports, a USB-to-serial adapter can be used. Comfile Technology, Inc CT1820 User's Manual 11 Of 93...
Page 13
After the host PC is connected to the CT1820 via the download cable, open Cubloc Studio and choose → "Setup" "PC int erface setup..." from the menu. Select the host PC's serial port (Com Port) that is connected to the CT1820. Comfile Technology, Inc CT1820 User's Manual 13 Of 93...
Clicking this icon will save the source code, compile, and initiate downloading Once a program is compiled and downloaded to the CT1820, it cannot be retrieved and decompiled back into source code form. Comfile Technology, Inc CT1820 User's Manual 14 Of 93...
If new firmware is released, a new version of Cubloc Studio will also be released. When downloading with the latest version of Cubloc Studio, a prompt may appear to update the CT1820's firmware. Comfile Technology, Inc CT1820 User's Manual 15 Of 93...
CT1820 Start Pack The CT1820 Start Pack is recommended for initial CT1820 purchases. It contains all the necessary accessories to take full advantage of the CT1820's features. Comfile Technology, Inc CT1820 User's Manual 16 Of 93...
Page 18
NOTE: The CT1820 Start Pack does not include a USB-to-serial adapter/cable. If your host PC does not have a built-in RS-232 serial port, you may need to buy a USB-to-serial adapter/cable separately. Comfile Technology, Inc CT1820 User's Manual 18 Of 93...
*Please do not attempt to disassemble the the CT1820, as it can result in unintentional damage to the the LCD and other components. Products that have been tampered with will not receive warranty or service benefits. Comfile Technology, Inc CT1820 User's Manual 20 Of 93...
Page 21
If the load is inductive, such as a relay, please be sure to connect the positive terminal to the V pin. This can help to eliminate sparking when switching. *Warning. Please refrain from wiring while power is connected to avoid shorts and subsequent damage to the unit. Comfile Technology, Inc CT1820 User's Manual 21 Of 93...
Page 22
This is a 40-pin terminal block connector with 16 inputs and 16 outputs, as depicted in the following image. Cables and terminal block are sold separately. The Start Pack includes a 1-meter cable, but 0.5-meter, 2-meter, and 5-meter cables are also available. Comfile Technology, Inc CT1820 User's Manual 22 Of 93...
Page 23
*Please do no use unassigned pins (e.g. Low 56 'This pin is not assigned) *Warning. Please refrain from wiring while power is connected to avoid shorts and subsequent damage to the unit. Comfile Technology, Inc CT1820 User's Manual 23 Of 93...
Low 45 Pwm 9,950,1024 Pwm 10,750,1024 Pwm 11,450,1024 The PWM output is an open-collector transistor output. It can be used in the configuration below to control the brightness of an LED. Comfile Technology, Inc CT1820 User's Manual 24 Of 93...
Page 25
RX, TX Channel 1 RS-232 Channel 2 RX, TX Channel 2 RS-485 Channel 3 4+, 4-, SG Channel 3, Modport or other RS-485 connection 5V (0.25A) Output, generated internally by the CT1820. Comfile Technology, Inc CT1820 User's Manual 25 Of 93...
Page 26
For reading voltage signals Warning: Please do not exceed the specified current and voltage ranges, or the device may become damanged. Use the download port to connect the 3-pin download cable as shown below. Comfile Technology, Inc CT1820 User's Manual 26 Of 93...
5 ~ 30VDC Recommended Operating Voltage 6 ~ 27VDC Maximum Switching Frequency 100Hz Maximum Current 250mA / Pin Minimum Current 10mA / Pin High-speed counter and external interrupt features are not supported. Comfile Technology, Inc CT1820 User's Manual 27 Of 93...
They are used quite often in the field of automation. The following instructions show how to connect the 2-wire and 3-wire type DC 2-Wire Model Sensor output connected in reverse Comfile Technology, Inc CT1820 User's Manual 28 Of 93...
Page 30
DC 3-Wire Model (PNP type) Sensor output connected in reverse DC 3-Wire Model (NPN type) Sensor output connected in reverse Comfile Technology, Inc CT1820 User's Manual 30 Of 93...
Lower numbered designations are stored in the lower significant bits and higher numbered designations are stored in higher significant bits. For example, the P region would appear as follows when accessed as WP. Comfile Technology, Inc CT1820 User's Manual 31 Of 93...
The CT1820 8 10-bit analog input channels: Channels 0~3 are 0~20mA current analog inputs. • Channels 4~7 are 0~10VDC voltage analog inputs. • A = ADIn(4) ' Read from analog input channel 4 Comfile Technology, Inc CT1820 User's Manual 33 Of 93...
: Address to read the data from Reads one byte of data from the FRAM at address address, and stores the result in variable. A = FramRead(14) ' Reads one byte of data from address 14 Comfile Technology, Inc CT1820 User's Manual 34 Of 93...
, then then the number of seconds is 11, not 17. Displaying the value in hexadecimal, is one way to show the value in decimal as illustrated in the example below. A = RTCRead(0) Debug Hex2 A,Cr Comfile Technology, Inc CT1820 User's Manual 35 Of 93...
Page 36
= RTCRead(5) Debug Goxy,1,6,Hex2 i, " Month" i = RTCRead(6) Debug Goxy,1,7,Hex2 i, " Year" Wait 500 Loop The results of this example are displayed in the Cubloc Studio debug terminal. Comfile Technology, Inc CT1820 User's Manual 36 Of 93...
Page 37
However, the RTC is not 100% accurate, and if used for an extended period of time, a drift may become apparent, and will need to be re-synchronized with a current time source. Comfile Technology, Inc CT1820 User's Manual...
CT18Beep value value : Integer variable or constant (less than 255). Generates a beep. To generate an adequate feedback beep on a touch event, use a value between 20 and 50. Comfile Technology, Inc CT1820 User's Manual 38 Of 93...
' Open Channel 1 By #include "CT18XX", channel 3 can be used for RS-485 for communicating with RS-485 peripherals such as Comfile Technology's ModPort field I/O controller. Be sure to use Set RS485 to set pin 71 as the transmit enable pin.
&HFFF. The following program shows how this value can be read and corrected to ensure an appropriate value. Dim Cont_value As Byte Cont_value = EERead(&hfff, 1) If Cont_value < 100 Or Cont_value > 200 Then ' Ensure an appropriate value Cont_value = 150 EndIf CT18Contrast Cont_value Comfile Technology, Inc CT1820 User's Manual 40 Of 93...
Each button's status can be changed at any time by calling the MenuSet command, and each button can be given a different function on a different screen, resulting in virtually an unlimited number of menus and buttons. Comfile Technology, Inc CT1820 User's Manual 42 Of 93...
Page 43
This is useful to provide visual feedback to a user, indicating that a menu button has been touched. MenuSetClear MenuSetClear Clears all menu buttons on the screen. Call this before creating a new menu. This commands is not available in the CT1721C. Comfile Technology, Inc CT1820 User's Manual 43 Of 93...
Page 44
: Coordinates of the caption from the button's top-left corner string : The caption to display MenuSet only draws the button itself. Use the MenuTitle command to set the button's caption. MenuTitle 0,13,13,"Gas Left" MenuTitle 1,16,13,"Initialize" MenuTitle 2,13,13,"Total Cost" Comfile Technology, Inc CT1820 User's Manual 44 Of 93...
Page 45
(y1), 2 will read the x coordinate of the bottom-right corner (x2), and 3 will read the y coordinate of the bottom-right corner (y2). If Menu(0,1) < 100 THEN If menu button 0's top is less than 100 Comfile Technology, Inc CT1820 User's Manual 45 Of 93...
Page 46
Print Dec TX1, " ", Dec TY1 If Menucheck(0,TX1,TY1) = 1 Then Menureverse2 0,3 Notice the '2' at the end of this command Ct18beep 20 Audio feedback I = 0 End If Return Comfile Technology, Inc CT1820 User's Manual 46 Of 93...
CT1721C CT18XX Set Pad 0,4,5 On Pad Gosub TouchInput On Pad Gosub TouchInput Loop Loop TouchInput: TouchInput: Tx = Getpad(2) Tx = Sys(10) Ty = GetPad(2) Ty = Sys(11) Return Return Comfile Technology, Inc CT1820 User's Manual 47 Of 93...
Page 48
End If If Menucheck(1,TX1,TY1) = 1 Then Menureverse 1 CT18beep 20 ' Audio feedback End If If Menucheck(2,TX1,TY1) = 1 Then Menureverse 2 CT18beep 20 ' Audio feedback End If Return Comfile Technology, Inc CT1820 User's Manual 48 Of 93...
After the calibration is finished, the screen contrast can be adjusted. The screen contrast values will be written to EEPROM address &HFFF and can be read at runtime if necessary. Displays Increase the current screen date and contrast time Decrease the screen contrast Comfile Technology, Inc CT1820 User's Manual 49 Of 93...
Page 50
Dim Cont_value As Byte Cont_value = EERead(&hfff,1) If Cont_value < 100 Or Cont_value > 200 Then ' Set and appropriate value if needed Cont_value = 150 Endif CT18Contrast Cont_value Comfile Technology, Inc CT1820 User's Manual 50 Of 93...
After setting the date and time, the CT1820 will execute a program that can be used to adjust the screen contrast. The screen contrast will be saved to the EEPROM at address &HFFF and can be read to set the screen contrast at runtime. Comfile Technology, Inc CT1820 User's Manual 51 Of 93...
Using the CT2820 with the Modport The Modport is a modular, RS-485, Modbus field I/O controller from Comfile Technology featuring digital input and output, analog input, temperature sensing, and a variety of other features. It can be purchased from http://www.comfiletech.com/modport.aspx.
OnOff: Whether to turn the pin on or off (on = 1, off = 0) Command to turn on/off a pin on the MD-DOSO8 DC source output module. MPSource 1, 2, 1 ' Turn on module 1, pin 2 Comfile Technology, Inc CT1820 User's Manual 54 Of 93...
Page 55
Reads the state of a pin on the MD-DIDC8 module. The value read is stored in Variable. A = MPIn(2, 3) ' Read pin 3 of module 2 and store the results in A Comfile Technology, Inc CT1820 User's Manual 55 Of 93...
Page 56
25.4°C. Negative temperatures are indicated with a most significant bit of 1 (Note that this is not 2's complement). Please see the MD-THRT4's documentation for more information. A = MPThIn(2, 1) ' Read temperature from module 2, channel 1 and store in A Comfile Technology, Inc CT1820 User's Manual 56 Of 93...
Page 57
222,222 is returned if value is greater than 5V. Values falling within the 1~5V rage will return a value between 0 and 100,000 (13.3 bit resolution). A = MPHADIn(2, 3) ' Read from module 2, channel 3 and store value in A Comfile Technology, Inc CT1820 User's Manual 57 Of 93...
Page 58
OutputValue : Integer value representing the current to output (0~60000) Outputs a current on one of the channels of a MD-DAOUT2 module. MPDAOutA 1, 2, B ' Outputs current B on module 1, channel 2 Comfile Technology, Inc CT1820 User's Manual 58 Of 93...
Page 60
TY1 = Sys(11) Pset TX1,TY1 Ct18beep 10 Return Comfile Technology's input simulator is used in this example to make it easy to toggle and test inputs. The input simulator can be purchased from http://www.comfiletech.com/inputsimulatoer.aspx. Comfile Technology, Inc CT1820 User's Manual...
Simply cut and past this code into Cubloc Studio to give it a try. #include "CT18XX" Dim I As Integer Ct18contrast 150 ' LCD contrast setting Locate 15, 6 Print DEC5 I Incr I Delay 200 Loop Comfile Technology, Inc CT1820 User's Manual 62 Of 93...
End If Return Set Pad is used to configure the dedicated kepad/touchpad port. On Pad is used to assign an interrupt service routine to jump to when a touch event occurs. Comfile Technology, Inc CT1820 User's Manual 63 Of 93...
Dim I As Integer Dim TX1 As Integer, TY1 As Integer Ct18contrast 150 On Pad Gosub GETTOUCH Loop GETTOUCH: TX1 = Sys(10) TY1 = Sys(11) Circlefill TX1,TY1,2 CT18beep 20 ' Audio feedback Return Comfile Technology, Inc CT1820 User's Manual 64 Of 93...
Menuset 7,2,205,120,235,145 Menutitle 7,11,4,"8" Menuset 8,2,245,120,275,145 Menutitle 8,11,4,"9" Menuset 9,2,165,155,195,180 Menutitle 9,11,4,"0" Menuset 10,2,205,155,275,180 Menutitle 10,17,4,"ENTER" I =0 Loop GETTOUCH: TX1 = Sys(10) TY1 = Sys(11) If Menucheck(0,TX1,TY1) = 1 Then Comfile Technology, Inc CT1820 User's Manual 65 Of 93...
Page 66
End If Locate 3,3 Print HEX4 I Return The final result is stored as binary coded decimal (BCD), so the BCD2Bin command is used to convert the value to binary format. Comfile Technology, Inc CT1820 User's Manual 66 Of 93...
Sample 5: CuCanvas It can be quite inconvenient to compute coordinates and layout a user interface in code, so Comfile Technology created the CuCanvas WYSIWYG utility to make it easier for users to layout a user interface and generate the necessary BASIC code. CuCanvas is a free download from Comfile Technology's website.
Page 68
The menu button index (ID) will be displayed in the top left corner. Enter text in the "Title" textbox to change the button's caption. Add additional buttons to create the numpad as shown below. Comfile Technology, Inc CT1820 User's Manual 68 Of 93...
Page 69
Click the "To Clipboard" button to copy the code and paste it in "Cubloc Studio". The code can also be saved as a Cubloc Studio include file by choosing the "Save to File.." button. Comfile Technology, Inc CT1820 User's Manual...
Page 70
I = I + 9 CT18beep 20 Elseif Menucheck(9,TX1,TY1) = 1 Then I = I << 4 CT18beep 20 Elseif Menucheck(10,TX1,TY1) = 1 Then I = 0 CT18beep 20 End If Comfile Technology, Inc CT1820 User's Manual 70 Of 93...
Page 71
We must place the #include directive at the end of the code, as the generated code is in the form of a subroutine, which must come after the End statement in the main program. Comfile Technology, Inc CT1820 User's Manual...
MenuCheck tests should be run for a particular screen. Subroutines are very useful for compartmentalizing the code. The following code can be cut an pasted into Cubloc Studio. Comfile Technology, Inc CT1820 User's Manual 72 Of 93...
Page 73
Case _SUBMENU3 ProcessSubMenu3 Case _SUBMENU4 ProcessSubMenu4 End Select Return Sub ProcessMainMenu() If Menucheck(0,TX1,TY1) = 1 Then FlashMenu 0 CurrentScreen = _SUBMENU1 SUBMENU1 Elseif Menucheck(1,TX1,TY1) = 1 Then FlashMenu 1 CurrentScreen = _SUBMENU2 Comfile Technology, Inc CT1820 User's Manual 73 Of 93...
Page 74
FlashMenu 1 CurrentScreen = _MAINMENU MAIN Endif End Sub Sub ProcessSubMenu4() If Menucheck(0,TX1,TY1) = 1 Then FlashMenu 0 Beeper 4 Elseif Menucheck(1,TX1,TY1) = 1 Then FlashMenu 1 CurrentScreen = _MAINMENU MAIN Endif Comfile Technology, Inc CT1820 User's Manual 74 Of 93...
Page 75
Font 6,1 Style 0,0,0 Glocate 96,24 Gprint "Submenu 1" Linestyle 0 Dotsize 0,0 Color 1 Box 80,16,232,56 Font 2,1 Menuset 0,2,88,88,224,120 Menutitle 0,22,8,"Beep 1 time" Menuset 1,2,0,208,72,239 Menutitle 1,10,7,"<BACK" Font 4,0 Comfile Technology, Inc CT1820 User's Manual 75 Of 93...
Page 76
The CurrentScreen variable is used to keep track of the active page being displayed. This variable is checked in the touch interrupt service routine to determine which set of MenuChecks to perform. Comfile Technology, Inc CT1820 User's Manual 76 Of 93...
Page 78
The date and time are displayed on the top of the screen as read from the RTC. Displays Increase the current screen date and contrast time Decrease the screen contrast Comfile Technology, Inc CT1820 User's Manual 78 Of 93...
Sample 8: RTC Adjustment This sample program can be used to adjust the RTC's date and time. The user interface layout is created with CuCanvas. Comfile Technology, Inc CT1820 User's Manual 79 Of 93...
Page 80
If Menucheck(8,TX1,TY1) = 1 Then ' Min EffectFlash 8 VaIncr 1,59 Elseif Menucheck(9,TX1,TY1) = 1 Then EffectFlash 9 VaDecr 1,0 Endif If Menucheck(10,TX1,TY1) = 1 Then ' Sec EffectFlash 10 VaIncr 0,59 Comfile Technology, Inc CT1820 User's Manual 80 Of 93...
(Preparation: Insert the bolt into the mounting bracket as shown in the image below Insert the unit into a properly prepared panel cutout per the previously described panel cutout dimensions. (Panel thickness can be between 1 and 6 mm.) Comfile Technology, Inc CT1820 User's Manual 91 Of 93...
Page 92
Insert the mounting brackets into the groove on the side of the unit, pull the bracket towards the rear of the unit. Slide the bracket laterally to secure in place. Comfile Technology, Inc CT1820 User's Manual 92 Of 93...
Page 93
(Caution: Be careful not to tighten the bolts excessively to avoid damaging to the unit and/or the panel) 5. Repeat steps 2~4 for each remaining mounting bracket. - A look at the CT1820 after properly mounted – Comfile Technology, Inc CT1820 User's Manual 93 Of 93...
Need help?
Do you have a question about the CUTOUCH CT1820 and is the answer not in the manual?
Questions and answers