Siemens Step 7 file & folder structure

... a complete change in direction. Have you considered using an AutoLT script to run Simatic Manager under script control and then extract the symbol information "as if" you were a user ?
 
there is a theory but I didn't test it enough yet: if you go through homsave7\shk3(number)AX then search inside the HRELATI1 tables for TOBJID (program ID taken from s7resoff) and TOBJTYP = 1331969 .. once you find that row you take the SOBJID & the SOBJTYP then you go through the homsave7\shk3(number)AX\HOBJECT1 table and looke for the SOBJID AND THE OBDJTYP you got and from there you get the CPU name of the program

for type 400 cpus you will have to look at shk4(number)AX as well
 
Hi OPC_Eng,
I looked into the databases, and I changed my method from bottom-up to top-down (from S7-Station down to S7-Program folder, like it's shown in the Step7 Manager).
Code:
1.) S7-Station
    |
2.) |>- S7-CPU
        |
3.)     |> S7-Program
At first I go into /hOmSave7/s7hstatx/ to get part 1.)

Code:
SELECT ID, NAME, OBJTYP, UNITID FROM HOBJECT1 WHERE OBJTYP = 1314969 OR OBJTYP = 1314970
OBJTYP 1314969 are S7-300 stations, and 1314970 are S7-400 stations.

To get the part 2.) PLC-name/ID, I have to take the TOBJID with the result ID:
Code:
SELECT TOBJID FROM HRELATI1 WHERE SOBJID = $ID AND RELID = 16
With this TOBJID I can take the ID and name from corresponding hw-folder (/hOmSave7/S7HK31AX or /hOmSave7/S7HK41AX)

Code:
SELECT NAME, ID FROM HOBJECT1 WHERE UNITID = $TOBJID
From here I can get part 3.) S7-program ID with

Code:
SELECT TOBJID FROM HRELATI1 WHERE SOBJID = $ID AND RELID = 16
With this TOBJID I can go into S7RESOFF and take the rest.

I tested it with some different projects, and it seems OK.
 
very helpfull informations, thank you guys!

I'm trying to read ths SYMLIST.DBF with C# (OleDb Provider) and have problems with accessing to the file. The file seems to be locked. S7RESOFF.DBF, BAUSTEIN.DBF etc. can be accessed without a password.

Does anybody has a solution for my problem?
 
I'm trying to read ths SYMLIST.DBF with C# (OleDb Provider) and have problems with accessing to the file. The file seems to be locked. S7RESOFF.DBF, BAUSTEIN.DBF etc. can be accessed without a password.

Does anybody has a solution for my problem?

Make sure Step 7 is not running in the background.

The OleDB-Provider for dbase files is cr*p. You will get further problems if you are using it. Before I started with Perl I tried it also with C# and the OleDb driver.
In some files the encryption flag and the MDX flag are set. You have to remove both flags (copy files to temporary directory and modify these files) before the OleDb Provider is able to load them.

File format description for dBase files:
http://www.clicketyclick.dk/databases/xbase/format/
 

Similar Topics

What does a siemens step 7 saved plc program project end with for example project1.xxx what are the last three letters?
Replies
2
Views
5,961
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
251
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
555
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
688
Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
628
Back
Top Bottom