
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
Hallo I want to store 16 equation ( ON(1) or OFF(0) ) in 1 WORD So that I can read it out later. This program works as the equation is correct. But if this is wrong than it does not work as it should be Who has the sollution for this problem? 'poort DEFINE ADin AD[1] DEFINE PoortA PORT[1] DEFINE poortB PORT[2] DEFINE poortC PORT[3] DEFINE poortD PORT[4] 'VAR DEFINE Ieen BIT[1] DEFINE Itwee BIT[2] DEFINE Idrie BIT[3] DEFINE Ivier BIT[4] DEFINE I BYTE[1] DEFINE Var1 WORD[2] DEFINE Temp WORD[3] #Ingangen Temp=&B00000001 FOR I=0 to 15 PortA=Ieen 'BCD code PortB=Itwee PortC=Idrie PortD=Ivier IF AdIn>140 THEN Var1=Var1 OR Temp ELSE Var1=Var1 NOR Temp Temp=Temp SHL 1 NEXT Hans |
| Antwort schreiben |