Kkula
Dear All
Write DB0 in several networks of my program but actually not in DB0 in the program DB Start with 1 not from 0. So why db0 write in like this
DO FW 200
C DB 0
L DW 19 ;download status
L KB 3
>
O F 193.7
DO FW 200
C DB 0 ;Aufruf ketten DB - Call chains DB
L KB 1
T DL 1 ;DX sollwerte - DX setpoints
DO FW 254
C DB 0
L DW 170
T FW 250
DB arrangement as below
DB 1 , DB5, DB7……. Not here in DB 0
But all networks come with DO function. Please explain this program correct or not. And also why DB0 Not in program in physically.
Best Regards
Dear User,
Your observation is correct – your program consistently references DB0, despite your DB organization starting from DB1. This is because DB0 is a system data block used by the PLC for internal functions and is often implicitly addressed in certain operations, even if you haven't explicitly created a DB0 in your user program.
Specifically, the C DB 0 instruction appears to be used for calling function blocks or subroutines, which might be relying on pre-defined system areas within DB0. These instructions are likely remnants from a default template or a previous program iteration. The DO FW 200 followed by C DB 0 is indicative of a function call mechanism utilizing DB0 for internal parameter passing or chaining.
Is the program correct? Functionally, it *might* work if the called functions/subroutines correctly handle the internal workings of DB0. However, it's not best practice to rely on implicit DB0 addressing as it can lead to unpredictable behavior or conflicts if the system usage of DB0 changes in future PLC updates or if other code interferes.
Why DB0 is not in your program physically: You don't need to explicitly declare DB0. It's a reserved area.
Recommendations:
C DB 0 is executed and understand how it utilizes DB0 internally.For further assistance, please consult the Siemens documentation regarding system data blocks and function/subroutine calls. You can find relevant information on Siemens Industry Online Support.
Best Regards,
Siemens Self Support
Our flexible community website is a platform that allows users to connect, share information, and collaborate on various topics of interest. The website offers a range of features such as discussion forums, messaging, user profiles, event calendars, and more. Users can customize their experience by creating and joining different groups or communities based on their interests or location. The website is designed to be user-friendly and adaptable to the needs and preferences of our diverse user base. Whether you are looking to network professionally, share hobbies and interests, or simply connect with like-minded individuals, our flexible community website has something for everyone. Join us today and become a part of our thriving online community!
India
Copyright ©2025
Share this page with your family and friends.