11/11/2014 1:03 PM | |
Joined: 1/28/2009 Last visit: 9/25/2023 Posts: 6822 Rating:
|
Hello Johannes4u, There are some possibilities, please read more in section "16.2 calling function blocks " in the following manual: Structured Control Language (SCL V4, V5.0) for S7-300/S7-400 ProgrammingYou can try again by defining the FB prior to OB1 and then call the FB in OB1 with one instance DB like: [code]FB1.DB1(E1:=I0.0,E2:=I0.1);[/code] In this case , you are defining the inputs or inputs/outputs.To access the outputs, you can try the following syntax: [code]Q0.0:=DB1.A1; [/code] All needed information will be available in chapter 16 of mentioned manual.Also check the following clustered threads: HD_SCL Starting Point I hope this helps, Hamid Hosseini |
Last edited by: hdhosseini at: 11/11/2014 1:05 PMLast edited by: hdhosseini at: 05/17/2019 20:36:48 |
|
This contribution was helpful to
1 thankful Users |
11/12/2014 7:45 AM | |
Joined: 3/24/2009 Last visit: 6/20/2023 Posts: 535 Rating:
|
Dear Johannes4u, additional to the hints of hdhosseini, here some points concerning your program:
[code]FB1.DB1 (mytime:=T1, result:=variable);[/code] And please note, that the comments "Temporary Variables" and "Static Varaibles" do not match with the VAR-sections.Hope this helps! Best regards, yy1 |
5/2/2018 11:05 AM | |
Joined: 6/19/2017 Last visit: 9/28/2023 Posts: 7350 Rating:
|
New question published by süleyman_arslan is split to a separate thread with the subject Want to change parameter "ARA_DEGER" with fonk "ARALIK". Best regards |
My Forum is the place to personalize your profile, |
|
Follow us on