|
Re: Running and Debugging single BFB [message #1729453 is a reply to message #1729319] |
Thu, 14 April 2016 09:33 |
|
Hi,
testing FBs in this way is in principle possible. However as the error message implies you have specified values that can not be used by this FB's input. The reason is that F_ADD has in and outputs of type ANY_NUM. IEC 61499 is a strongly typed language and at runtime the type has to be specified. by just giving the FB a 5 the runtime does not know which type you have intended (e.g., SINT, SUINT, LINT). In order to use a constant with a inputs that are of generic type you need to specify the intended type according to the Literal mechanism defined in IEC 61131-3. That is the type followed by a hash and than the number, for example INT#5 or SINT#235.
In addition to testing a FB in an application you can also invoke the FB tester which is a tab in the fb type editor and perform tests there. For quick tests this should be faster and simpler.
|
|
|
Powered by
FUDForum. Page generated in 0.03427 seconds