发布于 2014-06-11 16:52:14
6楼
完整的程序:
L #SAVED_POSITION
L #ACTUAL_POSITION
==I
JC end
L #SAVED_POSITION
T #temp_word_1
L #ACTUAL_POSITION
T #temp_word_2
L #SET_POSITION
T #temp_word_3
L 0
T #address_counter
L 16
LA15: T #loopcounter
SET
R #h_temp_bit_1
//Lade Tempor鋜e Adresse von Variable Temp_Dint_1 (dort liegen die saved Pos)
L P##temp_word_1
L #address_counter
+D
//Lade das Adressregister 1 mit Inhalt aus Akku 1
LAR1
L P##temp_word_3
L #address_counter
+D
LAR2
A L [AR2,P#0.0]
S #h_temp_bit_1
L P##temp_word_2
L #address_counter
+D
LAR2
//If Saved Pos = 1 , Actual Pos = 0 and Set Pos = 0 then Override
A L [AR1,P#0.0]
AN L [AR2,P#0.0]
AN #h_temp_bit_1
JCN OVR1
S #MAN_OVERRIDE_ACTIVE
L #address_counter
INC 1
T #OVERRIDE_POSITION
JC end
OVR1: NOP 0
L #address_counter
INC 1
T #address_counter
L #loopcounter
LOOP LA15
end: NOP 0
A #GOTO_OVERRIDE
JCN Got1
L #OVERRIDE_POSITION
T #DISPLAY_No
SET
R #GOTO_OVERRIDE
Got1: NOP 0
L #OVERRIDE_POSITION
L #DISPLAY_No
==I
JCN OVR2
SET
S #OVERRIDED
OVR2: NOP 0
《840Dsl数控系统应用手册》已出版
hugqing.blog.163.com