11/19/2010 7:27 AM | |
Joined: 1/28/2009 Last visit: 10/26/2024 Posts: 6852 Rating: (1365) |
Dear Goran_ Check OB1_SCAN_1 parameter in OB1 parametres.It may help. transfer this parameter to a memory byte (as an example) and compare it in your program with the type of restart you mean (or all of them). Using OBs and their parameters are helpful because they are our interfaces to the hardware.OB100,OB101,OB102 are set aside for this job, why don't you like to use them? extracted from STEP7 manual
|
Last edited by: hdhosseini at: 11/19/2010 7:31 AMLast edited by: hdhosseini at: 11/01/2019 15:37:39 |
|
11/19/2010 10:27 AM | |
Posts: 141 Rating: (0) |
Hello, hdhosseini, thanks for the response. Its not that I dont like OB's, it s just that I want to encapsulate the code in FB only, so when I want functionality implemented in this FB in another software, I just need to copy it and call it. If If I scatter the code throughout the application, then I am increasing possibility to make mistakes. I can solve this by making an input parameter CPUReset, and pass heere some marker that is set in OB100, but if its possible to do this from the FB itself, they I will go with that way. |
11/19/2010 2:37 PM | |
Joined: 10/7/2005 Last visit: 11/7/2024 Posts: 3026 Rating: (1057)
|
Hello Goran_ SFC6 "RD_SINFO" allows you to do exactly what you want to do (and a bit more). Call it from within your FB (or FC) and you'll get the info about the currently activeOB (in the TOP_SIstructure) as well as the info abou thestartup OBthat had last been executed (in the START_UP_SIstructure). If your SFC6 callling FB/FC iscalled from within a startup OB itself, TOP_SIand START_UP_SIhave the same contents. More detail about SFC6 is available in its context sensitive <F1> help and THIS link. I hope this helps |
Last edited by: fritz at: 11/19/2010 2:47 PMCheers |
|
This contribution was helpful to2 thankful Users |
Follow us on