5/5/2012 10:21 AM | |
Posts: 3 Rating: (1) |
Hi, I need tocall a temporary variable in a FBfrom another FB. Is that possible ? If so,how? |
This contribution was helpful to1 thankful Users |
5/5/2012 10:48 AM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear maviizi , you will have to move the variablefrom TEMP to STAT. Then you can access it via the instance DB of that function block. If you cannot do that you will have to store your TEMPvariable an a global DB or global memory area (i.e. flag memory area). Regards. |
Give us your feedback and show us your respect! |
|
5/5/2012 10:55 AM | |
Posts: 557 Rating: (64) |
Hello, Try this...... IN FB1 L Temp1 (LW10) call FB2 IN FB1 L DB#16#87000000 LAR1 L W [AR1,P#10.0]== Temp1 Report system error is also work on same concept. |
This contribution was helpful to1 thankful Users |
5/5/2012 10:59 AM | |
Posts: 2348 Rating: (264) |
Can you clarify for what purpose do you need such task? It can be done as stated above, but it's quite exotic. Maybe you can add additional inputs/outputs or use muliinstance concept? |
This contribution was helpful to1 thankful Users |
5/5/2012 11:09 AM | |||||||
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear Eastern , do you know what happen if between your two blocks is another block which uses same local area? Regards. |
||||||
Give us your feedback and show us your respect! |
|||||||
5/5/2012 11:29 AM | |||||||
Posts: 557 Rating: (64) |
Hello TIBI68
Yes actually 87 is a machine code of local previous stack, while calling fc/fb under fc/fb. local stack L & previous stack V are interlink. here in simatic manager you can not use V memory therefore i have used logic in machine language. Hope you understood. Regards |
||||||
5/5/2012 11:37 AM | |
Posts: 3 Rating: (1) |
I am creating a function block to protect the program against copy. It is related to CPU Serial Number. Actually i created it. I need to call a variable from my Licence FB to another fb. This variable must be unseen in Licence DB. TheLicence FB is protected by "Block Privacy".You know that stat variables are seenon db monitoring but temps aren't. What if i protect this db by "know how protection" it can be cracked. So i have to put this variable into temp and call it from here. Thanks for your replies. |
5/5/2012 11:43 AM | |||||||
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear Eastern , you did not understood what I wanted to say. The two blocks I inserted are an example and are standing for any other blocks using same local area. FC1 A M0.0 = L0.0 FC3 A M1.0 = L0.0 FC4 A M2.0 = L0.0 Call FC2 IN FC2 L DW#16#87000000 LAR1 A [AR1,P#0.0] = Will get result of m0.0 Which M will be in the result (M0.0, M1.0 or M2.0)? Regards. |
||||||
Give us your feedback and show us your respect! |
|||||||
This contribution was helpful to1 thankful Users |
5/5/2012 12:07 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear maviizi, thanks for your reply, that makes us understand whatkind of function you are trying to implement. I am sure you will find a way which suits your needs. A 100% security is not available. Regards. |
Give us your feedback and show us your respect! |
|
Follow us on