Вверх ↑
Ответов: 16884
Рейтинг: 1239
#1: 2014-02-23 10:05:28 ЛС | профиль | цитата
mcmega писал(а):
А пример есть, как это реализовать,
примерно так же. code_33147.txt

И декодер сигналов от железа:

Add(MainForm,2953706,112,189)
{
Point(onClose)
link(onCreate,3850805:doEvent1,[])
link(onClose,15035776:doClose,[(173,216)(173,286)])
}
Add(Button,1322450,105,294)
{
Left=14
Top=15
Caption="g"
Data=String(g+)
link(onClick,3142314:doWork2,[])
}
Add(Button,15688073,105,329)
{
Left=14
Top=40
Caption="pf"
Data=String(pf+)
link(onClick,4414842:doWork2,[])
}
Add(Button,73296,105,364)
{
Left=14
Top=65
Caption="pe"
Data=String(pe+)
link(onClick,9074474:doWork2,[])
}
Add(Button,15548725,105,392)
{
Left=14
Top=90
Caption="c45b"
Data=String(c45b)
link(onClick,7257138:doWork2,[])
}
Add(Button,14237379,105,434)
{
Left=14
Top=115
Caption="XOFF"
link(onClick,5602895:doConvert,[])
}
Add(Button,6819307,105,476)
{
Left=14
Top=140
Caption="XON"
link(onClick,13931819:doConvert,[])
}
Add(HubEx,3142314,154,294)
{
link(onEvent,15035776:doWrite,[])
}
Add(HubEx,9074474,154,364)
{
Angle=3
link(onEvent,4414842:doWork3,[])
}
Add(HubEx,4414842,154,329)
{
Angle=3
link(onEvent,3142314:doWork3,[])
}
Add(HubEx,7257138,154,392)
{
Angle=3
link(onEvent,9074474:doWork3,[])
}
Add(StrList,7994844,707,245)
{
AddType=1
Strings=#3:pe+|3:pf+|4:c45b|2:g+|2:mr|2:er|
Point(doGetIndex)
Point(onGetIndex)
link(onGetIndex,11898870:doEvent,[])
}
Add(Convertor,14246260,637,245)
{
Mode=4
link(onResult,13041116:doWork2,[])
link(Data,8520888:Text,[])
}
Add(VisualStrings,8520888,637,210)
{
Lines=#2:19|
Width=18
}
Add(Hub,10453837,553,203)
{
link(onEvent1,13210507:doConvert,[])
link(onEvent2,14246260:doConvert,[(586,216)(586,251)])
}
Add(Convertor,13210507,595,203)
{
Mode=4
link(onResult,13041116:doWork3,[(690,209)])
link(Data,3418469:Text,[])
}
Add(VisualStrings,3418469,595,168)
{
Lines=#2:17|
Width=18
}
Add(HubEx,13041116,686,245)
{
link(onEvent,7994844:doAdd,[])
}
Add(IndexToChanel,11898870,763,252)
{
@Hint=#0:|6:1.XOFF|5:2.XON|5:3.pe+|5:4.pf+|6:5.c45b|4:6.g+|4:7.mr|4:8.er|
Count=8
link(onEvent1,2307227:doEvent,[(834,258)(834,279)])
link(onEvent2,1836327:doWork1,[(816,265)])
link(onEvent3,1836327:doWork2,[])
link(onEvent4,1836327:doWork3,[(816,279)])
link(onEvent5,1070684:doEvent,[])
link(onEvent6,12918804:doEvent,[])
link(onEvent7,11456517:doEvent1,[(814,300)(814,440)])
link(onEvent8,11456517:doEvent2,[(807,307)(807,447)])
AddHint(-4,-132,36,117,@Hint)
}
Add(Debug,1070684,847,280)
{
WEName="c45b"
}
Add(Debug,12918804,833,287)
{
WEName="g+"
}
Add(Memory,9849032,413,280)
{
link(onData,13276340:doEvent1,[])
}
Add(Hub,13276340,469,280)
{
link(onEvent1,15035776:doRXClear,[(493,286)(493,263)(308,263)(308,293)])
link(onEvent2,10218483:doLength,[])
}
Add(Length,10218483,525,287)
{
link(onLength,948834:doCompare,[])
}
Add(If_else,948834,574,287)
{
Type=2
Op2=Integer(4)
link(onTrue,2836196:doCopy,[])
link(onFalse,12252496:doData,[(625,300)(625,356)])
}
Add(Copy,2836196,637,287)
{
Position=1
Count=2
link(onCopy,5461020:doWork2,[])
link(Str,11188309:Var2,[(643,275)(634,275)])
}
Add(HubEx,5461020,686,287)
{
link(onEvent,7994844:doGetIndex,[])
}
Add(PointHint,4384588,504,259)
{
Info=#15:COM.doRXClear >|
Font=[MS Sans Serif,8,0,255,1]
Width=106
Height=18
}
Add(Thread,14457443,896,266)
{
}
Add(HubEx,1836327,812,266)
{
link(onEvent,3827459:doEvent,[])
}
Add(Copy,15109186,917,434)
{
@Hint=#6:Adress|
Position=3
Count=4
link(onCopy,8718580:doText,[])
link(Str,9440401:Var3,[(923,388)])
AddHint(18,-38,47,13,@Hint)
}
Add(Copy,4522557,896,497)
{
@Hint=#4:Data|
Position=8
Count=2
link(onCopy,12947709:doText,[])
link(Str,9440401:Var2,[])
AddHint(25,-23,38,13,@Hint)
}
Add(GetDataEx,5389416,628,383)
{
Angle=3
link(Data,9849032:Value,[(419,388)])
}
Add(GetDataEx,9440401,896,383)
{
Angle=3
link(Data,5389416:Var3,[])
}
Add(Hub,11456517,854,434)
{
InCount=2
link(onEvent1,15109186:doCopy,[])
link(onEvent2,4522557:doCopy,[(882,447)(882,503)])
}
Add(COM,15035776,329,273)
{
BaudRate=15
link(onWrite,15035776:doRead,[(372,279)(372,326)(310,326)(310,307)])
link(onRead,9849032:doValue,[])
}
Add(Hub,3850805,217,203)
{
link(onEvent1,10453837:doEvent1,[])
link(onEvent2,15035776:doOpen,[(280,216)(280,279)])
}
Add(DoData,12252496,644,350)
{
link(onEventData,5461020:doWork3,[(690,356)])
link(Data,11188309:Var3,[(650,334)])
}
Add(GetDataEx,11188309,628,329)
{
Angle=2
link(Data,5389416:Var1,[])
}
Add(Debug,3827459,861,266)
{
WEName="XON"
link(onEvent,14457443:doStart,[])
}
Add(Convertor,5602895,203,434)
{
Mode=4
link(onResult,7257138:doWork1,[(261,440)(261,398)])
link(Data,2484286:Text,[])
}
Add(VisualStrings,2484286,203,399)
{
Lines=#2:19|
Width=18
}
Add(Convertor,13931819,280,476)
{
Mode=4
link(onResult,9074474:doWork1,[(324,482)(324,370)])
link(Data,8130083:Text,[])
}
Add(VisualStrings,8130083,280,441)
{
Lines=#2:17|
Width=18
}
Add(Debug,2307227,882,273)
{
WEName="XOFF"
link(onEvent,14457443:doStop,[])
}
Add(Button,6845737,105,525)
{
Left=10
Top=175
Width=80
Caption="mr0023+FE"
Data=String(mr0023+FE)
link(onClick,4414842:doWork1,[(339,531)(339,335)])
}
Add(Label,8718580,1022,434)
{
Left=210
Top=140
}
Add(Label,12947709,1022,497)
{
Left=205
Top=175
}


карма: 25
Немного терпения! Дежурный экстрасенс скоро свяжется с Вами!
0
файлы: 1code_33147.txt [845B] [166]