Is it possible to download the global safety database “F-SHARED DB” by using the
Siemens command-interface in a C# application? If so, how?
I created a Windowsapplication with Visual C#.
This application is created to control a Siemens PLC (e.g. Start PLC, stop PLC and download to PLC).
Therefor I’ll make use of the Siemens command-interface.
The Windowsapplication works fine as long as I don’t try to download safety blocks. So in other words; starting, stopping the PLC or even downloading a complete PLC program (including
HW-Config with safety) without safety blocks works fine.
My problem occurs when I try to download a safety block to PLC. This is because Simatic manager generates the following (error)message (see picture).
I noticed that the core of my problem is because the “F-GLOBAL DB” or “F-SHARED DB” isn’t present in the PLC. I know this because downloading of safety blocks works fine with the Windowsapplication when I do the following:
1. Download the safety program in the PLC with the safety utility in Simatic manager
2. Delete all safety blocks except the “F-Global DB”
3. Download all blocks with the Windowsapplication using command interface
Used Code (Simplified):