亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? opc.tcl

?? SCILab的OPC擴(kuò)展包, SCILab編程大賽獲獎(jiǎng)作品.
?? TCL
字號(hào):
##########################################################
##     OPC Toolbox
##     OPC.tcl
##     Developed by Zhe.Peng & Longhua.Ma
##     Email:pengzhe1113@gmail.com
##     Zhejiang Univ. Hangzhou, China
##     Dec.2006
###########################################################

set server_n 0
set servername 0
set server_num 0
set server_na(0) 0
set item_n 0
set itemname 0
set item_num 0
set item_na(0) 0
set DIRE
set w .opc
catch {destroy $w}
toplevel $w
wm title $w "OPC Toolbox V1.2"
canvas $w.c -width 800 -height 450 -bg blue


#ScilabEval "opc_server_n=opc_server_browse();"


####################### server frame ###########################

labelframe $w.server -width 150 -height 450 -text "OPC Server"

label $w.server.label1 -text "Loca OPC Server:" 

frame $w.server.list -width 150
scrollbar $w.server.list.yscroll -command "$w.server.list.list yview"
scrollbar $w.server.list.xscroll -orient horizontal  -command "$w.server.list.list xview"
listbox $w.server.list.list -height 15 -yscroll "$w.server.list.yscroll set" -xscroll "$w.server.list.xscroll set"

label $w.server.label2 -text "You Selected" 
entry $w.server.entry -textvariable servername
button $w.server.button1 -width 15 -height 1 -text "Connect" -command {
ScilabEval "opc_connect('$servername')"
$w.server.button1 configure -state "disabled" -bg gray 
$w.group.button configure -state "normal" -bg green
}
button $w.server.button2 -width 15 -height 1 -text "Disconnect" -command {
$w.server.button1 configure -state "normal" -bg green
$w.item.top.mid.button4 configure -state "disabled" -bg gray 
$w.item.buttom.top.button configure -state "disabled" -bg gray 
$w.item.buttom.buttom.button configure -state "disabled" -bg gray 
$w.server.button2 configure -state "disabled" -bg gray 
set autovalue 0
$w.item.buttom.top.ch configure -state "disabled"
ScilabEval "opc_disconnect()"
}


pack $w.server.label1 $w.server.list $w.server.label2 $w.server.entry $w.server.button1 $w.server.button2 -side top -pady 5
grid $w.server.list.list -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
grid $w.server.list.yscroll -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news
grid $w.server.list.xscroll -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news

####################### group frame ###########################

labelframe $w.group -width 450 -height 50 -text "OPC Group"

label $w.group.label0 -text " " -height 8
label $w.group.label -text "OPC Group Name" 
entry $w.group.entry -textvariable opcgroup
button $w.group.button -width 15 -height 1 -text "Add" -command {
$w.group.button configure -state "disabled" -bg gray
$w.server.button1 configure -state "disabled" -bg gray
$w.item.top.mid.button1 configure -state "normal" -bg green
$w.item.top.mid.button2 configure -state "normal" -bg green
$w.item.top.mid.button3 configure -state "normal" -bg green
ScilabEval "opc_add_group('$opcgroup')"

ScilabEval "opc_item_n=opc_item_browse();"
ScilabEval "item_i=1"
after 520 ScilabEval "opc_item_num_b=size(opc_item_n)"
after 540 ScilabEval "opc_item_num_b=opc_item_num_b(1)"
after 560 ScilabEval "opc_item_n1=opc_item_num_b(1)"
after 580 ScilabEval "TCL_SetVar('item_num',opc_item_n1)"
after 600 initial_item

}

pack $w.group.label0 $w.group.label $w.group.entry $w.group.button -side left

####################### item frame ###########################

labelframe $w.item -width 450 -height 400 -text "OPC Item"

####################### item top frame ###########################

frame $w.item.top -width 450 -height 220


####################### item top left frame ###########################

frame $w.item.top.left -width 100 -height 200

label $w.item.top.left.label -text "Item Name" 

frame $w.item.top.left.list -width 150
scrollbar $w.item.top.left.list.yscroll -command "$w.item.top.left.list.list yview"
scrollbar $w.item.top.left.list.xscroll -orient horizontal  -command "$w.item.top.left.list.list xview"
listbox $w.item.top.left.list.list -height 13 -yscroll "$w.item.top.left.list.yscroll set" -xscroll "$w.item.top.left.list.xscroll set"
grid $w.item.top.left.list.list -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
grid $w.item.top.left.list.yscroll -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news
grid $w.item.top.left.list.xscroll -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news

