flashgorny
Level-1
- Beiträge
- 55
- Reaktionspunkte
- 1
-> Hier kostenlos registrieren
Hallo,
habe ein kleines Problem im FB 74(SequenzeParameter) bekomme beim übersetzen kein fehler. Außer wenn sich die SPS im RUN befindet.
Bereichslängenfehler beim Lesen
Global -DB ,Bitzugriff, Zugriffsadresse: 2098
FB-Nummer: 74
Bausteinadresse: 626
Angeforderter OB: Programmierfehler-OB (OB 121)
Prioritätsklasse: 1
Netzwerk Status steps
Quellcode
/ How Many Transitions in this Sequence ("T_CNT" stored at address 'DB length'-31)
L #LengthDB // load length of step sequence DB
L 31 // offset of T_CNT
-I
SLD 3 // to pointer format
T #temp_Adr // address of T_CNT
L DBB [ #temp_Adr]
T #T_CNT // number of transitions
// How Many Steps in this Sequence ("S_CNT" stored at address 'DB length'-28)
L #LengthDB // load length of step sequence DB
L 28 // offset of S_CNT
-I
SLD 3 // to pointer format
T #temp_Adr // address of S_CNT
L DBB [ #temp_Adr]
T #S_CNT // number of steps
// internal number of the initial step ("SINI[1]")
L #LengthDB // load length of step sequence DB
L 36 // offset of ADR_COND
-I
SLD 3 // to pointer format
T #temp_Adr // address of ADR_COND
L DBW [ #temp_Adr]
T #temp_Adr // address offset ADR_LOG_T[0]
L #S_CNT // number of steps
L #T_CNT // number of transitions
+I
L 2
*I
L #temp_Adr // address offset ADR_LOG_T[0]
+I // address offset ADR_T1_CRITFLT
L 7 // additional offset
+I
SLD 3
T #temp_Adr // address offset SINI[1]
L DBB [ #temp_Adr] // SINI[1]
T #SINI
// status interlock error
L #temp_Adr // address offset SINI[1]
SRD 3
L 3 // additional offset
-I
SLD 3
T #temp_Adr // address of ADR_SERRX
L DBW [ #temp_Adr] // ADR_SERRX
T #temp_Adr // address offset SERRX[0]
L #S_CNT // number of steps
L 2
MOD // "1" if number of steps is odd
L #S_CNT // number of steps
+I // round up to the next even number of steps
L 2 // additional offset
+I
L 4 // 4 step fields
*I
L 6 // internal fields
+I
L 4 // MOPEDGE field
+I
L 4 // MOP field
+I
L 12 // TICKS field
+I
L #temp_Adr // address offset SERRX[0]
+I // address offset SQ_FLAGS
SLD 3 // to pointer format
INC 1 // address of .ERROR
T #temp_Adr // address offset SQ_FLAGS.ERROR
A DBX [ #temp_Adr] // SQ_FLAGS.ERROR --------------------> Hier bekomme ich den Fehler
= #InterlockError // Interlock Error present
// Pointer to Step Structure (Step 0; not used)
L #T_CNT // number of transitions
INC 1 // one more
L 16 // length of 1 transition structure
*I
L 10 // start address of first transition
+I
SLD 3 // to pointer format
LAR1 // to address register 1
// Pointer to Initial Step
L #SINI // initial step number
L 32 // lenght of 1 step structure
*I
SLD 3 // to pointer format
+AR1
L DBW [ AR1 , P#2.0 ] // user step number
L %DBW6
==I
= #InitStepActive
Ich weiß leider nicht weiter, könnt ihr mir weiter helfen?
Gruß
Hans
habe ein kleines Problem im FB 74(SequenzeParameter) bekomme beim übersetzen kein fehler. Außer wenn sich die SPS im RUN befindet.
Bereichslängenfehler beim Lesen
Global -DB ,Bitzugriff, Zugriffsadresse: 2098
FB-Nummer: 74
Bausteinadresse: 626
Angeforderter OB: Programmierfehler-OB (OB 121)
Prioritätsklasse: 1
Netzwerk Status steps
Quellcode
/ How Many Transitions in this Sequence ("T_CNT" stored at address 'DB length'-31)
L #LengthDB // load length of step sequence DB
L 31 // offset of T_CNT
-I
SLD 3 // to pointer format
T #temp_Adr // address of T_CNT
L DBB [ #temp_Adr]
T #T_CNT // number of transitions
// How Many Steps in this Sequence ("S_CNT" stored at address 'DB length'-28)
L #LengthDB // load length of step sequence DB
L 28 // offset of S_CNT
-I
SLD 3 // to pointer format
T #temp_Adr // address of S_CNT
L DBB [ #temp_Adr]
T #S_CNT // number of steps
// internal number of the initial step ("SINI[1]")
L #LengthDB // load length of step sequence DB
L 36 // offset of ADR_COND
-I
SLD 3 // to pointer format
T #temp_Adr // address of ADR_COND
L DBW [ #temp_Adr]
T #temp_Adr // address offset ADR_LOG_T[0]
L #S_CNT // number of steps
L #T_CNT // number of transitions
+I
L 2
*I
L #temp_Adr // address offset ADR_LOG_T[0]
+I // address offset ADR_T1_CRITFLT
L 7 // additional offset
+I
SLD 3
T #temp_Adr // address offset SINI[1]
L DBB [ #temp_Adr] // SINI[1]
T #SINI
// status interlock error
L #temp_Adr // address offset SINI[1]
SRD 3
L 3 // additional offset
-I
SLD 3
T #temp_Adr // address of ADR_SERRX
L DBW [ #temp_Adr] // ADR_SERRX
T #temp_Adr // address offset SERRX[0]
L #S_CNT // number of steps
L 2
MOD // "1" if number of steps is odd
L #S_CNT // number of steps
+I // round up to the next even number of steps
L 2 // additional offset
+I
L 4 // 4 step fields
*I
L 6 // internal fields
+I
L 4 // MOPEDGE field
+I
L 4 // MOP field
+I
L 12 // TICKS field
+I
L #temp_Adr // address offset SERRX[0]
+I // address offset SQ_FLAGS
SLD 3 // to pointer format
INC 1 // address of .ERROR
T #temp_Adr // address offset SQ_FLAGS.ERROR
A DBX [ #temp_Adr] // SQ_FLAGS.ERROR --------------------> Hier bekomme ich den Fehler
= #InterlockError // Interlock Error present
// Pointer to Step Structure (Step 0; not used)
L #T_CNT // number of transitions
INC 1 // one more
L 16 // length of 1 transition structure
*I
L 10 // start address of first transition
+I
SLD 3 // to pointer format
LAR1 // to address register 1
// Pointer to Initial Step
L #SINI // initial step number
L 32 // lenght of 1 step structure
*I
SLD 3 // to pointer format
+AR1
L DBW [ AR1 , P#2.0 ] // user step number
L %DBW6
==I
= #InitStepActive
Ich weiß leider nicht weiter, könnt ihr mir weiter helfen?
Gruß
Hans