SLW 4
LAR1
also, ich hab da ein paarentdecken können ...Code:SLW 4 LAR1
*
//ISTW (IN? oder von sonst irgendwo) in MW210 und conv_akku1 (TEMP?)
L #ISTW //2222 -> W#16#8AE
T "MW 210" //W#16#8AE
T #conv_akku1 //W#16#8AE
//high-byte von ISTW als index in akku1 (in akku2 steht noch ISTW)
L "MB 210" //w#16#8
T #conv_index
//akku1 gegen akku2 tauschen (akku1 ISTW;akku2 high-byte von ISTW)
TAK
//akku1 mit ISTW beschreiben, in akku2 steht jetzt auch ISTW
L #conv_akku1 //W#16#8AE
//db-nummer aus high-byte von ISTW
AUF DB [#conv_index] //DB 8
//ISTW mit ISTW überschreiben
T #conv_akku1 //W#16#8AE
//Statuswort sichern
L STW
T #conv_stw
//low-byte von ISTW um 4 nach links schieben (-> * 16) und in adressregister 1 laden
L "MB 211" //W#16#AE
SLW 4 //*16
LAR1 //W#16#AE0 -> P#348.0
//Statuswort zurücksichern
L #conv_stw
T STW
//ISTW in akku1
L #conv_akku1 //W#16#8AE
//aus DB [conv_index] das wort [ISTW * 2] in akku1 und in MW212 ablegen, ISTW in akku2
L DBW [AR1,P#0.0] //DB8.DBW348
T "MW 212" // Istwert
//S_L (IN?) in MW210 und conv_akku1
L #S_L // Auswertung L
T "MW 210"
T #conv_akku1
//hier beginnt der selbe mechanismus wie oben
L "MB 210"
T #conv_index
TAK
L #conv_akku1
AUF DB [#conv_index]
T #conv_akku1
L STW
T #conv_stw
L "MB 211"
SLW 4
LAR1
L #conv_stw
T STW
L #conv_akku1
L DBW [AR1,P#0.0]
T "MW 214" // Sollwert LAL
//und das ganze nochmal für S_H (IN?)
L #S_H // Auswertung H
T "MW 210"
T #conv_akku1
L "MB 210"
T #conv_index
TAK
L #conv_akku1
AUF DB [#conv_index]
T #conv_akku1
L STW
T #conv_stw
L "MB 211"
SLW 4
LAR1
L #conv_stw
T STW
L #conv_akku1
L DBW [AR1,P#0.0]
T "MW 216" // Sollwert LAH
//und nochmal für S_HH (IN?)
L #S_HH // Auswertung HH
T "MW 210"
T #conv_akku1
L "MB 210"
T #conv_index
TAK
L #conv_akku1
AUF DB [#conv_index]
T #conv_akku1
L STW
T #conv_stw
L "MB 211"
SLW 4
LAR1
L #conv_stw
T STW
L #conv_akku1
L DBW [AR1,P#0.0]
T "MW 218"
slw 4
kann bedeuten pointerformat und den wert mal 2 in einem schritt.
PS:Hab mir den code nicht angeschaut,aber ein kollege vonmir benutzt das öfter so.
aber ich hab auch erstmal :shock::shock::shock:, so zusammenhanglos, wie die eingestreut sind :? (ich hab mir aber jetzt nicht die Mühe gemacht, nachzuprüfen, ob die dazwischenliegende Behandlung des Statuswortes möglicher Weise diese Abfolge erfordert).Korrekt, die hab ich glatt übersehen.
...
(ich hab mir aber jetzt nicht die Mühe gemacht, nachzuprüfen, ob die dazwischenliegende Behandlung des Statuswortes möglicher Weise diese Abfolge erfordert).
L =ISTW // Formaloperand in KY DB-Nr, DW-NR
T MW 210 // zwischenspeichern
B MB 210 // DB-Nr. laden
A DB 0 // DB öffnen
B MB 211 // DW-Nr. laden
L DW 0 // Inhalt DW laden
T MW 212 // Istwert speichern
L #S_L // Auswertung L Formaloperand in KY DB-Nr, DW-NR
T MW 210 // zwischenspeichern
B MB 210 // DB-Nr. laden
A DB 0 // DB öffnen
B MB 211 // DW-Nr. laden
L DW 0 // Inhalt DW laden
T MW 214 // Sollwert LAL
...
usw.
*
L #wIn
T #wInTemp
L P##wInTemp
LAR1
L B [AR1,P#1.0]
T #iDbNumber
L B [AR1,P#0.0]
SLD 4
LAR1
AUF DB [#iDbNumber]
L DBW [AR1,P#0.0]
T #wOut
SLD 1 // S5-Wort-Format nach S7-Byte-Format
SLD 3 // => ins Pointerformat
Das ganz wurde in SCL geschrieben und dann durch den MCS7 Kompiler durchgejagt. Deshalb ist es sehr schwehr, den CODE nachzuverfolgen. Wird verwendet, wenn man nicht will, dass der CODE kopiert werden soll bzw. wenn der CODE geknackt wird (KNOW_HOW_PROTECT).
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?