大家好!我用的是最新版PCS7V7,用SCL编的FB在CFC中可以调用,但FC就不可以调用。
在CFC中提示:FCXX无法导入,引用的块FCXX超出用户范围
程序:
FUNCTION FC203:VOID //Automatic Update of SAMPLE_TIME (SAMPLE_T)
{S7_m_c := 'true';S7_tasklist := 'OB80,OB100'}
TITLE = 'FCYH'
VERSION : '1.0'
AUTHOR : FAQ1
FAMILY : PCS7
NAME : YH1
//KNOW_HOW_PROTECT; //为块写保护
//Begin of declaration of variables for inputs
VAR_INPUT
//Input Variables
IN1 {S7_visible:='true';S7_link:='true';S7_dynamic:='true'} : BOOL := FALSE; //INPUT 1IN2 {S7_visible:='true'} : BOOL := FALSE; //INPUT 2
IN2 {S7_visible:='true';S7_link:='true' ;S7_dynamic:='true'} : BOOL := FALSE;
END_VAR
//Begin of declaration of variables for outputs
VAR_OUTPUT
//Output Variables
OUT1{S7_visible:='true' } : BOOL := FALSE; //OUTPUT 1
END_VAR
//Begin of program
BEGIN
IF IN2 = FALSE THEN
OUT1 := FALSE;
ELSE
OUT1 := true;
END_IF;
END_FUNCTION
这是什么原因呢!
先谢谢大家!