<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=12&amp;t=10002&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2015-01-03T14:39:08+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=12&amp;t=10002&amp;mode</id>
<entry>
<author><name><![CDATA[slawek3000]]></name></author>
<updated>2015-01-03T14:39:08+01:00</updated>
<published>2015-01-03T14:39:08+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111947#p111947</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111947#p111947"/>
<title type="html"><![CDATA[Re: Przekazanie wartości zmiennej do drugiej zmiennej]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111947#p111947"><![CDATA[
Ok to jak po powinien wyglądać ten kawałek kodu , raczej te wartości z czytuje z RSa<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=988">slawek3000</a> — 3 sty 2015, o 14:39</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[slawek3000]]></name></author>
<updated>2015-01-03T13:38:49+01:00</updated>
<published>2015-01-03T13:38:49+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111936#p111936</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111936#p111936"/>
<title type="html"><![CDATA[Re: Przekazanie wartości zmiennej do drugiej zmiennej]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111936#p111936"><![CDATA[
[syntax=basic4gl]if Rs_input = 87 Then<br />           Locate 2 , 1 : Lcd &quot;Command:&quot; ; Y_command<br /><br />                     For I = 2 To 8 Step 1<br />                        Rs_in(i) = Inkey()<br />                  Next I<br /><br />           End If<br /><br />                      Az_serial_temp = Rs_in(2) + Rs_in(3) + Rs_in(4)<br />                           If Len(az_serial_temp) = 3 Then<br />                              Az_position = Val(az_serial_temp)<br />                           End If<br />                      El_serial_temp = Rs_in(6) + Rs_in(7) + Rs_in(8)<br />                              If Len(el_serial_temp) = 3 Then<br />                                 El_position = Val(el_serial_temp)<br />                              End If<br /><br />             <br /><br />                      &#91;b&#93;  Az_current_position = Az_position<br />                        El_current_position= El_position&#91;/b&#93;<br />           <br /><br />           Locate 3 , 1 : Lcd Rs_in(2) ; Rs_in(3) ; Rs_in(4) ; Rs_in(5) ; Rs_in(6) ; Rs_in(7) ; Rs_in(8)<br />            Gosub Rec_isr[/syntax]<br /><br />wyrwane z kontekstu ,ale proszę bardzo literka b w kwadratowym nawiasie ... na wyświetlaczu LCD ma te dane<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=988">slawek3000</a> — 3 sty 2015, o 13:38</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[anonimowy]]></name></author>
<updated>2015-01-03T13:33:41+01:00</updated>
<published>2015-01-03T13:33:41+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111935#p111935</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111935#p111935"/>
<title type="html"><![CDATA[Re: Przekazanie wartości zmiennej do drugiej zmiennej]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111935#p111935"><![CDATA[
Pokaż w którym miejscu wykonujesz to przypisanie, konkretny kawałek kodu.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=3542">anonimowy</a> — 3 sty 2015, o 13:33</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[slawek3000]]></name></author>
<updated>2015-01-03T13:15:48+01:00</updated>
<published>2015-01-03T13:15:48+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111932#p111932</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111932#p111932"/>
<title type="html"><![CDATA[Re: Przekazanie wartości zmiennej do drugiej zmiennej]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111932#p111932"><![CDATA[
Panie Mirku , wiem tylko jak miałem to obrazkowo przedstawić <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";-)" title="Puszcza oko" /><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=988">slawek3000</a> — 3 sty 2015, o 13:15</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mirekk36]]></name></author>
<updated>2015-01-03T13:06:55+01:00</updated>
<published>2015-01-03T13:06:55+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111931#p111931</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111931#p111931"/>
<title type="html"><![CDATA[Re: Przekazanie wartości zmiennej do drugiej zmiennej]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111931#p111931"><![CDATA[
<div class="quotetitle">slawek3000 napisał(a):</div><div class="quotecontent"><br />jest ok jeżeli chcę przypisać jej wartość z zmiennej Al_position i El_position nie działa<br /></div><br />Czy nie mogłeś umieścić dłuższego kodu ? byłoby jeszcze zabawniej<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=54">mirekk36</a> — 3 sty 2015, o 13:06</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[slawek3000]]></name></author>
<updated>2015-01-03T13:04:11+01:00</updated>
<published>2015-01-03T13:04:11+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111930#p111930</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111930#p111930"/>
<title type="html"><![CDATA[Przekazanie wartości zmiennej do drugiej zmiennej]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10002&amp;p=111930#p111930"><![CDATA[
Witam,<br />Panowie mam pewien problem z przekazaniem wartości zmiennej do innej chodzi dokładnie o zmienne <br /><br />Az_current_position<br />El_current_position<br /> <br />jeżeli przypiszę do niej wartości z palca <img src="https://forum.atnel.pl/images/smilies/icon_e_smile.gif" alt=":-)" title="Szczęśliwy" /> , czyli <br /><br />Az_current_position=150<br />El_current_position=10<br /><br />jest ok jeżeli chcę przypisać jej wartość z zmiennej Al_position i El_position nie działa <br /><br /><br />kod całości poniżej<br /><br />[syntax=basic4gl]$regfile = &quot;m644pdef.dat&quot;                                   ' specify the used micro<br />$crystal = 16000000<br />$baud = 19200<br /><br />Config Serialin = Buffered , Size = 20                      'konfiguracja bufora wejsciowego<br />Config Serialout = Buffered , Size = 20                     'konfiguracja bufora wyjsciowego<br /><br /><br />'Configuring the ADC for maximum resolution 10bits (0-1023)<br />Config Adc = Single , Prescaler = Auto , Reference = Avcc<br />Start Adc<br />'-------------------------------------------------------------------------------<br />                                                              'enable receive isr<br />Enable Interrupts<br /><br /><br /><br />'Declaring all Variables<br /><br />Dim Firmware As String * 5<br />Firmware = &quot;1.15c&quot;<br /><br />'Dim Beepcount As Word<br />'Dim Beeplength As Word<br />'Dim Beeptone As Byte<br /><br /><br />'Dim Az As Single<br />'Dim El As Single<br /><br />Dim Az_current_position As Word<br />Dim El_current_position As Word<br />Dim Az_position As Word<br />Dim El_position As Word<br />Dim El_temp_position As Word<br />Dim Az_temp_position As Word<br /><br />'Dim Az_preset As Word<br />'Dim El_preset As Byte<br />'Dim Az_preset_temp As Word<br />'Dim El_preset_temp As Byte<br />'Dim El_prepark As Byte<br />'Dim Az_prepark As Word<br /><br />'Dim Az_preset1 As Word<br />'Dim El_preset1 As Byte<br />'Dim Az_preset2 As Word<br />'Dim El_preset2 As Byte<br />'Dim Az_preset3 As Word<br />'Dim El_preset3 As Byte<br />'Dim Az_preset4 As Word<br />'Dim El_preset4 As Byte<br />'Dim Az_park As Word<br />'Dim El_park As Byte<br />'Dim Az_adress As Byte<br />'Dim El_adress As Byte<br /><br />'Dim Az_tempa As Word<br />'Dim El_tempa As Byte<br />'Dim Az_tempb As Word<br />'Dim El_tempb As Byte<br /><br />'Dim Azadc As Word<br />'Dim Eladc As Word<br /><br />'Dim Az_resolution As Single<br />'Dim El_resolution As Single<br />'Dim Az_span As Word<br />'Dim El_span As Word<br /><br />'Dim Endazy As Byte                                          ' X axis end coordinate for Azimuth arrow<br />'Dim Endazx As Byte                                          ' X axis end coordinate for Azimuth arrow<br />'Dim Endelx As Byte<br />'Dim Endely As Byte                                          '<br />'Dim Az_needle As Word                                       'Value from 0 to 260 for Azimuth arrow positioning<br />'Dim Az_needletemp As Word                                   'Temporary Value from 0-260 for Azimuth arrow resetting<br />'Dim El_needle As Word                                       'Value from 0 to ??? for Elevation arrow positioning<br />'Dim El_needletemp As Word                                   'Temporary Value from 0-??? for Elevation arrow resetting<br />'Dim Azxlinestart As Byte<br />'Dim Azylinestart As Byte<br />'Dim Elxlinestart As Byte<br />'Dim Elylinestart As Byte<br />'Dim Azimuth As Word<br />'Dim Elevation As Word<br /><br />'Dim Az360multiplier As Single<br />'Dim El90multiplier As Single<br />'Dim El180multiplier As Single<br />'Dim Az450multiplier As Single<br /><br />'Dim Az360pixconv As Single<br />'Dim El180pixconv As Single<br />'Dim Az450pixconv As Single<br />'Dim El90pixconv As Single<br /><br />'Dim El_deadband As Byte<br />'Dim Az_deadband As Byte<br /><br />'Dim Az_0_calibration As Word<br />'Dim Az_450_calibration As Word<br />'Dim Az_360_calibration As Word<br />'Dim El_0_calibration As Word<br />'Dim El_90_calibration As Word<br />'Dim El_180_calibration As Word<br /><br />'Dim Az_mode As Byte                                         '0=360 degree mode, 1=450 degree mode<br />'Dim El_mode As Byte                                         '0=90 degree mode, 1=180 degree mode<br /><br />'Dim Az_offset As Word<br />'Dim El_offset As Word<br /><br />'Dim Az_degrees As Word<br />'Dim El_degrees As Word<br />'Dim Az_optimiser As Integer<br />'Dim El_optimiser As Integer<br /><br />'Dim Park_az As Word<br />'Dim Park_el As Byte<br /><br />'Dim Keystep_el As Byte<br />'Dim Keystep_az As Byte<br /><br />'Dim Device As Byte                                          '0= Az only, 1= Azimuth and  Elevation<br /><br />'Dim Az_max_calibration As Word                              'Maximum calculated ADC value for selected AZ mode<br />'Dim El_max_calibration As Word                              'Maximum calculated ADC value for selected EL mode<br />'Dim Calbit As Bit<br />'Dim Caladc As Word<br /><br />'Dim Az_max_degree As Word                                   'Maximum calculated Decimal value for selected AZ mode<br />'Dim El_max_degree As Word                                   'Maximum calculated Decimal value for selected EL mode<br /><br />'Dim Mode_select As Byte                                     '0= Manual mode, 1= Preset/Tracking mode<br />'Dim Send_mode_status As Bit<br /><br /><br />                                                                                 'Graphical Azimuth X and Y axis offset<br />'Dim Azxoffset As Integer<br />'Dim Elxoffset As Integer<br />'Dim Azyoffset As Integer<br />'Dim Elyoffset As Integer<br /><br />'Dim Countdown As Byte<br /><br />Const Cmaxchar = 3<br />Dim Char_no As Byte                                         'byte counter    char number<br />Dim Serial_buffer As String * Cmaxchar                      'serial buffer<br />Dim Rs_input As Byte<br />Dim Az_rs232 As String * 5<br />Dim El_rs232 As String * 5<br />Dim Az_serial As Word<br />Dim El_serial As Word<br />Dim Az_serial_temp As String * 3<br />Dim El_serial_temp As String * 3<br />Dim Command_ready As Bit<br />Dim Y_command As String * 2                                 'max number of characters    W ttt XXX YYY command<br />Dim Serial_up As Bit<br />Dim Serial_down As Bit<br />Dim Serial_ccw As Bit<br />Dim Serial_cw As Bit<br /><br />'Dim Serial_mode_select As Bit<br /><br />'Dim Box_position As Byte<br />'Dim Box_position_temp As Byte<br />'Dim Box_xleft As Byte<br />'Dim Box_top As Byte<br />'Dim Box_bottom As Byte<br />'Dim Box_xright As Byte<br />'Dim Menu As Byte<br />'Dim Items As Byte<br />'Dim No_action_timer As Single<br /><br />'Dim Cleardata As Byte<br /><br />'                                                                                 'Control bits used in Preset/Tracking mode<br />'Dim Rotor_az_bit As Bit<br />'Dim Rotor_el_bit As Bit<br />'Dim Preset_az_bit As Bit<br />'Dim Preset_el_bit As Bit<br />'Dim Deadband_az_bit As Bit<br />'Dim Deadband_el_bit As Bit<br /><br />'-- Y line in message box variable<br />Dim Message_line As Byte<br /><br />Dim Screensaver_counter As Long<br />Dim Screensaver_bit As Bit<br /><br /><br />Dim Timetemp As Byte , I As Byte , Tm(5) As Byte , Answer As String * 1<br />Dim Second As Byte , Minute As Byte , Hour As Byte<br />Dim Time_pos As Byte<br />Dim Time_value As Byte<br /><br /><br />'-------------------------------------------------------------------------------<br />Dim Rs_in(8) As String * 1<br />Dim Aut_az As String * 3<br />Declare Sub No_command<br />'-------------------------------------------------------------------------------<br /><br /> Az_current_position = 333<br /> El_current_position = 23<br /><br />Cursor Off<br />Cls<br /><br />Config Lcd = 16 * 4<br />Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.3 , Rs = Portb.2<br /><br />      Do<br /><br /><br /><br />           Locate 2 , 1 : Lcd &quot;Command:&quot; ; Y_command<br /><br />       &#91;b&#93;    If Rs_input = 87 Then<br />                     For I = 2 To 8 Step 1<br />                        Rs_in(i) = Inkey()<br />                  Next I<br /><br />           End If<br /><br />                      Az_serial_temp = Rs_in(2) + Rs_in(3) + Rs_in(4)<br />                           If Len(az_serial_temp) = 3 Then<br />                              Az_position = Val(az_serial_temp)<br /><br />                              El_serial_temp = Rs_in(6) + Rs_in(7) + Rs_in(8)<br />                           If Len(el_serial_temp) = 3 Then<br />                           El_position = Val(el_serial_temp)<br />                          End If<br /><br />                        End If&#91;/b&#93;<br /><br /><br /><br />           Locate 3 , 1 : Lcd Rs_in(2) ; Rs_in(3) ; Rs_in(4) ; Rs_in(5) ; Rs_in(6) ; Rs_in(7) ; Rs_in(8)<br />            Gosub Rec_isr<br />Loop<br /><br />Sub No_command<br /><br />    Y_command = &quot;00&quot;<br />    Char_no = 0<br />    Serial_buffer = &quot;&quot;<br /><br />End Sub<br />'===========================  start  RS232 INT receive<br /><br />Rec_isr:<br /><br />Rs_input = Ischarwaiting()<br /><br />      If Rs_input = 1 Then                                  'we got something<br />         Rs_input = Inkey()<br /><br />         If Rs_input &gt; 0 Then<br /><br />'read only one character in one time<br />'each characters  receive    in each INT<br /><br />'we can collect  command  in  INT  procedure<br />'and ready COMMAND  back  to program<br /><br />'we  can use  FLAG   0/1   to mark   &quot;is some command&quot;<br />'and  program reckognized  command  from string<br /><br /><br /><br />' or  we can  reckognize  command in  INT procedure<br />' collect  complete buffer / string  and reckognize string<br />' and  use flag  1/2/3/4/...   or  W/M/S/B/C ....<br />' and put ready value  to wariables..<br /><br />' all chars  are glued  in one string  below<br /><br />  Incr Char_no<br /><br />  'upcase  procedure :-)<br />  If Rs_input &gt;= 97 And Rs_input &lt;= 122 Then Rs_input = Rs_input - 32<br /><br /><br /><br /><br /><br />If Char_no = 1 And Rs_input = 13 Then                       'EMPTY LINE - FIRST ENTER before collecting COMMAND<br />   'Call No_command<br /><br />Else<br /><br /><br />          Locate 1 , 1 : Lcd Az_current_position : Locate 1 , 7 : Lcd El_current_position<br /><br /><br />'============================== COMMNAD RECKOGNIZE =======================================<br /><br /><br />If Char_no = 1 Then                                         'check command first letter<br />Y_command = Chr(rs_input)                                   'assign firs letter to command variable<br /><br />  Else                                                      'check rest characters<br /><br /><br />        Select Case Y_command<br />        '0 W M S B C C2 U D L R<br /><br /><br /><br />        Case &quot;W&quot;:                                           'read 6 next char + ENTER<br />        'WAAAEEE/    eight char as ENTER<br />        ' if more or less char than seven+ENTER  - command ignored<br /><br />            If Rs_input &lt;&gt; 13 Then<br /><br />               If Rs_input &lt; 48 Or Rs_input &gt; 57 Then<br /><br />                  If Rs_input &lt;&gt; 32 Then<br />                     'Call No_command<br />                     'Print &quot;&gt;&quot;<br />                  End If<br /><br />               End If<br /><br />            End If<br /><br /><br />            If Char_no &lt; 8 And Rs_input = 13 Then           'ENTER before collect XXX YYY<br />               'Call No_command<br /><br />            End If<br /><br />            Serial_buffer = Serial_buffer + Chr(rs_input)<br /><br />            If Char_no = 4 Then<br />               Az_serial = Val(serial_buffer)<br />               Serial_buffer = &quot;&quot;<br />            End If<br /><br />            If Char_no = 5 And Rs_input &lt;&gt; 32 Then          'SPACE after XXX YYY<br />              ' Call No_command                              '  delete buffer<br />               Print &quot;&gt;&quot;                                    '<br />            End If<br /><br />            If Char_no = 5 And Rs_input = 32 Then           'SPACE after XXX YYY<br />               Serial_buffer = &quot;&quot;                           '  delete buffer<br />            End If<br /><br />            If Char_no = 8 Then<br />               El_serial = Val(serial_buffer)<br />               Serial_buffer = &quot;&quot;<br />            End If<br /><br />            If Char_no = 9 And Rs_input = 13 Then           'ENTER after XXX YYY<br />               Command_ready = 1<br />               Preset_az_bit = 1<br />               Preset_el_bit = 1<br />               Az_preset = Az_serial<br />               El_preset = El_serial<br />               Az_preset_temp = Az_serial<br />               El_preset_temp = El_serial<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;                           '  delete<br />             End If<br /><br />             If Char_no &gt; 9 Then                            'to long W commnad<br />               'Call No_command<br /><br />             End If<br /><br />             If Az_preset &gt; Az_max_degree Then<br />                'Call No_command<br /><br />             End If<br /><br />             If El_serial &gt; El_max_degree Then<br />               'Call No_command<br /><br />             End If<br /><br /><br /><br /><br /><br />        Case &quot;M&quot;:                                           'read 3 next char + ENTER<br /><br />                'MXXX/    fifth char as ENTER<br />        ' if more or less char than four+ENTER  - command ignored<br /><br />            If Rs_input &lt;&gt; 13 Then<br /><br />               If Rs_input &lt; 48 Or Rs_input &gt; 57 Then<br />                  'Call No_command<br /><br />               End If<br /><br />            End If<br /><br /><br />            If Char_no &lt; 5 And Rs_input = 13 Then           'ENTER before collect XXX YYY<br />               'Call No_command<br /><br />            End If<br /><br /><br />            Serial_buffer = Serial_buffer + Chr(rs_input)<br /><br />            If Char_no = 4 Then<br />               Az_serial = Val(serial_buffer)<br />               Serial_buffer = &quot;&quot;<br />            End If<br /><br /><br />            If Char_no = 5 And Rs_input = 13 Then           'ENTER after XXX<br />               Command_ready = 1<br />               Preset_az_bit = 1<br />               Az_preset = Az_serial<br />               Az_preset_temp = Az_serial<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br />            End If<br /><br />            If Char_no &gt; 5 Then                             'to long M commnad<br />              'Call No_command<br /><br />            End If<br /><br /><br />            If Az_preset &gt; Az_max_degree Then<br />              'Call No_command<br /><br />            End If<br /><br /><br /><br />        Case &quot;A&quot;:                                           'read 3 next char + ENTER<br /><br />                'MXXX/    fifth char as ENTER<br />        ' if more or less char than four+ENTER  - command ignored<br /><br />            If Rs_input &lt;&gt; 13 Then<br /><br />               If Rs_input &lt; 48 Or Rs_input &gt; 57 Then<br />                 ' Call No_command<br /><br />               End If<br /><br />            End If<br /><br /><br />            If Char_no &lt; 5 And Rs_input = 13 Then           'ENTER before collect XXX YYY<br />               'Call No_command<br /><br />            End If<br /><br /><br />            Serial_buffer = Serial_buffer + Chr(rs_input)<br /><br />            If Char_no = 4 Then<br />               Az_serial = Val(serial_buffer)<br />               Serial_buffer = &quot;&quot;<br />            End If<br /><br /><br />            If Char_no = 5 And Rs_input = 13 Then           'ENTER after XXX<br />               Command_ready = 1<br />               Preset_az_bit = 1<br />               Az_preset = Az_serial<br />               Az_preset_temp = Az_serial<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br />               Waitms 100<br />               Print &quot;1&quot;<br />            End If<br /><br />            If Char_no &gt; 5 Then                             'to long M commnad<br />               'Call No_command<br /><br />            End If<br /><br /><br />            If Az_preset &gt; Az_max_degree Then<br />              'Call No_command<br /><br />            End If<br /><br /><br /><br />        Case &quot;S&quot;:<br />        'all STOP<br /><br />           If Char_no = 2 And Rs_input = 13 Then            'ENTER after STOP<br />              Command_ready = 1<br />              Char_no = 0<br />              Serial_buffer = &quot;&quot;<br />              'Call Rotor_stop<br /><br />              Else<br />                 'Call No_command<br /><br />           End If<br /><br /><br /><br /><br /><br />        Case &quot;B&quot;:<br /><br />            If Char_no = 2 And Rs_input = 13 Then           'ENTER after B command<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br /><br />               If El_current_position &lt; 10 Then<br />                  El_rs232 = &quot;+000&quot; + Str(el_current_position)<br />                  Else<br /><br />                  If El_current_position &lt; 100 Then<br />                     El_rs232 = &quot;+00&quot; + Str(el_current_position)<br />                     Else<br />                        El_rs232 = &quot;+0&quot; + Str(el_current_position)<br />                  End If<br />               End If<br /><br />               Print El_rs232<br /><br />               Else<br />                  'Call No_command<br /><br /><br />            End If<br /><br /><br />          Case &quot;C&quot;:<br /><br />            If Char_no = 2 And Rs_input = 13 Then<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br /><br />               If Az_current_position &lt; 10 Then<br />                  Az_rs232 = &quot;+000&quot; + Str(az_current_position)<br />                  Else<br /><br />                  If Az_current_position &lt; 100 Then<br />                     Az_rs232 = &quot;+00&quot; + Str(az_current_position)<br />                     Else<br />                        Az_rs232 = &quot;+0&quot; + Str(az_current_position)<br />                  End If<br /><br />               End If<br /><br />               Print Az_rs232                               '<br /><br />               Else<br /><br />                  If Char_no = 2 And Rs_input = 50 Then     'if SECOND char=2  then  next step<br />                     Else<br /><br />                     If Char_no = 3 And Rs_input = 13 Then  'if THIRD  char=ENTER  then  next step<br />                        Command_ready = 1<br />                        Char_no = 0<br />                        Serial_buffer = &quot;&quot;<br /><br />                           If Az_current_position &lt; 10 Then<br />                              Az_rs232 = &quot;+000&quot; + Str(az_current_position)<br />                              Else<br /><br />                              If Az_current_position &lt; 100 Then<br />                                 Az_rs232 = &quot;+00&quot; + Str(az_current_position)<br />                                 Else<br />                                    Az_rs232 = &quot;+0&quot; + Str(az_current_position)<br />                              End If<br /><br />                           End If<br /><br />                           If El_current_position &lt; 10 Then<br />                              El_rs232 = &quot;+000&quot; + Str(el_current_position)<br />                              Else<br /><br />                              If El_current_position &lt; 100 Then<br />                                 El_rs232 = &quot;+00&quot; + Str(el_current_position)<br />                                 Else<br />                                    El_rs232 = &quot;+0&quot; + Str(el_current_position)<br />                              End If<br /><br />                           End If<br /><br />                           Print Az_rs232 ; El_rs232 : Locate 4 , 1 : Lcd Az_rs232 ; El_rs232       '<br /><br />                           Else<br />                             ' Call No_command<br /><br />                     End If<br />                 End If<br />              End If<br /><br /><br />        Case &quot;U&quot;<br /><br />            If Char_no = 2 And Rs_input = 13 Then<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br /><br />               If Mode_select = 0 Then<br />                  Serial_up = 1<br />                  Serial_down = 0<br /><br />                  Elseif Mode_select = 1 Then<br /><br />               End If<br /><br />               Else<br />                  Serial_up = 0<br />                  'Call No_command<br /><br /><br />            End If<br /><br /><br /><br />        Case &quot;D&quot;<br /><br />            If Char_no = 2 And Rs_input = 13 Then<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br /><br />               If Mode_select = 0 Then<br />                  Serial_up = 0<br />                  Serial_down = 1<br /><br />                  Elseif Mode_select = 1 Then<br /><br />               End If<br /><br />               Else<br />                  Serial_down = 0<br />                  'Call No_command<br /><br />            End If<br /><br /><br /><br />        Case &quot;L&quot;<br /><br />            If Char_no = 2 And Rs_input = 13 Then<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br /><br />               If Mode_select = 0 Then<br />                  Serial_ccw = 1<br />                  Serial_cw = 0<br /><br />                  Elseif Mode_select = 1 Then<br /><br />               End If<br /><br />               Else<br />                  Serial_ccw = 0<br />                 ' Call No_command<br /><br /><br />            End If<br /><br /><br /><br />        Case &quot;R&quot;<br /><br />            If Char_no = 2 And Rs_input = 13 Then<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br /><br />               If Mode_select = 0 Then<br />                  Serial_cw = 1<br />                  Serial_ccw = 0<br /><br />                  Elseif Mode_select = 1 Then<br /><br />               End If<br /><br />               Else<br />                  Serial_cw = 0<br />                  'Call No_command<br /><br />            End If<br /><br /><br /><br /><br />        Case &quot;X&quot;<br /><br />            If Char_no = 2 And Rs_input = 13 Then<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br />               Serial_mode_select = 1<br />                  Else<br />                    'Call No_command<br /><br />            End If<br /><br />        Case &quot;Z&quot;<br /><br />            If Char_no = 2 And Rs_input = 13 Then<br />               Command_ready = 1<br />               Char_no = 0<br />               Serial_buffer = &quot;&quot;<br />               Send_mode_status = 1<br /><br />                  Else<br />                   ' Call No_command<br /><br />            End If<br /><br />        Case Else:<br /><br /><br />'Call No_command<br />     End Select<br />  End If<br />'END FROM EMPTY ENTER<br />                       End If<br />                 End If<br />        End If<br />Return[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=988">slawek3000</a> — 3 sty 2015, o 13:04</p><hr />
]]></content>
</entry>
</feed>