--- a/examples/example.xml Fri Apr 13 17:54:40 2007 +0200
+++ b/examples/example.xml Wed Apr 18 16:39:28 2007 +0200
@@ -23,11 +23,8 @@
<types>
<dataTypes/>
<pous>
- <pou name="FBDTest" pouType="function">
+ <pou name="FBDTest" pouType="functionBlock">
<interface>
- <returnType>
- <BOOL/>
- </returnType>
<inputVars>
<variable name="IN1">
<type>
@@ -65,6 +62,13 @@
</type>
</variable>
</inputVars>
+ <outputVars>
+ <variable name="OUT">
+ <type>
+ <BOOL/>
+ </type>
+ </variable>
+ </outputVars>
</interface>
<body>
<FBD>
@@ -91,7 +95,7 @@
<position y="198" x="517"/>
</connection>
</connectionPointIn>
- <expression>FBDTest</expression>
+ <expression>OUT</expression>
</outVariable>
<block localId="6" height="84" width="99" typeName="AND">
<position y="105" x="235"/>
@@ -386,7 +390,7 @@
</variable>
</inputVars>
<outputVars>
- <variable name="ENO">
+ <variable name="ERROR">
<type>
<BOOL/>
</type>
@@ -395,24 +399,22 @@
</interface>
<body>
<IL>
-LD Y1
-SUB Y2 (* Substract Y2 from Y1 *)
-ST Temp (* Store Y1-Y2 in Temp *)
-MUL Temp (* Multiply by Temp to square *)
-ADD( X1 (* Defer ADD *)
-SUB X2 (* Substract X1 from X2 *)
-ST Temp (* Store X1-X2 in Temp *)
-MUL Temp (* Multiply by Temp to square *)
-)
-CAL SQRT (* Call Square root fun *)
-ST ILTest (* Setup function result *)
-GT TMax (* Greater than TMax ? *)
-JMPC ERR (* Yes, Jump to Error *)
-S ENO (* Set ENO *)
-RET (* Normal return *)
-
-ERR:
-RET (* Error return, ENO not set *)
+ LD Y1
+ SUB Y2 (* Substract Y2 from Y1 *)
+ ST Temp (* Store Y1-Y2 in Temp *)
+ MUL Temp (* Multiply by Temp to square *)
+ ADD( X1 (* Defer ADD *)
+ SUB X2 (* Substract X1 from X2 *)
+ ST Temp (* Store X1-X2 in Temp *)
+ MUL Temp (* Multiply by Temp to square *)
+ )
+ CAL SQRT (* Call Square root fun *)
+ ST ILTest (* Setup function result *)
+ GT TMax (* Greater than TMax ? *)
+ JMPC ERR (* Yes, Jump to Error *)
+ S ERROR (* Set ERROR *)
+ RET (* Normal return *)
+ERR: RET (* Error return, ENO not set *)
</IL>
</body>
</pou>
@@ -847,14 +849,14 @@
<ST>
IF Collision THEN
Speed := 0;
- Brakes := ON;
+ Brakes := TRUE;
END_IF;
-IF (Gate = CLOSED) AND
- (Pump = ON) AND (Temp > 200.0) THEN
- Control_State := Active;
+IF (Gate = TRUE) AND
+ (Pump = TRUE) AND (Temp > 200.0) THEN
+ Control_State := TRUE;
ELSE
- Control_State := Hold;
+ Control_State := FALSE;
PumpSpeed := 10.0;
END_IF;
</ST>