6/22/2012 3:51 PM | |
Posts: 21 Rating:
|
Good Morning, I created my 5th FB in my project with one rung of logic and when I call it as the first block in OB1 download it, it is green on the EN but the ENO is red (See attachment). When I move the call to anywhere else as long as it's not called first, it works and both EN and ENO are green as they should be. I am scratching my head on this one on why it matters where it is called.... Thanks for your help, Jason
AttachmentFB_BROKE.zip (40 Downloads) |
6/22/2012 4:32 PM | |
Joined: 1/28/2009 Last visit: 9/25/2023 Posts: 6822 Rating:
|
Hello OUFAN75, Attachment explain a bit your case with reconstructed case.I manipulate BR with "#br_manual" input parameter. [code] CLR A #in1 A #in2 = #aus A #br_manual SAVE [/code] Hope this helps Best regards Hamid Hosseini AttachmentBR.zip (29 Downloads) |
Last edited by: hdhosseini at: 05/30/2019 23:10:24 |
|
6/22/2012 6:37 PM | |
Joined: 10/7/2005 Last visit: 9/29/2023 Posts: 2989 Rating:
|
Hello OUFAN75 have alook at the following two threads,they'll hopefully contain the answers to your questions: Online Laddder - Dashed FB call Regarding the BR bit |
Cheers |
|
This contribution was helpful to
3 thankful Users |
6/22/2012 6:40 PM | |
Joined: 1/28/2009 Last visit: 9/25/2023 Posts: 6822 Rating:
|
Hello again, All you needed provided in the attachment.But, I think some complementary explanation is necessary! 1-BR is one of the status bits in CPU and used to implement EN/ENO mechanism.There are some useful posts in the forum you can search for.It is used as an indication for user of a function or a function block that execution of that done without any error in CPU.It is also applicable for System functions.Normally BR is set to "TRUE" in the beginning of a block and It is important for developer of a function to reset it in case of any error such as range violation in calculation, illegal floating point number,illegal input for arithmetic functions and ... . 2-So, in your case, As we can not see what you have done in your FB, I guess you never set "BR" and it is "FALSE" when function execution ends and you face the frightening red line. at least add following codes in your FB. [code] SET SAVE [/code] Thank you "fritz" for providing all related topics.I clustered all in the following TAG: Cases on BR-EN/ENO Mechanism Best regards Hamid Hosseini |
Last edited by: hdhosseini at: 6/22/2012 6:48 PMLast edited by: hdhosseini at: 05/30/2019 23:10:47 |
|
This contribution was helpful to
3 thankful Users |
6/22/2012 7:32 PM | |
Posts: 21 Rating:
|
Thank you gentlemen for the detailed explanation |
Follow us on