pack $w.item.top.left.label $w.item.top.left.list -side top

####################### item top mid frame ###########################

frame $w.item.top.mid -width 60 -height 200

button $w.item.top.mid.button1 -width 3 -height 1 -text ">"  -command {
global w
set write_item_name [$w.item.top.left.list.list get [$w.item.top.left.list.list curselection] ]
$w.item.top.right.list.list insert end $write_item_name
}

button $w.item.top.mid.button2 -width 3 -height 1 -text "<" -command {
global w
$w.item.top.right.list.list delete [$w.item.top.right.list.list curselection]
}

button $w.item.top.mid.button3 -width 3 -height 1 -text "OK"  -command {

$w.item.top.mid.button1 configure -state "disabled" -bg gray
$w.item.top.mid.button2 configure -state "disabled" -bg gray
$w.item.top.mid.button3 configure -state "disabled" -bg gray
$w.item.top.mid.button4 configure -state "normal" -bg green
$w.item.buttom.top.button configure -state "normal" -bg green
$w.item.buttom.buttom.button configure -state "normal" -bg green
$w.item.buttom.top.ch configure -state "normal"
$w.server.button2 configure -state "normal" -bg green
set item_t [$w.item.top.right.list.list index end]
for {set list_num_temp 0} {$list_num_temp<[$w.item.top.right.list.list index end]} {incr list_num_temp 1} {
ScilabEval "item($list_num_temp+1)='[$w.item.top.right.list.list get $list_num_temp]'"
ScilabEval "item_num_$list_num_temp=$list_num_temp"
}

ScilabEval "item_num=$item_t"
ScilabEval "opc_add_item(item,item_num)"

}
 
button $w.item.top.mid.button4 -width 3 -height 1 -text "Edit"  -command {
$w.item.top.mid.button1 configure -state "normal" -bg green
$w.item.top.mid.button2 configure -state "normal" -bg green
$w.item.top.mid.button3 configure -state "normal" -bg green
set autovalue 0
$w.item.buttom.top.ch configure -state "disabled"
}

pack $w.item.top.mid.button1 $w.item.top.mid.button2 $w.item.top.mid.button3 $w.item.top.mid.button4 -side top -pady 1

####################### item top right frame ###########################

frame $w.item.top.right -width 100 -height 200

label $w.item.top.right.label -text "Item" 

frame $w.item.top.right.list -width 150
scrollbar $w.item.top.right.list.yscroll -command "$w.item.top.right.list.list yview"
scrollbar $w.item.top.right.list.xscroll -orient horizontal  -command "$w.item.top.right.list.list xview"
listbox $w.item.top.right.list.list -height 13 -yscroll "$w.item.top.right.list.yscroll set" -xscroll "$w.item.top.right.list.xscroll set"
grid $w.item.top.right.list.list -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
grid $w.item.top.right.list.yscroll -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news
grid $w.item.top.right.list.xscroll -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news

pack $w.item.top.right.label $w.item.top.right.list -side top




####################### item top right2 frame ###########################

frame $w.item.top.right2 -width 100 -height 200

label $w.item.top.right2.label -text "Value" 

frame $w.item.top.right2.list -width 150
scrollbar $w.item.top.right2.list.yscroll -command "$w.item.top.right2.list.list yview"
scrollbar $w.item.top.right2.list.xscroll -orient horizontal  -command "$w.item.top.right2.list.list xview"
listbox $w.item.top.right2.list.list -height 13 -yscroll "$w.item.top.right2.list.yscroll set" -xscroll "$w.item.top.right2.list.xscroll set"
grid $w.item.top.right2.list.list -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
grid $w.item.top.right2.list.yscroll -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news
grid $w.item.top.right2.list.xscroll -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news

pack $w.item.top.right2.label $w.item.top.right2.list -side top


pack $w.item.top.left $w.item.top.mid $w.item.top.right $w.item.top.right2 -side left -padx 3


####################### item buttom frame ###########################

frame $w.item.buttom -width 450 -height 150

####################### item buttom top1 frame ###########################

labelframe $w.item.buttom.top1 -width 450 -height 50 -text "Item Add Mannual"

entry $w.item.buttom.top1.ch -textvariable item_mannual -width 20
button $w.item.buttom.top1.button -width 20 -height 1 -text "Add Mannual Item"  -command {

$w.item.top.right.list.list insert end $item_mannual

}


