
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
> > Ich möchte via Hyperterminal(RS232) bei meiner CC1 Unit die Ports ein und auschschalten. > > Wie mache ich das? Ich habe es so gelöst: ********************************************************************** #loop if rxd then goto auswertung goto loop #auswertung get wert if wert = 99 then goto ausgabe if wert = 11 then goto K1AN if wert = 10 then goto K1AUS if wert = 21 then goto K2AN if wert = 20 then goto K2AUS goto loop #ausgabe print "Ausgang K1: "; if K1=-1 then print "AUS" if K1=0 then print "AN" print "Ausgang K2: ";K2 if K2=-1 then print "AUS" if K2=0 then print "AN" goto loop #K1AN K1=ON goto loop #K1AUS K1=OFF goto loop #K2AN K2=ON goto loop #K2AUS K2=OFF goto loop ******************************************************** Das ist jetzt frei aus dem Kopf, ich hoffe, ich hab keinen Syntaxfehler eingebaut ;-) Musst halt noch die Variablen definieren, "Wert" als byte, und die Ports. Grüße, Michael |
| Antwort schreiben |