Step 7 Download global safety db via command-interface (C#)

rick-brinkman

Level-1
Beiträge
2
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
Hello all,

Question:
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?


Background:
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).

2ql4fi1.jpg



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):
4vlcty.jpg
 
Hello and welcome,

you can download safety blocks with the simatic manager only via "edit safetyprogramm" and when the cpu is in stop mode.
Its an own "wizzard" like the download of the HW-Config. That could be the reason why you cant handle Safety Blocks like "normal" Blocks.


Greetings

Marcel
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Hi rick,

the F-Global-DB is a System Block and will generate with save&generate in HW-Konfig of Simatic Manager, so you have to be sure
of the right sequence of programming.

Further the generating of F-programm with the Simatic Manager includes some safety rules, how do you do this with a C#-code?
Maybe you find some helpful information in the system manual.
 
Hello all,

First of all, thanks a lot for your replies
Second, my apologies for the late response.

I get the idea that you think that I want to generate the whole safety program via the command interface in C#.
I was probably not clear enough but this is not my intension.

The idea is to create a working PLC program with Simatic Mannager.
Once the working PLC program is created, it will be stored at a location on the PC were the C# application will run.
The user can select the PLC program via the C# interface and then download the selected PLC program to an empty PLC.

Because the PLC is empty and therefore does not contain the "F-Shared DB", the error message will appear while downloading.
 
Zurück
Oben