How to create a call multi-authority?
Basic knowledge of STEP7 is necessary (like knowing to create, publish and safeguard a block) for the good comprehension of the continuation.
First of all we need a block function! Hey yes it is him which will be called several Undecided times. But with is the fact it what an multi-authority of block? And does an authority very short… that exist?
Let us start with the beginning! An authority is the name given to the call of a block BFR. I.e. that with each time one calls block FB10 for example, one says that one creates an authority of block FB10. Each call generates a storage block named dB of authority. Here thus what is a simple authority or mono authority.
Yes but then so in my program I want to call 10 times the FB10, I will have to generate 10 storage blocks of authority! Pooh yes!! But it is not obliged, it exists a solution… the multi authority!
Firstly, which characterizes the multi authority it is the use of only one storage block. Some is the number of calls of the BFR, it will have only this storage block there (of course its size will vary according to the number of the calls).
And how that one makes such a wonder??
The various calls of your BFR must be carried out since another FB.Foot in mouth Ok one takes an example.
We have to create a function flickering with the FB10 which we called CLIGNOT. This block has three parameters of entry: Two values of tempo of the indicator and a twinkling bit of activation of the function. At exit we have a twinkling bit. Super this function, not?
In our program we use three indicators of various frequencies. We thus need called 3 times the FB10. In mono authority, it would be necessary generated 3 dB. It is more judicious to use the multi authority. Let us take the FB20 to operate the 3 calls of the FB10. Let us be insane call it, SOUS_PRG.
Handling consists in declaring three variables static of type CLIGNOT in SOUS_PRG. Once declared, these authorities appear in the list of the “elements of programs” under the heading “multi-authority”. It is enough “to draw them” “to move” towards the position or you want to place the various calls. You can also directly “make” one cal of the authority”. And worse it is all… or almost. Of agreement but it is or the dB multi trucInnocent. In fact this famous dB it is the dB of authority of SOUS_PRG. It is created when that one programs the call of SOUS_PRG. This dB contains the all parameters of SOUS_PRG, of which static parameters!
Is that better? That misses images I know… I would put them at the occasion. So long
| Commentaires |
|

















