Recognize siemens s7 source directory

PaoloG

Member
Join Date
Aug 2010
Location
Italy
Posts
4
Hi at everybody!
At work is requested use the source files for s7 project.
For a "special function" of net administrator, I need to know the "link" from directory source and a PLC component on s7 project.

Example:
In a project I have 2 PLC: PLC1 and PLC2.
I need to discover the association:
source directory file for PLC1 is [PrjDIR]/s7asrcom\00000001
source directory file for PLC2 is [PrjDIR]/s7asrcom\00000003


I have found in the file (opened with dbfedit):
[PrjDIR]/HOMESAVE7/S7HSTATX/HOBJECT1.DBF
the PLC's name in the project.
I have checked all dbf file of project, I have found where are the system data, the hardware specification, the symbols and etc but nothing else about my question.

Somebody can help me?
 
The answer! :)

The informations are in 3 dbf files:
(1) [projectS7Dir]/HOMESAVE7/S7HSTATX/HOBJECT1.DBF
(2) [projectS7Dir]/s7asrcom/S7CNTREF.DBF
(3) For each PLC on project are
[projectS7Dir]/s7asrcom/000000XX/S7CONTAI.DBF where XX is a hexadecimal code

STEP1:
Extract from file (1): ID, Name and UNITTYP.
Each Unittyp=1122305 is a PLC inserted on project s7
Make IDs in ascending order.

Name | ID | UNITTYP
PLC2 | 4 | 1122305
PLC1 | 10 | 1122305

STEP2:
The ID on file (2) is a name of source folder.
The ID is in decimal format. The name of folder is in hexadecimal format with 8 digit.
e.g.:
ID=14 (decimal) => E (Hex) => name Folder is 0000000E
Make this IDs in ascending order.

ID
1
14

STEP3:
Now you have the matches between PLC's name and the source folder

Name (STEP1)| ID (STEP2) | Source folder
PLC2 | 1 | ==> 00000001
PLC1 | 14 | ==> 0000000E

STEP4:
In the file (3) there are a files associations from s7-style and "human readable"
e.g.:

Name | FileName |
FBTest |000001C.awl |
FCOther |000004b.scl |

Now, we know all about to export source files. :ROFLMAO:


I added this new feature to my old project on sourceforge:
http://sourceforge.net/projects/autoexport/

Download a dbf library :
http://sarovar.org/frs/download.php/257/javadbf-0.4.0.jar
write just a command and the problem is solved:
java -classpath javadbf-version.jar -jar AutoExportPlcName-version.jar ./PLCPrj ./exportPLCSource​
where:
PLCPrj -> is a project folder
exportPLCSource -> is a export folder​

If you prefer a GUI interface, I made a really simple :)
java -classpath javadbf-version.jar -jar autoExport-version.jar​
and you can try it!

Any comments/advice is welcome!
Bye
 
Last edited:
With the timeline apparent in this thread, the question has to be asked: Why?

Why was this important? To appreciate the effort you spent to figure this out - and post a reply back with an answer - we need to know why it was important.

dbfedit is a pretty cool program.

And a Big Thank You for returning with a solution!
 
Nice that you provided the app also. Going to test it. Paul, SVN is version management software usually for computer application source management.
 
There is a error on command-line call.

isn't:
java -classpath javadbf-version.jar -jar AutoExportPlcName-version.jar ./PLCPrj ./exportPLCSource

but is correct:
java -classpath javadbf-version.jar;AutoExportPlcName-version.jar autoExport.AutoExportPlcName ./PLCPrj ./exportPLCSource
 
Last edited:

Similar Topics

Hello, I am sending data from a siemens 319-3PN/DP Plc with a Additional Cp343-1 card from the Plc to a remote BNR pc. I have configured 2 tcp...
Replies
7
Views
2,151
They are installed in a control panel that was made in France and are intended for the termination of analog inputs. Each of the red capped...
Replies
4
Views
377
I purchased a Viator HM-PF-USB-POWERX HART modem specifically because I was told it worked with Emerson AMS Device Configurator. But, Device...
Replies
0
Views
441
Hello All, I have an existing Mitsubishi L06CPU-06 PLC, and I am going to add a new serial communication card, LJ71C24, for modbus communication...
Replies
0
Views
476
hello, im trying to create a runtime communication path for a panelview 1250 the plc has a 1747-AENTR card that im trying to route through but...
Replies
1
Views
579
Back
Top Bottom