Nick Birke
Member
I am trying to build an FB as a wrapper for a timer... as any of you know me I am jumping into siemens newly/lately. It is not behaving the way I want want o be able to debug more, on the variables inside the FB. How do you see call them out? Do you need to do it by some DB address like dbxx.abcd or something... is it possible to do it by... FBMYFB#.#internalvariable?
Also... I created this FB as a something meant to be reusable (multi-instance.) I have several questions...
1. I called the FB- FB78... I associated it with a database DB78. So I am assuming this DB has to be deployed whenever you want to use it (well I am basically sure of that.)
2. The thing of it is... if you put the FB in an OB or FC... then you need to create another database for each instance. I am concerned about how these DBs relate... for each instance... is data-integrity ensured because each has instance has it it's own DB.
3. What if you use a memory address like T1 or MD30 inside the FB... it that something that always has to be kept in mind for the entire program? Or is it put in an memory internalized to the FB... and if it is not... lets say you need to use memory addresses... particular like a T address in the FB... how do you do this so that it is attached to the DB... my theory is that the T value is not internalized... and so if you put multiple instances of this in a program there would be a conflict. Let's just say I want to put a SFB in the FB... or a S5TIMER in my FB... it is going to want to be assigned to a T address... this seems problematic.
Sorry if this rambles a bit.
Also... I created this FB as a something meant to be reusable (multi-instance.) I have several questions...
1. I called the FB- FB78... I associated it with a database DB78. So I am assuming this DB has to be deployed whenever you want to use it (well I am basically sure of that.)
2. The thing of it is... if you put the FB in an OB or FC... then you need to create another database for each instance. I am concerned about how these DBs relate... for each instance... is data-integrity ensured because each has instance has it it's own DB.
3. What if you use a memory address like T1 or MD30 inside the FB... it that something that always has to be kept in mind for the entire program? Or is it put in an memory internalized to the FB... and if it is not... lets say you need to use memory addresses... particular like a T address in the FB... how do you do this so that it is attached to the DB... my theory is that the T value is not internalized... and so if you put multiple instances of this in a program there would be a conflict. Let's just say I want to put a SFB in the FB... or a S5TIMER in my FB... it is going to want to be assigned to a T address... this seems problematic.
Sorry if this rambles a bit.