6/30/2022 2:23 PM | |
Joined: 5/23/2022 Last visit: 9/25/2022 Posts: 39 Rating: (0) |
Hello, please help I have programs S7-400 running normally and there are some functions like FC14 - FC22 to send commands to VFD (simovert masterdrive) the FC14 - FC22 are only the functions carrying commands to VFD using Profibus telegrams and in normal state the systems run fine, and the commands are received from PLC to VFD because I have monitored themes. The problem is when I use cross-referances I can't see the functions FC14 - FC22 called by another Block or even by another functions you can see that in attached images, and I am sure that these functions FC14 - FC22 are used but i don't know how. Is it possible that HMI programs call thems? !! or there is another thing that I didn't know Hope my question is clear Thanks AttachmentFCref.pdf (281 Downloads) |
Last edited by: salah47 at: 06/30/2022 15:28:29 |
|
6/30/2022 3:28 PM | |
Joined: 9/27/2006 Last visit: 4/26/2024 Posts: 12257 Rating: (2665) |
Hello salah; Step 7 uses OB1 ("Program Cycle OB") in the same way a C/C++ uses the main() function, where all functions and procedures must be called if you want the program to execute them.. If a Step 7 program block (FB or FC) is not called within OB1 (or a FC or FB called in OB) then the code is not functional. I suggest you look in the cross-reference ,, and open the Program Structure, it will indicate if the blocks you are researching are called in nthe program, and if so, from what block. See section 14.1.2 in the Programming with step 7 v5.5 manual (in French): https://support.industry.siemens.com/cs/fr/fr/view/45531107 When we were at development stage of a comlex program , in often happened that we created differen versions of our blocks, for different tests. We would then call whatever version of the bock we needed to execute our code, while the others remained uncalled. That might explain why different functions exist in your program without being actually called in OB1 or another program block. Of course normally we would clean up the code once the programm was comissionned... Hope this helps, Daniel ChartierEach different block had a different FC/FB number, of course. |
This contribution was helpful to1 thankful Users |
6/30/2022 3:39 PM | |
Joined: 5/23/2022 Last visit: 9/25/2022 Posts: 39 Rating: (0) |
Hello, I was thinking just like you said and this is the logical explanation and that what's we learned, "An FC not called is a function not used" but the problem is the functions is executed when the program is running because we see the same command word b#010010101001.. Is sent to VFD thought this function FC14 which is in off-line Cross-reference never been called , and we can see the word is written in VFD (Drive-monitor) . same word of FC14 is the same word in Drive monitor, And the FC14 is the only functions responsible for communication with VFD I was thinking that maybe HMI program could have called these functions because the HMI is not Siemens maybe it carrying a program |
Last edited by: salah47 at: 06/30/2022 15:40:37 |
|
Follow us on