1/15/2013 3:21 PM | |
Joined: 10/10/2005 Last visit: 4/18/2024 Posts: 1917 Rating: (132) |
Hello, the block_fb identifies a specific block to be used by the STL program in the block called. See also the informations in the online help. There is an example in the internet: http://support.automation.siemens.com/WW/view/de/18287140 With best regards |
1/23/2013 5:47 AM | |
Joined: 6/5/2009 Last visit: 3/1/2024 Posts: 149 Rating: (0) |
Hi Marko Bursic A little example might demonstrate my requirement. FB10 : "Base_Block" in: fbk_run : bool fbk_trip : bool fbk_remote : bool out: run_q : bool trip_q : bool remote_q : bool Code: A #fbk_run = #run_q A #fbk_remote = #remote_q A #fbk_trip = #trip_q FB11: "Motor_Appln" in: soft_start : bool soft_stop : bool interlocks : bool feedback_ext : block_fb out: q_start : bool q_stop : bool stat: feedback_stat : fb10 code: lar1 p#feedback_ext A( O #soft_start O #feedback_stat.run_q ) A #interlocks AN #feedback_stat.trip_q AN #soft_stop = #q_start O soft_stop O interlocks O feedback_stat.trip_q =q_stop r q_start OB1: call "motor_Appln", db11 soft_start :=db11.dbx0.0 soft_stop :=db11.dbx0.1 interlocks :=db11.dbx0.2 feedback_ext :=fb10 q_start :=db11.dbx4.0 q_stop :=db11.dbx4.1 In the above code, I've used FB 10 in the stat part of FB11. Now my question is, without usingthe stat part to call the FB10, is it possible to use the block_fb to declare the variables and use them in the programme. I'm still unclear with that usage, as I can only extract the number of the FB that is placed against the block_fb and nothing more. How can this data type, block_fb, be used more extintively? Regards, Grim Reaper. |
1/23/2013 7:08 AM | |
Joined: 10/7/2005 Last visit: 5/6/2024 Posts: 3004 Rating: (1046)
|
Hello Grim Reaper you can't use "Block_FB" more extensively than what you have worked out yourself already and you won't be able to pass on an FB with direct easy access to its Paramaters to another FB. "Block_FB" and"Block_FC" (and to a certain extend "Block_DB") area backward compatibility leftover fromS5 days as far as I'm concerned and there is little practicalneed for them in S7 (certainly not in your case where using FB10 as a Multi Instance call inside FB11 is the way to go). Have a look too at Can anyone tell what for BLOCK_FC, BLOCK_FB etc. types are used? for more on this and I hope this helps. |
Cheers |
|
Follow us on