Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Running and Debugging single BFB(How to run and debug a single function block?)
Running and Debugging single BFB [message #1729319] Wed, 13 April 2016 00:33 Go to next message
Awais Tanveer is currently offline Awais TanveerFriend
Messages: 21
Registered: April 2016
Junior Member
Hello!

I am new to 4DIAC. In my application, I am adding F_ADD function block and deploying it on a device. I pre-assign values of input variables. When I click "Download" button, I get the following in the deployment console:
<!-- 127.0.0.1:61499: X2Y2Executor -->
<Request Action="WRITE" ID="38">
  <Connection Destination="F_ADD.IN1" Source="5"/>
</Request>

<Response ID="38" Reason="BAD_PARAMS">


I watch all the variables but nothing happens when I manually trigger the REQ event. The other question I want to ask is that whether I must connect cold and warm events to my REQ input event in resource manager like they have done in Flip flop example? Can I debug it in stand alone mode explicitly triggering my input events in debug mode?

I guess there should be simple tutorial which addresses the creation of an application with single function block, running and deploying it.

Any help would be appreciated.

Re: Running and Debugging single BFB [message #1729453 is a reply to message #1729319] Thu, 14 April 2016 09:33 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 615
Registered: January 2014
Senior Member
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.
Previous Topic:Handling Hardware Interrupts
Next Topic:E_DELAY
Goto Forum:
  


Current Time: Thu Aug 16 23:28:24 GMT 2018

Powered by FUDForum. Page generated in 0.01345 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top