Hi,
I have an issue about the choice for FC or FB in my standardisation...
My current standard is:
FC + UDT on a IN/OUT parameter + FACEPLATE.
In a DB Valves for example I add a UDT per Valve and I have in a FC Call Valves all my valves with standard Valve FC with UDT connected via UDT on IN/OUT.
My programs are OOP minded.
Now I want my Alarms also to be integrated in my objects. So I tested Program_Alarm in an OOP way and experienced that it needs an FB to be called in. Problem is, if I want this to be OOP that all my objects sudenly need to be FB's instead of FC's. It kills my standard.
I have for each object (Motor, Valve, etc...) an UDT with a CMD, MEMO and RESULT struct. So if I really need an instance then it's better to change my UDT to CMD + RESULT and integrate it in the instance, the MEMO data elsewhere in the same instance. This way I will change my faceplates that MEMO is not integrated in the UDT anymore.
So calling FB's (objects) in an FB with the multiple instance method is my final method I came up with. The Program_Alarm is configured to use path as alarm and takes the instance of the objects for the alarm creation.
So now yes, alarms are integrated in my objects. And I still have one DB (multiple instance).
But... there is one thing that bothers me...
HMI's controlling data in an instance DB. It has also bin considered not done.
What are your opnions about this... ?
In the CMD struct there are also HMI bits, wich means that the HMI will control data in a multiple instance... is this okay to do this way ? In wouldn't do this in Simatic, but in TIA ?
Opinions?
I have an issue about the choice for FC or FB in my standardisation...
My current standard is:
FC + UDT on a IN/OUT parameter + FACEPLATE.
In a DB Valves for example I add a UDT per Valve and I have in a FC Call Valves all my valves with standard Valve FC with UDT connected via UDT on IN/OUT.
My programs are OOP minded.
Now I want my Alarms also to be integrated in my objects. So I tested Program_Alarm in an OOP way and experienced that it needs an FB to be called in. Problem is, if I want this to be OOP that all my objects sudenly need to be FB's instead of FC's. It kills my standard.
I have for each object (Motor, Valve, etc...) an UDT with a CMD, MEMO and RESULT struct. So if I really need an instance then it's better to change my UDT to CMD + RESULT and integrate it in the instance, the MEMO data elsewhere in the same instance. This way I will change my faceplates that MEMO is not integrated in the UDT anymore.
So calling FB's (objects) in an FB with the multiple instance method is my final method I came up with. The Program_Alarm is configured to use path as alarm and takes the instance of the objects for the alarm creation.
So now yes, alarms are integrated in my objects. And I still have one DB (multiple instance).
But... there is one thing that bothers me...
HMI's controlling data in an instance DB. It has also bin considered not done.
What are your opnions about this... ?
In the CMD struct there are also HMI bits, wich means that the HMI will control data in a multiple instance... is this okay to do this way ? In wouldn't do this in Simatic, but in TIA ?
Opinions?