11/15/2010 11:09 AM | |
Joined: 1/28/2009 Last visit: 8/31/2025 Posts: 6874 Rating:
|
Hello dear member {CreateDebugInfo:='yes';SetOKFlag:='yes'} END_VAR VAR_OUTPUT END_VAR out:=(ein1)+ ein2 ; END_FUNCTION [/code] ORGANIZATION_BLOCK OB1 VAR_TEMP FC1 (EIN1:=HD1 , EIN2:=HD2,OUT:=HD3);
[/code] Attachmentupload.zip (354 Downloads) |
Last edited by: hdhosseini at: 11/15/2010 11:36 AM |
|
11/15/2010 11:10 AM | |
Joined: 1/17/2007 Last visit: 7/10/2025 Posts: 1561 Rating:
|
Most functions return a value (error code) to indicate whether the function executed with or without errors. This takes the form RET_VAL := FCXXX(...,...,...); RET_VAL is normally an integer, with a negative value indicating a fault. The value returned has some common values that indicate the most common problems (e.g. bad pointer etc.). Some FC have their own individual error codes in addition to these common ones, these are detailed in the documentaton for the FC. Here is a link to the common errors documentation. |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
This contribution was helpful to
1 thankful Users |
Follow us on