quote:以下是引用四书五经在2009-05-04 13:05:35的发言:
“Depending on the network you are working with, the Program Editor
either generates the UC instruction or the CC instruction during
conversion from the Ladder Logic programming language to the statement List programming language. You should attempt to use the
CALL instruction instead to avoid errors occurring in your programs.”
上面这段话引自STEP7帮助,大致的意思是说在做LAD到STL转换的时候,软件可能会生成UC或者CC指令,但这个调用调用的可能是一个FB块,就需要使用CALL指令去替换掉UC或才CC指令。
我在PLC上测试了一下,OB1中指令如下:
uc fb1//FB1定义时就没有参数。
用UC调用FB块,编译没问题,下载后也没有问题。
但如果FB1有一个参数,则下载后报错。
你的意思是不是这样
1:FB如果定义了输入输出参数就必须用CALL
2:FB如果没有定义输入输出参数就没有什么意义。直接FC就可以
3:FB如果没有定义输入输出参数,就不用和DB快对应,是否可以说调用FB的时候不一定要和DB对应。我就得如果是这样的话,是不是也失去了FB的意义