pack $w.item.buttom.top1.ch $w.item.buttom.top1.button -side left -padx 10

####################### item buttom top frame ###########################

labelframe $w.item.buttom.top -width 450 -height 50 -text "Item Read"

checkbutton $w.item.buttom.top.ch -text "Auto Read" -variable autovalue -relief flat
button $w.item.buttom.top.button -width 10 -height 1 -text "Read"  -command {
$w.item.top.right2.list.list delete 0 [$w.item.top.right2.list.list index end]
ScilabEval {item_read_result=opc_item_read(item_num,'f')}

for {set list_num_temp 0} {$list_num_temp<[$w.item.top.right.list.list index end]} {incr list_num_temp 1} {
ScilabEval "item_read_i=$list_num_temp+1"
ScilabEval "TCL_SetVar('item_read_temp($list_num_temp)',item_read_result(item_read_i))"
$w.item.top.right2.list.list insert end $item_read_temp($list_num_temp)
}
}


pack $w.item.buttom.top.ch $w.item.buttom.top.button -side left -padx 10

####################### item buttom buttom frame ###########################

labelframe $w.item.buttom.buttom -width 450 -height 50 -text "Item Write"

####################### item buttom buttom t frame ###########################

frame $w.item.buttom.buttom.t -width 300 -height 45

label $w.item.buttom.buttom.label1 -text "Item Name" 
entry $w.item.buttom.buttom.entry1 -textvariable write_item_name -width 20
entry $w.item.buttom.buttom.entry2 -textvariable write_item_i -width 2
label $w.item.buttom.buttom.label2 -text "Item Value" 
entry $w.item.buttom.buttom.entry3 -textvariable write_item_value -width 8
button $w.item.buttom.buttom.button -width 15 -height 1 -text "Write"  -width 8 -command {
ScilabEval "item_write_i=$write_item_i"
ScilabEval "item_write_v=$write_item_value"
ScilabEval "opc_item_write(item_write_i,item_write_v,'f')"
} 

pack $w.item.buttom.buttom.label1 $w.item.buttom.buttom.entry1 $w.item.buttom.buttom.entry2 $w.item.buttom.buttom.label2  $w.item.buttom.buttom.entry3 $w.item.buttom.buttom.button -side left

pack $w.item.buttom.top1 $w.item.buttom.top $w.item.buttom.buttom -side top -pady 1
pack $w.item.top $w.item.buttom -side top -pady 2


pack $w.server -side left
pack $w.group $w.item -side top -padx 5

foreach value {server group item item.top item.buttom item.buttom.top1 item.buttom.top item.buttom.buttom} {
    pack propagate $w.$value false
}


proc initial_list {} {
global w
global server_na
global server_num
set item_tt [$w.server.list.list index end]
$w.server.list.list delete 0 [$w.server.list.list index end]
ScilabEval "opc_server_num=opc_server_num(1)"
ScilabEval "item_read_i=1"
for {set list_num_temp 0} {$list_num_temp<$server_num} {incr list_num_temp 1} {
ScilabEval "item_read_i=$list_num_temp+1"
ScilabEval "TCL_SetVar('server_na($list_num_temp)',opc_server_n(item_read_i))"
}
after 500 add_list
}

proc add_list {} {
global w
global server_na
global server_num
global servername
set servername $server_na(0)
for {set list_num_temp 0} {$list_num_temp<$server_num-1} {incr list_num_temp 1} {
$w.server.list.list insert end $server_na($list_num_temp)
}
}

proc initial_item {} {
global w
global item_na
global item_num
set item_tt [$w.item.top.left.list.list index end]
$w.item.top.left.list.list delete 0 [$w.item.top.left.list.list index end]
ScilabEval "opc_server_num=opc_server_num(1)"
ScilabEval "item_read_i=1"
for {set list_num_temp 0} {$list_num_temp<$item_num} {incr list_num_temp 1} {
ScilabEval "item_read_i=$list_num_temp+1"
ScilabEval "TCL_SetVar('item_na($list_num_temp)',opc_item_n(item_read_i))"
}
after 200 add_item
}

proc add_item {} {
global w
global item_na
global item_num
global itemname
for {set list_num_temp 0} {$list_num_temp<$item_num-1} {incr list_num_temp 1} {
$w.item.top.left.list.list insert end $item_na($list_num_temp)
}
}


