Step 7 Frage zur AWL Programmierung

S_Liner

Level-2
Beiträge
433
Reaktionspunkte
16
Zuviel Werbung?
-> Hier kostenlos registrieren
Hallo zusammen, ich versuche mich die Wochen jetzt immer mehr auf AWL zu konzentrieren. Ich habe das Ursprüngliche alles in FUP gelernt, aber praktisch habe ich bis jetzt ganz wenig Maschinen gesehen die in FUP programmiert worden. Bei uns auf Arbeit gibt es nur AWL. Bei meinen Übungen ist mir folgendes aufgefallen.

Beispiel Impulszählung:

U E1.0
FP m0.0
=#Imp
spbn m000:

U #Imp
L Word
L 1
+I
T Word

m000: nop 0



So, da geht es mir um die Sprungmarke. Warum genau muss ich sie da setzen. Ich weiß was passiert wenn ich es nicht tue. Habe aber nicht verstanden warum ich sie da setzen muss. Setze ich Sie nicht, Zählt er sofort los. Ich kann doch aber auch andere Verknüpfungen schreiben ohne Sprungmarken. Da führt er die Anweisungen ja auch nicht einfach aus. Könnte mir da vielleicht jemand was zu sagen bzw. erklären? Denn eigentlich dürfte er ja erst zählen wenn E1.0 = 1 ist. Warum ist das in dem Fall egal?

Grüße
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Code:
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     U     E1.0[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     FP    m0.0[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     =     #Imp [COLOR=#222222][FONT=courier new]  // <===<<< ist überflüssig. [/FONT][/COLOR]
[LEFT][/LEFT]
[/COLOR][/FONT][/FONT][/COLOR][COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]    spbn  m000:[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     U     #Imp   // <===<<< ist überflüssig. 
                 // VKE ist nach dem bedingten Sprung immer 1 
                // die folgenden 4 Befehle werden unabhängig vom VKE ausgeführt
               // deshalb werden sie "normalerweise" übersprungen
              // und nur in dem Zyklus nicht, in dem die Flanke auftritt[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     L     Word[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     L     1[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     +I[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]     T     Word[/COLOR][/FONT][/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana][FONT=courier new][COLOR=#222222]m000:nop   0[/COLOR][/FONT][/FONT][/COLOR]

Gruss, Heinileini
 
Zuletzt bearbeitet:
Ah ok, vielen Dank an euch. Ich halte also fest das die 4 Befehle unabhängig ausgeführt werden, da Laden und Transferieren immer unabhängig vom VKE ausgeführt werden.
Gibt es da noch irgendwelche Beispiele wo ich einen Sprung machen muss?
 
Nicht nur Laden und Transferieren werden immer unabhängig vom VKE ausgeführt, auch in Deinem Beispiel L 1 und I+.

Code:
[FONT=Verdana][FONT=courier new][SIZE=2][COLOR=#222222][I]    U     E1.0[/I][/COLOR][/SIZE][/FONT][/FONT]
Code:
[LEFT][COLOR=#333333][FONT=Verdana][I][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222]    FP    m0.0[/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR]
[/I][/FONT][/COLOR][COLOR=#333333][COLOR=#333333][COLOR=#222222][FONT=Tahoma][COLOR=#333333][FONT=Verdana][I][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222]   L     Word
[/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR][/I][/FONT][/COLOR][/FONT][/COLOR][/COLOR][/COLOR]
[LEFT][COLOR=#333333][COLOR=#333333][COLOR=#222222][FONT=Tahoma][COLOR=#333333][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][FONT=Verdana][FONT=courier new][SIZE=2][COLOR=#222222][I]   spbn  m000:[/I][/COLOR][/SIZE][/FONT][/FONT][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR][/COLOR][/FONT][/COLOR][/COLOR][/COLOR][/LEFT]
[COLOR=#222222][LEFT][COLOR=#222222][FONT=Tahoma][LEFT][LEFT][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][I]    L     1[/I][/COLOR][/FONT][/FONT][/FONT][/COLOR][/LEFT]
[/LEFT]
[/FONT][/COLOR][/LEFT]
[/COLOR][LEFT][COLOR=#222222][FONT=Tahoma][I][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222]    +I[/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR][/I]
[COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][COLOR=#222222][FONT=courier new][I]m000:[/I][/FONT][/COLOR][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][I]T     Word[/I][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR]
[/FONT][/COLOR][/LEFT]
[/LEFT]

würde auch funktionieren. Hier ist wichtig, dass das Addieren der 1 nicht in jedem Zyklus wiederholt wird.
Du könntest auch schreiben:
Code:
[I][FONT=Verdana][FONT=courier new][SIZE=2][COLOR=#222222]    U     E1.0[/COLOR][/SIZE][/FONT][/FONT][/I][LEFT][I][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222]    FP    m0.0[/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR]
[/I][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][FONT=Verdana][FONT=courier new][SIZE=2][COLOR=#222222][FONT=Verdana][FONT=courier new][SIZE=2][COLOR=#222222][I]   L     1[/I][/COLOR][/SIZE][/FONT][/FONT][/COLOR][/SIZE][/FONT][/FONT][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR]

[COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][FONT=Verdana][FONT=courier new][SIZE=2][COLOR=#222222][LEFT][COLOR=#222222][FONT=Verdana][FONT=courier new][SIZE=2][COLOR=#222222][I]    L     Word[/I][/COLOR][/SIZE][/FONT][/FONT][/COLOR]
[/LEFT]
[I]     spbn  m000:[/I][/COLOR][/SIZE][/FONT][/FONT][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR][LEFT][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][I]    +I[/I][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR][/LEFT]
[COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][I][COLOR=#222222][FONT=courier new]m000:[/FONT][/COLOR][/I][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR][COLOR=#222222][COLOR=#222222][FONT=Courier][FONT=Verdana][FONT=courier new][COLOR=#222222][I]T     Word[/I][/COLOR][/FONT][/FONT][/FONT][/COLOR][/COLOR]
[/LEFT]

um nur das Addieren zu überspringen. Wohl gemerkt: so ist der Inhalt von Word im Akku und wird direkt wieder nach Word transferiert.
Sonst würde die 1 nach Word transferiert, wenn man nur das Addieren überspringt.
Beispiele fallen mir auf die Schnelle nicht ein. Kommt immer drauf an, was man bewirken will ...
Gruss, Heinileini
 
Zuletzt bearbeitet:
Zurück
Oben