Conversion help Step 5 to Tia Portal

Busted85

Member
Join Date
Mar 2014
Location
Lund
Posts
2
Greetings everyone,


I'm currently working on a project where I've to convert an old Step 5 program with comments made in German into Tia Portal. The old program was downloaded from a [FONT=Times New Roman, serif]CPU 945-7UA1 .l-7UA2 [/FONT][FONT=Times New Roman, serif]and when done will be[/FONT] uploaded onto a CPU 315-2.
I've downloaded several manuals to help me out. However as I don't have access to any Step 5 PLC:s, it's not possible for me to start up the original program for testing purposes.
This leaves me guessing on how some of the instructions in the Step 5 program function, even after reading some manuals. I would appreciate if someone here could help me out with them.

I-stack


”[FONT=Arial, sans-serif]The interrupt stack (ISTACK) is an internal memory of the CPU where malfunction reports are[/FONT]
[FONT=Arial, sans-serif]stored. When a malfunction occurs, the appropriate bit [/FONT][FONT=Arial, sans-serif]is [/FONT][FONT=Arial, sans-serif]set.”

[/FONT]

In one block the program loads several of the ISTACK system data bits and transfers them to datablock 181, in order to have them displayed on the HMI (see a snippet of the code below).


[FONT=Courier New, monospace]OPN "DB 181"[/FONT]


[FONT=Courier New, monospace]L BS 102; // HEX-Code nicht vorh. Baustein[/FONT]
[FONT=Courier New, monospace]T %DBW196[/FONT]


[FONT=Courier New, monospace]L BS 103; // Adresse QVZ[/FONT]
[FONT=Courier New, monospace]T %DBW198[/FONT]


[FONT=Courier New, monospace]L BS 104; // Adresse QVZ[/FONT]
[FONT=Courier New, monospace]T %DBW200[/FONT]


[FONT=Courier New, monospace]L BS 203; // AKKU 1-H / ACCU 1-H[/FONT]
[FONT=Courier New, monospace]T %DBW202[/FONT]


[FONT=Courier New, monospace]L BS 204; // AKKU 1-L / ACCU 1-L[/FONT]


[FONT=Courier New, monospace]T %DBW204[/FONT]
[FONT=Courier New, monospace]L BS 205; // AKKU 2-H / ACCU 2 - H[/FONT]


[FONT=Courier New, monospace]T %DBW206[/FONT]
[FONT=Courier New, monospace]L BS 206; // AKKU 2-L / ACCU 2- L[/FONT]


[FONT=Courier New, monospace]T %DBW208[/FONT]
[FONT=Courier New, monospace]L BS 207; // STEPADRESSZAEHLER -H / [/FONT]
[FONT=Courier New, monospace] Step address counter H[/FONT]


[FONT=Courier New, monospace]T %DBW210[/FONT]
[FONT=Courier New, monospace]L BS 208; // STEPADRESSZAEHLER -L[/FONT]
[FONT=Courier New, monospace] Step address counter H[/FONT]
[FONT=Courier New, monospace]T %DBW212[/FONT]
[FONT=Courier New, monospace]L BS 209; // DBA-Register -H[/FONT]


[FONT=Courier New, monospace]T %DBW214[/FONT]
[FONT=Courier New, monospace]L BS 210; // DBA-Register -L[/FONT]


[FONT=Courier New, monospace]T %DBW216[/FONT]
[FONT=Courier New, monospace]L BS 211; // BR-Register -H (RS-Reg)[/FONT]


[FONT=Courier New, monospace]T %DBW218[/FONT]
[FONT=Courier New, monospace]L BS 212; // BR-Register -L (RS-Reg)[/FONT]


[FONT=Courier New, monospace]T %DBW220[/FONT]
[FONT=Courier New, monospace]L BS 213; // DBL-Register[/FONT]


[FONT=Courier New, monospace]T %DBW222[/FONT]
[FONT=Courier New, monospace]L BS 214; // STATUS-Register (Condition Code)[/FONT]


[FONT=Courier New, monospace]T %DBW224[/FONT]
[FONT=Courier New, monospace]L BS 215; // Klammerstack 0 / Nesting level 0[/FONT]


[FONT=Courier New, monospace]T %DBW226[/FONT]
[FONT=Courier New, monospace]L BS 216; // Klammerstack 1 / Nesting level 1[/FONT]


[FONT=Courier New, monospace]T %DBW228[/FONT]
[FONT=Courier New, monospace]L BS 217; // Klammerstack 2 / Nesting level 2[/FONT]


[FONT=Courier New, monospace]T %DBW230[/FONT]
[FONT=Courier New, monospace]L BS 218; // Klammerstack 3 / Nesting level 3[/FONT]


[FONT=Courier New, monospace]T %DBW232[/FONT]
[FONT=Courier New, monospace]L BS 219; // Klammerstack 4 / Nesting level 4[/FONT]


[FONT=Courier New, monospace]T %DBW234[/FONT]
[FONT=Courier New, monospace]L BS 220; // Klammerstack 5 / Nesting level 5[/FONT]


[FONT=Courier New, monospace]T %DBW236[/FONT]
[FONT=Courier New, monospace]L BS 221; // Klammerstack 6 / Nesting level 6[/FONT]


[FONT=Courier New, monospace]T %DBW238[/FONT]
[FONT=Courier New, monospace]L BS 222; // Klammerstack 7 / Nesting level 7[/FONT]


[FONT=Courier New, monospace]T %DBW240[/FONT]
[FONT=Courier New, monospace]L BS 223; // Klammerstackpointer / Nesting level pointer[/FONT]


[FONT=Courier New, monospace]T %DBW244[/FONT]
[FONT=Courier New, monospace]L BS 225; // BSTACK-Pointer -H[/FONT]


