Cuwin Manual

Embed Size (px)

Citation preview

  • 8/10/2019 Cuwin Manual

    1/73

    CUWIN5000/6000/CWV Series

    Microsoft Windows Embedded CETouch Controller

    User's Manual2014-10-01

    E er!thin" for Embedded Control#

    Comfile Technology Inc.www.cubloc.com

    Copyright 1996,2010 Comfile Technology

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 1 of )*

  • 8/10/2019 Cuwin Manual

    2/73

    Table of Contents$reface .........................................................................................................*% er iew ......................................................................................................+$owerin" %n the CUW& for the (irst Time ...................................................6

    #etting the CUWIN&$ per(ting 'o-e..............................................................6owering n the CUWIN................................................................................)

    Connectin" the CUW& to a $ersonal Com)uter *$C+ ....................................9In$t(lling the U#/ ri er...............................................................................9

    cti e#ync 3Win-ow$ 4 5............................................................................1*Win-ow$ 'obile e ice Center 3Win-ow$ "i$t(, )5..........................................21

    ,ettin" the CUW& s Ethernet M.C .ddress ................................................2)CUWIN 7 6 ....................................................................................2)CUWIN CW" #erie$.....................................................................................2)

    /e elo)in" ,oftware for the CUW& ...........................................................29In$t(lling "i$u(l #tu-io 2008........................................................................29In$t(lling the CUWIN #oftw(re e elopment it 3# 5....................................**Cre(ting ur :ir$t CUWIN rogr(m................................................................*8

    &nterfacin" the CUW& to %ther /e ices .....................................................+6;#

  • 8/10/2019 Cuwin Manual

    3/73

    PrefaceThi$ -ocument w($ cre(te- to help our cu$tomer$ >uic?ly e plore (n- en@oy the CUWIN without h( ingto $pen- much effort re(-ing -ocument(tion (n- e perimenting beforeh(n-. Thi$ -ocument will helpu$er$ connect the CUWIN to ( C, tr(n$fer file$ to (n- from the CUWIN (n- ( C, progr(m the CUWIN,(n- interf(ce the CUWIN to other -igit(l -e ice$ li?e the CU/= C.

    The e erci$e$ in thi$ -ocument will m(?e u$e of "i$u(l #tu-io 2008, the CA progr(mming l(ngu(ge,(n- the .Net Comp(ct :r(mewor?, but the CUWIN c(n be progr(mme- in (ny progr(mming l(ngu(ge(n- -e elopment en ironment th(t i$ comp(tible with Win-ow$ Bmbe--e- CB 6.0 (n- the CUWIN&$proce$$or. Thi$ inclu-e$, but i$ not limite- to, "i$u(l /($ic (n- C .

    Thi$ -ocument will m(?e u$e of the CUWIN 200, but (ll e (mple$ c(n be e($ily (-(pt(ble to (nyCUWIN mo-el with little or no mo-ific(tion.

    We hope thi$ -ocument will re e(l @u$t how e($y it i$ to >uic?ly begin u$ing the CUWIN, -e elop$oftw(re, (n- interf(ce the CUWIN to (lmo$t (ny -igit(l -e ice.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l * of )*

  • 8/10/2019 Cuwin Manual

    4/73

    OverviewThe CUWIN i$ ( Win-ow$ Bmbe--e- CB touch controller prim(rily t(rgete- for u$e ($ ( Dum(n'(chine Interf(ce3D'I5.

    The CUWIN&$ front p(nel fe(ture$ (n 800 +80 color touch $creen c(p(ble of recei ing input from (hum(n u$er, by touching the $creen, (n- -i$pl(ying colorful inform(tion.

    The CUWIN&$ re(r (n- $i-e p(nel$ fe(ture $e er(l interf(ce$ 3;#2*2!+8 , U#/, Bthernet, u-io, #C(r-5 for communic(ting with m(ny -ifferent electronic -e ice$.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l + of )*

  • 8/10/2019 Cuwin Manual

    5/73

    The CUWIN tr(n$l(te$ input from ( hum(n u$er to $ign(l$ th(t electronic -e ice$ c(n un-er$t(n-, (n-recei e$ $ign(l$ from tho$e electronic -e ice$, tr(n$l(ting them to colorful output th(t the u$er c(nun-er$t(n-. Thu$, the CUWIN $er e$ ($ ( Dum(n '(chine Interf(ce3D'I5.

    U$ing the CU/= C, Tiny =C or other rogr(mm(ble =ogic Controller$3 =C5, the CUWIN c(n pro i-e (hum(n interf(ce to electronic (n- mech(nic(l $y$tem$ $uch ($ robot$, monitoring $y$tem$,en ironment control $y$tem$, (n- (utom(tion e>uipment @u$t to n(me ( few. The CUWIN h($ beenu$e- in (ll ?in-$ of (pplic(tion$ from $ol(r energy $y$tem$ th(t tr(c? the $un to be(uty (ppli(nce$ for$tyling h(ir. The po$$ibilitie$ (re en-le$$.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l of )*

  • 8/10/2019 Cuwin Manual

    6/73

    Powering On the CUWIN for the irst Ti!e

    Setting the CUWIN"s O#erating $o%eThe CUWIN i$ ery fle ible (n- c(n oper(te in m(ny mo-e$ -epen-ing on the CUWIN&$ fin(l purpo$e.The following t(ble li$t$ the CUWIN&$ -ifferent oper(ting mo-e$.

    $osition

    $osition (unction Mode 1 2 4

    1

    /oot e ice3 000!6000 #erie$5

    ;e$er e- ff

    N N :l($h n

    /oot e ice3CW" #erie$5

    N N :l($h ff

    ;e$er e- n

    2 (n- * /oot 'o-e

    ;e$er e- n n

    uto

  • 8/10/2019 Cuwin Manual

    7/73

    Powering On the CUWIN

    Now th(t the CUWIN&$ oper(ting mo-e h($ been $et, we (re re(-y to power on the CUWIN for the fir$ttime. It i$ not nece$$(ry to m(?e (ny connection$ to the CUWIN e cept the power c(ble. Connect thepower c(ble (n- power on the CUWIN by -epre$$ing the power $witch.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l ) of )*

  • 8/10/2019 Cuwin Manual

    8/73

    fter ( few $econ-$ the Win-ow$ Bmbe--e- CB -e$?top will (ppe(r. To complete the e erci$e$ in thi$-ocument, it i$ not nece$$(ry to un-er$t(n- e(ch of the$e fe(ture$. :or now, ( $imple o er iew will$uffice.

    &tem /escri)tion

    1 'y e ice pen$ the file e plorer.

    2 ;ecycle /in #tor(ge for -elete- file$ before perm(nent -eletion.

    * Internet B plorer Internet brow$er

    + '(cUtil Utility to ch(nge the Networ? Interf(ce C(r-3NIC5&$ 'e-i( cce$$Control3' C5 (--re$$. CUWIN 000 7 6000 $erie$ only.

    'e-i( l(yer Win-ow$ CB 'e-i( pl(yer for pl(ying (u-io (n- i-eo file$.

    6 #( e;eg$ Utility to perm(nently $( e (ny ch(nge$ to the -e ice&$ regi$try.

    ) #t(rt /utton pen$ the Win-ow$ CB #t(rt 'enu

    8 #y$tem Tr(y Win-ow$ CB #y$tem Tr(y

    9 #how e$?top 'inimiJe$ (ny open win-ow$ (n- $how$ the Win-ow$ CB -e$?top.

    10 Input (nel pen$ the Win-ow$ CB Input (nel 3on$creen ?eybo(r-5

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 8 of )*

  • 8/10/2019 Cuwin Manual

    9/73

    Connecting the CUWIN to a Personal Co!#&ter 'PC(In or-er to cu$tomiJe the CUWIN for your nee-$ you will li?ely nee- to tr(n$fer -(t( (n- progr(m$ tothe CUWIN. Typic(lly thi$ i$ -one by connecting the CUWIN to ( er$on(l Computer 3 C5.

    In or-er for ( C to communic(te with the CUWIN, ( U#/ -e ice -ri er mu$t be in$t(lle- on the C.nce the -ri er i$ in$t(lle-, cti e#ync 3Win-ow$ 4 5 or Win-ow$ 'obile e ice Center 3Win-ow$

    "i$t( (n- Win-ow$ )5 c(n be u$e- to copy -(t( (n- progr(m$ to (n- from ( C (n- the CUWIN.

    Installing the US) *river The following in$truction$ -e$cribe how to in$t(ll the CUWIN&$ U#/ -ri er on the C. lthough thein$truction$ (re illu$tr(te- u$ing Win-ow$ 4 , the $(me proce-ure $houl- be followe- for Win-ow$"i$t( or Win-ow$ ).

    1. ownlo(- the F cti e#ync U#/ ri er KCUWIN 000 $erie$LH file from the Comfile Technologyweb$ite (t httpE!!www.cubloc.com!-(t(!0).php , (n- unJip the file to ( fol-er of your choo$ing.

    2. U$ing ( U#/ c(ble, connect the CUWIN to the C.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 9 of )*

    http://www.cubloc.com/data/07.phphttp://www.cubloc.com/data/07.php
  • 8/10/2019 Cuwin Manual

    10/73

    *. fter connecting the CUWIN to the C, the F:oun- New D(r-w(re WiJ(r-H will (ppe(r. #elect FIn$t(ll from ( li$t or $pecific loc(tion3 - (nce-5H (n- clic? the FNe tH button.

    +. #elect F#e(rch for the be$t -ri er in the$e loc(tion$H r(-io button (n- the FInclu-e thi$ loc(tionin the $e(rchEH chec?bo . Then, brow$e to the fol-er cont(ining the -ri er$ th(t were

    -ownlo(-e- in $tep 1, (n- clic? the FNe tH button.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 10 of )*

  • 8/10/2019 Cuwin Manual

    11/73

    . The C will begin $e(rching for ( $uit(ble -ri er. W(it for it to fini$h.

    6. When it loc(te$ the -ri er, it will -i$pl(y ( -i(log bo ($ $hown (bo e. Clic? the FContinuenyw(yH button.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 11 of )*

  • 8/10/2019 Cuwin Manual

    12/73

    ). The -ri er will then in$t(ll. When it i$ fini$he-, the win-ow (bo e will (ppe(r. Clic? the F:ini$hH button.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 12 of )*

  • 8/10/2019 Cuwin Manual

    13/73

    +ctiveS,nc 'Win%ows -P(fter the U#/ -ri er h($ been in$t(lle-, cti e#ync 3Win-ow$ 4 5 or Win-ow$ 'obile e ice Center

    3Win-ow$ "i$t(, or Win-ow$ )5 c(n be in$t(lle-.

    If you (re running Win-ow$ 4 , ple($e perform the following proce-ure to in$t(ll cti e#ync.

    1. ownlo(- cti e#ync % t the time of thi$ writing, the l(te$t er$ion w($ +. (n- coul- be-ownlo(-e- from httpE!!www.micro$oft.com!win-ow$mobile!enue$t5E

    3e)l!

    7alue /escri)tion

    0 01 #l( e --re$$ 1

    0 0 ;e(- /it0 0000 ;egi$ter --re$$ 0 3 ort 05

    0 ::00 The =B w($ turne- on

    0 8C* C;C

    Turnin" the 5E/ %ff

    To h( e the CU/= C turn the =B off, we i$$ue the following 'o-bu$ U.

    3e6uest

    7alue /escri)tion

    0 01 #l( e --re$$ 1

    0 0 Write bit

    0 0000 ;egi$ter --re$$ 0 3 ort 05

    0 0000 Turn the =B off

    0 C C C;C

    The CU/= C will re$pon- with the following 'o-bu$ U 3(n echo of the re>ue$t5E

    3e)l!

    7alue /escri)tion0 01 #l( e --re$$ 1

    0 0 ;e(- /it

    0 0000 ;egi$ter --re$$ 0 3 ort 05

    0 0000 The =B w($ turne- off

    0 C C C;C

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 61 of )*

  • 8/10/2019 Cuwin Manual

    62/73

    Setting U# the CU):OC

    Now th(t we h( e ( gener(l i-e( wh(t 'o-bu$ i$, we nee- to $et up the CU/= C to perform the t($?(t h(n-. :ollow the following proce-ure$ to progr(m the CU/= C, connect one of it$ I! port$ to (n=B , (n- connect it to the CUWIN.

    1. U$ing Cubloc #tu-io, progr(m the CU/= C ($ $hown (bo e. Thi$ will configure the CU/= C tocommunic(te i( 'o-bu$ o er it$ $eri(l port, (n- en(ble port 0 to (pply olt(ge to (n =B . Iti$ not nece$$(ry to fully un-er$t(n- thi$ progr(m. If you w(nt to le(rn more (boutprogr(mming the CU/= C, $ee the CU/= C&$ u$er m(nu(l.

    2. Connect the CU/= C&$ I! port 0 to (n =B . The im(ge (bo e illu$tr(te$ how to (ccompli$h

    thi$ u$ing the CU/= C #tu-y /o(r-.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 62 of )*

  • 8/10/2019 Cuwin Manual

    63/73

  • 8/10/2019 Cuwin Manual

    64/73

    Progra!!ing the CUWIN

    Now th(t the CU/= C h($ been progr(mme- to proce$$ 'o-bu$ U$, configure- to light (n =B , (n-connecte- to the CUWIN, we nee- to progr(m the CUWIN to $en- 'o-bu$ U$ to the CU/= C.

    1. Cre(te ( new $m(rt -e ice pro@ect @u$t ($ we -i- in the pre iou$ e erci$e$, (n- n(me it FToggle=B H.

    2. '(?e the pro@ect ( F e ice pplic(tionH pro@ect @u$t ($ we -i- in the pre iou$ e erci$e$.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 6+ of )*

  • 8/10/2019 Cuwin Manual

    65/73

    *. -- ( l(bel (n- ( button to the form. =(bel the button FToggleH (n- the l(bel F=B #t(teH.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 6 of )*

  • 8/10/2019 Cuwin Manual

    66/73

    using System;using System.ComponentModel;using System.Windows. o ms;using System.IO.Ports;

    namespa"e #oggle-3?$ pu%li" pa tial "lass o m& ' o m $ pu%li" o m&() $ nitiali eComponent(); *

    private SerialPort _port;

    private void Form1_Load( object sender !vent"rgs e# $

    )) on:igure t3e serial port _port % ne& SerialPort (#; _port.-aud ate % 1*+,,; _port. ata-its % 0; _port.Parity % Parity ./one; _port.Stop-its % Stop-its .One;

    ))Open t3e serial port _port.Open(#; 2

    private void Form1_ losing( object sender ancel!vent"rgs e# $

    )) lose t3e serial port _port. lose(#; 2 2*

    +. -- the co-e (bo e to the form&$ -oad (n- Closing e ent h(n-ler$. Thi$ will configure theCUWIN&$ $eri(l port (n- open it when the form lo(-$. When the form clo$e$, the the $eri(l portwill be clo$e-.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 66 of )*

    38

    39

    40

    41

    4243

    44

    45

    4647

    48

    49

    50

    5152

    5354

    55

    56

    57

    58

    5960

    61

    6263

    64

    65

    6667

    68

    69

    70

    71

    7273

  • 8/10/2019 Cuwin Manual

    67/73

    using System;using System.ComponentModel;using System.Windows. o ms;using System. ,.6o ts;using System.73reading;

    namespa"e #oggle-3?$ pu%li" pa tial "lass o m& ' o m $ pu%li" o m&() $ nitiali eComponent(); *

    p i0ate Se ial6o t +po t; private byte ?@ _response % ne& byte ?0@; private Aanual eset!vent _evt % ne& Aanual eset!vent ( :alse #;

    p i0ate 0oid o m&+-oad( o%1e"t sende 2 30ent4 gs e) $

    88Con@igu e the se ial po t +po t 5 new Se ial6o t (); +po t.Baud; +po t.6a ity 5 6a ity .=one; +po t.StopBits 5 StopBits .,ne;

    ))Listen :or data arriving on t3e serial port _port. ata eceived % ne&

    Serial ata eceived!vent5andler (_port_ ata eceived#;

    88,pen the se ial po t +po t.,pen(); *

    p i0ate 0oid o m&+Closing( o%1e"t sende 2 Can"el30ent4 gs e) $

    88Close the se ial po t +po t.Close(); *

    void _port_ ata eceived( object sender Serial ata eceived!vent"rgs e# $ )) ead data into _response bu::er _port. ead(_response , _port.-ytes7o ead#;

    ))/oti:y t3at a response &as received _evt.Set(#; 2 **

    . tt(ch (n e ent h(n-ler to the $eri(l port$ ?ata

  • 8/10/2019 Cuwin Manual

    68/73

    88

  • 8/10/2019 Cuwin Manual

    69/73

    ))I: turnOn is true turn on L! . Ot3er&ise turn o:: L! private void 3angeL! State( bool turnOn# $ ))slave address % ,=,1 )):unction code % ,=, B &rite bit ))register address % ,=,, ,=,, ))On or O:: % O=FF ,=,, (on# ,=,, ,=,, (,::# ))crc % ,=0 ,=D" (on# ,= ,= " (o::# byte ?@ reCuest; i: (turnOn# $ reCuest % ne& byte ?@

    $ ,=,1 ,=, ,=,, ,=,, ,=FF ,=,, ,=0 ,=D" 2; 2 else $ reCuest % ne& byte ?@

    $ ,=,1 ,=, ,=,, ,=,, ,=,, ,=,, ,= ,= " 2; 2

    ))send reCuest _port.8rite(reCuest , reCuest.Lengt3#;

    ))8ait :or a response _evt.8aitOne(#; _evt. eset(#; 2

    ). -- ( function c(lle- Change-3?State th(t $en-$ ( 'o-bu$ U to the CU/= C to turn the =Bon or off, (n- w(it$ for ( re$pon$e U from the CU/= C 3 +e0t.Wait,ne() 5. The re$pon$e

    U from the CU/= C i$ not nee-e-, $o it i$ ignore-.

    Comfile Technology CUWIN 000!6000!CW" #erie$ % U$er&$ '(nu(l 69 of )*

    76

    77

    78

    79

    80

    81

    82

    83

    8485

    86

    87

    88

    89

    90

    91

    92

    93

    94

    9596

    97

    9899

    100

    101

    102

  • 8/10/2019 Cuwin Manual

    70/73

    private void button1_ lic4( object sender !vent"rgs e# $ ))Is L! on or o::G bool isOn % eadL! State(#;

    ))7oggle L! 3angeL! State(6isOn#;

    )) on:irmH Is L! on or o::G isOn % eadL! State(#;

    ))

  • 8/10/2019 Cuwin Manual

    71/73

    10. :in(lly, (-@u$t the pro@ect propertie$ ($ we -i- in the pre iou$ e erci$e$.

    Dow the Co-e Wor?$E

    1. When the form lo(-$, the form&$ -oad e ent fire$, c(lling the o m&+-oad e ent h(n-ler. Thi$e ent h(n-ler configure$ the CUWIN&$ $eri(l port, (tt(che$ the +po t+?ata

  • 8/10/2019 Cuwin Manual

    72/73

  • 8/10/2019 Cuwin Manual

    73/73