ScilabEval "item_i=1"
ScilabEval "opc_server_num=size(opc_server_n)"
after 100 ScilabEval "opc_server_num=opc_server_num(1)"
after 200 ScilabEval "opc_server_n1=opc_server_n(1)"
after 300 ScilabEval "TCL_SetVar('server_num',opc_server_num)"
after 500 initial_list



####################### bind mouse ###########################

bind $w.server.list.list <ButtonRelease-1> {
set servername [$w.server.list.list get [$w.server.list.list curselection] ]
}

bind $w.item.top.right.list.list <ButtonRelease-1> {
set write_item_i [$w.item.top.right.list.list curselection]
set write_item_name [$w.item.top.right.list.list get [$w.item.top.right.list.list curselection] ]
}


set opcgroup Group1
$w.server.button1 configure -state "normal" -bg green
$w.server.button2 configure -state "disabled"
$w.group.button configure -state "disabled"
$w.item.top.mid.button1 configure -state "disabled"
$w.item.top.mid.button2 configure -state "disabled"
$w.item.top.mid.button3 configure -state "disabled"
$w.item.top.mid.button4 configure -state "disabled"
$w.item.buttom.top.button configure -state "disabled"
$w.item.buttom.buttom.button configure -state "disabled"
$w.server.entry configure -state "disabled"
$w.item.buttom.top.ch configure -state "disabled"


proc time_loop {} {
global w
global list_num_temp
global item_read_temp
global autovalue

if {$autovalue==1} {

$w.item.top.right2.list.list delete 0 [$w.item.top.right2.list.list index end]
ScilabEval {item_read_result=opc_item_read(item_num,'f')}
for {set list_num_temp 0} {$list_num_temp<[$w.item.top.right.list.list index end]} {incr list_num_temp 1} {
ScilabEval "item_read_i=$list_num_temp+1"
ScilabEval "TCL_SetVar('item_read_temp($list_num_temp)',item_read_result(item_read_i))"
$w.item.top.right2.list.list insert end $item_read_temp($list_num_temp)
}

} else {}

after 1000 time_loop
}