[FONT=Courier New, monospace]T %DBW246[/FONT]
[FONT=Courier New, monospace]L BS 226; // BSTACK-Pointer -L[/FONT]


[FONT=Courier New, monospace]T %DBW248[/FONT]
[FONT=Courier New, monospace]L BS 227; // Anwender-Interrupt-Maske[/FONT]
[FONT=Courier New, monospace] User interrupt-mask[/FONT]
[FONT=Courier New, monospace]T %DBW250[/FONT]
[FONT=Courier New, monospace]L BS 228; // Unterbrechungs-Anzeigenwort[/FONT]
[FONT=Courier New, monospace] Interrupt condition code word[/FONT]
[FONT=Courier New, monospace]T %DBW252[/FONT]
[FONT=Courier New, monospace]L BS 229; // letzte gueltige Kachelnummer[/FONT]
[FONT=Courier New, monospace] Last set page number[/FONT]
[FONT=Courier New, monospace]T %DBW274[/FONT]
[FONT=Courier New, monospace]//;[/FONT]
[FONT=Courier New, monospace]L BS 32; // Anfangsadresse des internen / ?[/FONT]


[FONT=Courier New, monospace]T %DBW276 // RAM-Speichers eintragen / ?[/FONT]
[FONT=Courier New, monospace]L BS 33;[/FONT]


[FONT=Courier New, monospace]L %DBD208[/FONT]
[FONT=Courier New, monospace]//;[/FONT]

[FONT=Times New Roman, serif] My question is, if it's possible to extract the same or similar ”malfunction report data” on the CPU 315 and have it displayed on an HMI?


Operating System Services in OB250
[/FONT]

[FONT=Times New Roman, serif]"The operating system services allow you to:
[/FONT]

[FONT=Times New Roman, serif]- Activate different operating system functions or[/FONT]
[FONT=Times New Roman, serif]- Change specific parameters during cyclic operation"

System service 28 is called during a start-up (now OB 100). One manual mentions the following about this:

Operating system services 27 and 28 can be used to change the block identifiers in the RAM to"valid in EPROM" or "valid in RAM".
[/FONT]
[FONT=Times New Roman, serif]System service 28 Change block identifier to "valid in RAM"

Changing of the identifier to "valid in RAM" changes the identifiers of all user blocks.”

I don't understand what this means. What happens to the blocks which are stored in the CPU:s RAM? Furthermore the instruction, when called, is commented by this in the original program;
[/FONT]


”[FONT=Times New Roman, serif]Umschreiben der Bausteinkennung / Reconstruction of the block identification EPROM -> RAM”[/FONT]
 
Last edited:
[FONT=Times New Roman, serif]Check if datablock 202 is available in EPROM


During a start up, a block is called once which executes the following code;
[/FONT]
[FONT=Courier New, monospace]L 202[/FONT]
[FONT=Courier New, monospace]SLW 1[/FONT]
[FONT=Courier New, monospace]L DW#16#E3800[/FONT]
[FONT=Courier New, monospace]+D // *LIR 0[/FONT]
[FONT=Courier New, monospace]L 0 // Abfrage ob DB 202 vorhanden[/FONT]
[FONT=Courier New, monospace]==I[/FONT]
[FONT=Courier New, monospace]JC M001[/FONT]
[FONT=Courier New, monospace]TAK[/FONT]
[FONT=Courier New, monospace]SLD 16[/FONT]
[FONT=Courier New, monospace]RRD 12[/FONT]
[FONT=Courier New, monospace]+ -8 // *LIR 0[/FONT]
[FONT=Courier New, monospace]L DINT#32768[/FONT]
[FONT=Courier New, monospace]AW[/FONT]
[FONT=Courier New, monospace]L 0 // Abfrage ob DB 202 Kennung[/FONT]
[FONT=Courier New, monospace]<>I // "Baustein in EPROM" hat[/FONT]
[FONT=Times New Roman, serif][FONT=Courier New, monospace]S "IP #BEG" // --> dann Richtimpuls anfordern[/FONT]

The code checks if datablock 202 is available/recognised in EPROM. Due to the limited amount of memory available on the CPU, EPROM was used to upload additional blocks which were used by the program.
Datablock 202 is used by a graph sequence. The program checks the DL 0 value of the datablock which normally holds Sequence block no. (KF) which is 202.
[/FONT]
[FONT=Times New Roman, serif]However should the value of DL 0 not be 0 during a start up, the program sets a memory (named IP #BEG) which is basically used for resetting all of the PLC:s memories.[/FONT]
[FONT=Times New Roman, serif]I wonder why would DL 0 contain anything but the Sequence block number? Why would it have to be 0 and not 202 during start?[/FONT]


[FONT=Times New Roman, serif]Thanks in advance[/FONT]


[FONT=Times New Roman, serif]Busted85[/FONT]
 

Similar Topics

Hello guys. I need some help trying to rewrite some STL code into Ladder so i can try to understand whats going on. I struggle to watch the RLO...
Replies
13
Views
6,536
Hi all, I'm in the process of upgrading a PanelView1200 HMI program to be developed in FactroyTalk View Studio. The filetype for PanelView 1200...
Replies
7
Views
283
Hi guys, I have no experience when working with AllenBradley PLC, but I hope someone could clarify the result of multiplication shown in the...
Replies
14
Views
2,206
I have been tasked to upgrade some SquareD PLCs at our plant. I have done several of these upgrades without any issues. However, I have now met my...
Replies
4
Views
2,447
I am upgrading an existing PLC5 program to controllogix (L73 V23). For my question I will only use the logic for my CH1 on my 1771-IFE/C...
Replies
7
Views
2,803
Back
Top Bottom