Siemens SCL (SFB4)

cjd1965

Lifetime Supporting Member
Join Date
Apr 2007
Location
UK
Posts
1,659
Hi
I am trying out SCL and wish to use a stat SFB4 with a preset from a DB, Say Stuff, T1 where T1 is type TIME

Compiles
Code:
FUNCTION_BLOCK FB20
VAR
Timer1 : SFB4;
END_VAR
Timer1(IN := M0.0,PT:=T#10S); 

;  
END_FUNCTION_BLOCK

Wont Compile
Code:
FUNCTION_BLOCK FB20
VAR
Timer1 : SFB4;
END_VAR
Timer1(IN := M0.0,PT:="Stuff".T1); 

;  
END_FUNCTION_BLOCK

How do i point the SCL at the DB for the timer preset?
 
Thanks, you cracked it. The compiler error code didnt come close. Dare say there will be other quirks as i progress.
 

Similar Topics

I want to use 'SFB4: TON' because I want the code to be self contained, I don't have to assign a timer in the symbol list. I want to use the...
Replies
1
Views
8,501
Hello, When you want compare values of an array to a range of numbers is it a right way to do that? FUNCTION ADD VAR_IN_OUT A:ARRAY[1..50]...
Replies
5
Views
2,080
Hi All, I need to try and convert some code from Siemens SCL (TIA16) over to Allen Bradley RS5000. I have attached an image of the SCL and what...
Replies
10
Views
4,065
in the scl code written in screenshot Line 1 condition is false but still the program checking the line 2 condition and says it is true i had...
Replies
3
Views
1,765
I am new to PLC programming. Is there a standard way to incorporate alarms / warnings / events such as the exceptions in C++ or Java where you can...
Replies
5
Views
2,003
Back
Top Bottom