after 1000 time_loop

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂久久一区二区三区| 国产精品亚洲综合一区在线观看| 91日韩精品一区| 国产目拍亚洲精品99久久精品| 久久国产精品一区二区| 欧美一区二区三区在线电影| 亚洲国产日日夜夜| 欧美丝袜丝nylons| 亚洲一区二区三区四区五区黄| 在线看国产一区二区| 亚洲欧美日韩中文播放 | 欧美性高清videossexo| 亚洲丝袜美腿综合| 99久久99精品久久久久久| 国产精品毛片无遮挡高清| 成人avav在线| 亚洲婷婷综合色高清在线| 国产一区中文字幕| 成人福利视频在线看| 一区二区免费在线播放| 欧美美女直播网站| 黑人巨大精品欧美一区| 亚洲免费资源在线播放| 欧美久久一区二区| 国产成人精品免费网站| 国产精品国产三级国产普通话99 | 国产欧美日本一区二区三区| 国产一区二区在线观看视频| 久久精品一二三| 成人av在线资源| 亚洲美女电影在线| 欧美日韩专区在线| 日本强好片久久久久久aaa| 日韩欧美综合一区| 国产一区二区导航在线播放| 中国av一区二区三区| 91尤物视频在线观看| 亚洲综合网站在线观看| 欧美精品v国产精品v日韩精品| 美脚の诱脚舐め脚责91| 国产午夜一区二区三区| 一本色道亚洲精品aⅴ| 亚洲国产乱码最新视频| 欧美一区二区三区人| 精品一区二区免费视频| 国产精品美女久久久久久2018| 在线这里只有精品| 久久国产综合精品| 国产精品久久久99| 欧美麻豆精品久久久久久| 看片的网站亚洲| 中文字幕日本不卡| 欧美精品乱码久久久久久按摩| 久久99国产精品免费网站| 中文字幕一区二区三区在线不卡| 91视频91自| 麻豆免费看一区二区三区| 亚洲欧洲一区二区在线播放| 欧美美女一区二区在线观看| 国产成人午夜片在线观看高清观看| 亚洲免费在线观看视频| 欧美一区二区网站| 成人app在线| 日本美女一区二区| 最新日韩av在线| 91精品婷婷国产综合久久性色| 加勒比av一区二区| 亚洲一区二区三区四区五区黄| 精品国产乱码久久久久久牛牛 | 久久综合999| 99久久国产综合色|国产精品| 视频一区视频二区在线观看| 国产欧美综合在线观看第十页| 欧亚洲嫩模精品一区三区| 国产精品原创巨作av| 亚洲一区免费视频| 国产三区在线成人av| 欧美日韩国产精品自在自线| 大陆成人av片| 日韩国产欧美在线播放| 亚洲欧美综合色| 精品日韩一区二区三区| 91福利区一区二区三区| 粉嫩绯色av一区二区在线观看 | 夜夜嗨av一区二区三区网页 | 三级欧美在线一区| 亚洲四区在线观看| 国产亚洲欧美在线| 欧美精品在线一区二区| 99国产欧美另类久久久精品 | 亚洲福利一二三区| 中文字幕精品一区二区精品绿巨人| 欧美高清视频一二三区| 91麻豆免费观看| 国产成人免费9x9x人网站视频| 日本不卡视频在线| 一区二区免费在线| 国产精品国产自产拍高清av王其 | 日韩一二三区不卡| 欧洲激情一区二区| 99在线精品视频| 国产成人综合在线播放| 麻豆精品一区二区三区| 午夜精品久久久久久久99樱桃 | 国产清纯美女被跳蛋高潮一区二区久久w | 国产一区二区福利| 青娱乐精品视频在线| 亚洲图片一区二区| 自拍偷拍欧美激情| 中文无字幕一区二区三区| 欧美r级在线观看| 91精品国产综合久久蜜臀| 欧美在线视频不卡| 色哟哟国产精品| 99riav久久精品riav| 成人av影视在线观看| 国产精品性做久久久久久| 久久国产精品一区二区| 老司机精品视频一区二区三区| 奇米色一区二区三区四区| 丝袜a∨在线一区二区三区不卡| 亚洲一区在线视频| 亚洲狠狠爱一区二区三区| 一区二区三区丝袜| 亚洲激情在线播放| 一区二区三区四区蜜桃| 一区二区三区自拍| 亚洲一区免费观看| 亚洲国产成人av网| 亚洲成av人片| 天天操天天色综合| 日韩精品国产欧美| 美女视频免费一区| 国产一区二区三区在线看麻豆| 精品亚洲国内自在自线福利| 久久国产精品99久久久久久老狼| 免费黄网站欧美| 极品美女销魂一区二区三区免费| 看片网站欧美日韩| 国产剧情在线观看一区二区| 国产成人午夜99999| 风间由美性色一区二区三区| 成人av片在线观看| 一本大道久久a久久精品综合| 一本色道久久综合亚洲91| 91成人在线观看喷潮| 欧美精品丝袜中出| 日韩精品专区在线影院观看| 欧美精品一区二区三区很污很色的| 2020国产精品自拍| 国产欧美日韩精品一区| 亚洲色欲色欲www| 亚洲国产sm捆绑调教视频| 亚洲777理论| 老鸭窝一区二区久久精品| 六月婷婷色综合| 国产在线不卡一区| a亚洲天堂av| 欧美亚男人的天堂| 欧美日韩国产首页| 精品久久人人做人人爰| 日本一区二区不卡视频| 亚洲欧美日韩国产手机在线| 亚洲高清免费视频| 精品中文字幕一区二区小辣椒| 国产福利电影一区二区三区| 日本精品裸体写真集在线观看| 4438x亚洲最大成人网| 欧美精品一区二区三区一线天视频| 国产精品成人一区二区艾草| 亚洲一区二区三区精品在线| 日韩高清一级片| 成人亚洲一区二区一| 欧美亚洲国产bt| 亚洲精品一区二区在线观看| 专区另类欧美日韩| 免费欧美在线视频| 成人av免费观看| 欧美久久久久久久久久| 久久久久久亚洲综合影院红桃| 亚洲天堂av老司机| 麻豆国产精品官网| 一本到不卡精品视频在线观看| 91精品综合久久久久久| 欧美激情资源网| 亚洲二区在线观看| 国产麻豆9l精品三级站| 色吊一区二区三区| 精品国产91乱码一区二区三区| 亚洲欧洲日韩一区二区三区| 日本不卡一区二区| 91丨porny丨中文| 欧美成人综合网站| 一区二区三区在线播放| 国产精品资源在线看| 欧美日韩午夜在线视频| 国产偷国产偷精品高清尤物| 亚洲国产精品精华液网站| 福利电影一区二区| 日韩欧美国产精品|