Databse Tend Window

  • Upload
    coi

  • View
    20

  • Download
    0

Embed Size (px)

DESCRIPTION

Databse Tend Window autobase

Citation preview

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    HNG DN TO

    Database Window - Database Trend Lu gi tr ca Tag v thi gian vo file MS.Access

    Hin th trn Object Database Window (c th Update data trn database Window)

    Hin th cc gi tr ca Tag bng th s dng Object Database Trend (Update data, chn thi

    gian xem data, phng to or thu nh hin th ca th)

    1. To file Access.mdb To 1 Table c tn Bang1 v 3 ct: Thoigian,Tag1,Tag2,Tag3 nh hnh di

    Lu vo mt th mc.

    2. To Project mi hoc module bn mun s dng trong Autobase Studio To 3 Tag AI kiu Memory v vit Script t ng thay i gi tr cc Tag v lu cc gi tr ny vo Database mi s 1 ln (ty chn)

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    3. To kt ni gia Autobase v file Access, trong chng trnh Studio t menu chn Config/Database Connection

    Chn nt Add sau thit lp cc thong s nh hnh di trong mc Connection String ta phi nhp ng ng dn lu file Access va to trn, nhn nt Connection kim tra kt ni nu bo nh hnh di l OK.

    click

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    4. To cc Tag test To 3 AI Tag kiu Memory

    Lp cc thuc tnh ca Tag nh hnh di

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    5. Vit Script n gin t ng thay i gi tr ca Tag 1s 1 ln (gi tr thay i t 0 ~

    65535 ) T menu chn File/ Script/At Program Running

    Chn Add v t tn cho Script

    Click kp phi chut vit Script

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Nhn Help v chn th Index tm cu lnh Rand ly gi tr mc nh

    Vit on chng trnh sau

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    (nhn nt Tag trong hp thoi ln lt chn cc Tag)

    Sau nhn Complie kim tra c php cc cu lnh nu bo Success l c. Nhn OK thot v nhn Local Main chy chng trnh

    Nhn nt Run/Stop kch hot Script va vit (ch cn kch hot mt ln duy nht) kim tra xem cc gi tr ca Tag thay i cha ta chn View/ Entire Tag

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Nu cc gi tr ca Tag t ng thay i nh hnh di l OK

    6. Vit Script lu cc gi tr ca Tag vo Database m ta to ra trn

    T menu chn File/ Script/At Program Running

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Trc tin ta s lu ngy gi ca h thng vo ct ThoiGian trong Database to Dng cc cu lnh hnh di ly ngy gi ca h thng

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    lu d liu ca cc Tag v d liu ngy thng hin ti ta s dng cc cu lnh sau

    Gii thch: Cu lnh@sprintf(buf,"%02d/%02d/%04d %02d:%02d:%02d", d,mon,y,h,m,s); lu

    d liu thi gian vo bin buf vi nh dng thi gian l ngy/thng/nm gi/pht/giy nh dng ny phi ging vi nh dng ca h iu hnh trn my tnh

    dang s dng nh th cc d liu mi hin th trn Database Trend c

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Cu lnh@sprintf(query,"INSERT INTO Bang1 (ThoiGian,Tag1,Tag2,Tag3) VALUES

    ('%s',%05d,%05d,%05d)",buf,$Tag1,$Tag2,$Tag3); V @DbCommand("connect", query); thc hin chn data vo Database Khai bo cc bin s dng trong Script bng cch nhn nt Add v khai bo nh hnh di

    Sau khi vit xong script v compile chy chng trnh m file Access ta s thy kt qu nh hnh sau

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Vic lu d liu vo database hon thnh tip theo s hin th d liu ny trn Object ca Autobase

    7. Chn Object database Window

    Chn database Object v click kp chn cc thng s nh hnh sau

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    To nt nhn t tn l Update vit Script khi nhn vo nt ny cc d liu c cp nht t file Database

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Click kp vo nt nhn va to chn th Expand, chn nh hnh di v vit Script cho s kin Mouse On Down

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Chy chng trnh v th kim tra

    Tip theo chn Database Trend hin th cc d liu trn th

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    vic theo di d liu c thun tin ta c th vit thm Script d liu lun c cp nht v hin th trn Database Trend ta thc hin nh sau: Trong chng trnh Studio chn File/ Script/At Program Running vit tip vo Script savedata.CTLX 2 dng lnh sau:

    Nhn chut phi vo vng ny

    chn thi gian xem d liu

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Sau chy chupwng trnh v quan st. phng to hoc thu nh phm vi hin th ca th ta to hai nt nhn v vit Script cho tnh nng m rng nh sau:

    Vit cho nt phng to s kin Mouse On Down

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Vit cho nt thu nh s kin Mouse On Down

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Sau chy chng trnh v th quan st kt qu Nu nh cc bn mun xem thi gian trc d liu th hin nh th no trn th ta c th to thm 2 nt nhn thc hin dch th qua tri hoc qua phi

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Vi nt nhn dch qua tri (xem hnh)

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    Vi nt nhn dch qua phi

    Nhn Ok hon thnh v chy chng trnh

  • AutoBase Scada Email: [email protected] Website: www.autobasescada.com

    P-6.6D, Tng 6, E-TOWN 2, 364 Cng Ha, P.13, Q.Tn Bnh, HCMC

    Tel: 84-8-38-427-903 / Fax: 84-8-38-120-546

    Customer Care: 093 5858 658

    Email : [email protected] / www.autobase.vn