Вверх ↑
Ответов: 7
Рейтинг: 1
#1: 2009-03-19 04:11:47 ЛС | профиль | цитата
Konst, схемку очень интересную выложили но я разобраться так и не смог с ней( не мой уровень пока), сделал по другому, по проще. И опять вопрос, в прикрепленной мной схеме несколько строк кнопок, каждая строка формирует 1 байт данных и нужно эти байты выстроить последовательно и выкинуть в порт. Т.е. алгоритм примерно такой - управляющее слово, пауза, 1 байт, пауза, 2 байт, пауза и так далее пока все данные строк не уйдут в порт а будет их 8 байт(8 строк)?
Add(Button,12246793,-17,190){
Left=305
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,13398493:doWork1,[])
}
Add(MultiElement,13398493,25,190)
{
@Hint=#6:Тригер|
link(onEvent1,12246793:doCaption,[(69,196)(69,184)(-29,184)(-29,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(BitsToInt,15279095,130,246)
{
Count=8
link(Bit1,13398493:Var1,[(136,231)(31,231)])
link(Bit2,4306580:Var1,[(143,227)(122,227)])
link(Bit3,10393824:Var1,[(150,234)(213,234)])
link(Bit4,111375:Var1,[(157,231)(297,231)])
link(Bit5,3727421:Var1,[(164,234)(402,234)])
link(Bit6,6635506:Var1,[(171,234)(507,234)])
link(Bit7,10268411:Var1,[(178,234)(612,234)])
link(Bit8,14724644:Var1,[(185,234)(717,234)])
}
Add(Button,10963940,74,190)
{
Left=340
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,4306580:doWork1,[])
}
Add(MultiElement,4306580,116,190)
{
@Hint=#6:Тригер|
link(onEvent1,10963940:doCaption,[(160,196)(160,184)(62,184)(62,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,12193188,165,190)
{
Left=375
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,10393824:doWork1,[])
}
Add(MultiElement,10393824,207,190)
{
@Hint=#6:Тригер|
link(onEvent1,12193188:doCaption,[(251,196)(251,184)(153,184)(153,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,13345815,249,190)
{
Left=410
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,111375:doWork1,[])
}
Add(MultiElement,111375,291,190)
{
@Hint=#6:Тригер|
link(onEvent1,13345815:doCaption,[(335,196)(335,184)(237,184)(237,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,9893295,354,190)
{
Left=445
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,3727421:doWork1,[])
}
Add(MultiElement,3727421,396,190)
{
@Hint=#6:Тригер|
link(onEvent1,9893295:doCaption,[(440,196)(440,184)(342,184)(342,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,13083207,459,190)
{
Left=480
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,6635506:doWork1,[])
}
Add(MultiElement,6635506,501,190)
{
@Hint=#6:Тригер|
link(onEvent1,13083207:doCaption,[(545,196)(545,184)(447,184)(447,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,13447098,564,190)
{
Left=515
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,10268411:doWork1,[])
}
Add(MultiElement,10268411,606,190)
{
@Hint=#6:Тригер|
link(onEvent1,13447098:doCaption,[(650,196)(650,184)(552,184)(552,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,12346736,669,190)
{
Left=550
Top=55
Width=25
Caption=""
Point(doCaption)
link(onClick,14724644:doWork1,[])
}
Add(MultiElement,14724644,711,190)
{
@Hint=#6:Тригер|
link(onEvent1,12346736:doCaption,[(755,196)(755,184)(657,184)(657,196)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Timer,691591,-122,155)
{
Interval=10
link(onTimer,9897739:doEvent1,[])
}
Add(Button,5040984,-10,365)
{
Left=305
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,2770882:doWork1,[])
}
Add(MultiElement,2770882,32,365)
{
@Hint=#6:Тригер|
link(onEvent1,5040984:doCaption,[(76,371)(76,359)(-22,359)(-22,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(BitsToInt,14707469,137,421)
{
Count=8
link(Bit1,2770882:Var1,[(143,409)(38,409)])
link(Bit2,6408849:Var1,[(150,402)(129,402)])
link(Bit3,12512592:Var1,[(157,409)(220,409)])
link(Bit4,15141263:Var1,[(164,406)(304,406)])
link(Bit5,417567:Var1,[(171,409)(409,409)])
link(Bit6,15702086:Var1,[(178,409)(514,409)])
link(Bit7,15791372:Var1,[(185,409)(619,409)])
link(Bit8,16090319:Var1,[(192,409)(724,409)])
}
Add(Button,7420477,81,365)
{
Left=340
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,6408849:doWork1,[])
}
Add(MultiElement,6408849,123,365)
{
@Hint=#6:Тригер|
link(onEvent1,7420477:doCaption,[(167,371)(167,359)(69,359)(69,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,2893281,172,365)
{
Left=375
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,12512592:doWork1,[])
}
Add(MultiElement,12512592,214,365)
{
@Hint=#6:Тригер|
link(onEvent1,2893281:doCaption,[(258,371)(258,359)(160,359)(160,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,6686171,256,365)
{
Left=410
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,15141263:doWork1,[])
}
Add(MultiElement,15141263,298,365)
{
@Hint=#6:Тригер|
link(onEvent1,6686171:doCaption,[(342,371)(342,359)(244,359)(244,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,5841404,361,365)
{
Left=445
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,417567:doWork1,[])
}
Add(MultiElement,417567,403,365)
{
@Hint=#6:Тригер|
link(onEvent1,5841404:doCaption,[(447,371)(447,359)(349,359)(349,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,8325931,466,365)
{
Left=480
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,15702086:doWork1,[])
}
Add(MultiElement,15702086,508,365)
{
@Hint=#6:Тригер|
link(onEvent1,8325931:doCaption,[(552,371)(552,359)(454,359)(454,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,1122730,571,365)
{
Left=515
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,15791372:doWork1,[])
}
Add(MultiElement,15791372,613,365)
{
@Hint=#6:Тригер|
link(onEvent1,1122730:doCaption,[(657,371)(657,359)(559,359)(559,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Button,13182923,676,365)
{
Left=550
Top=85
Width=25
Caption=""
Point(doCaption)
link(onClick,16090319:doWork1,[])
}
Add(MultiElement,16090319,718,365)
{
@Hint=#6:Тригер|
link(onEvent1,13182923:doCaption,[(762,371)(762,359)(664,359)(664,371)])
}
BEGIN_SDK
Add(EditMulti,8352169,21,21)
{
EventCount=3
WorkCount=1
VarCount=1
link(doWork1,2733293:doEvent1,[(73,27)(73,34)])
link(Var1,7334230:State,[(27,158)(167,158)])
}
Add(Switch,5481113,161,28)
{
DataOn=String(on)
link(onSwitch,8352169:onEvent1,[(257,34)(257,27)])
}
Add(Switch,7334230,161,63)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(State)
}
Add(Hub,2733293,126,28)
{
link(onEvent1,5481113:doSwitch,[])
link(onEvent2,7334230:doSwitch,[(150,41)(150,69)])
}
END_SDK
Add(Hub,9897739,-73,155)
{
OutCount=3
link(onEvent1,15279095:doNumber,[(35,161)(35,252)])
link(onEvent2,14707469:doNumber,[(39,168)(39,427)])
link(onEvent3,2360547:doTimer,[(25,175)(25,504)])
}
Add(LedNumber,282875,172,498)
{
Left=370
Top=140
Width=150
Height=60
Text="123"
ShowLines=0
ColorHover=0
Point(doText)
Point(Text)
link(Text,14707469:Number,[(178,476)(143,476)])
}
Add(Timer,2360547,109,498)
{
Interval=100
link(onTimer,282875:doText,[])
}
[/cоde]
карма: 0

0