6/7/2010 11:46 PM | |
Joined: 9/27/2006 Last visit: 6/7/2023 Posts: 12036 Rating:
|
Hello GoForIT; If you look at chapter 13 of Progrmming with Step 7 v. 5.4, which describes how to use Sources in STL, you will see that there is an easy way to setup an instance DB to accompany the FB: simply add the parameters of the FB inside the associated DB, including the inital values of all parameters. http://support.automation.siemens.com/WW/view/en/18652056 Have a look at how the FB "Trafic Light Control" is created in a source, along with its instance DB6: CALL Traffic light control , DB6 ( // Name of FB, instance data block dur_g_p := S5T#10S, // Assign actual values to parameters del_r_p := S5T#30S, starter := TRUE, t_dur_y_car := T 2, t_dur_g_ped := T 3, t_delay_y_car := T 4, t_dur_r_car := T 5, t_next_red_car := T 6, r_car := "re_main", // Quotation marks show symbolic y_car := "ye_main", // names entered in symbol table g_car := "gr_main", r_ped := "re_int", g_ped := "gr_int"); Hope this helps, Daniel Chartier |
6/8/2010 6:31 AM | |
Posts: 352 Rating:
|
Thank you for your response!! I will give it a try. The truth is always out there - If you just know where to find it o |
Follow us on