133 <connectionPointOut> |
133 <connectionPointOut> |
134 <relPosition y="14" x="90"/> |
134 <relPosition y="14" x="90"/> |
135 </connectionPointOut> |
135 </connectionPointOut> |
136 <expression>IN3</expression> |
136 <expression>IN3</expression> |
137 </inVariable> |
137 </inVariable> |
138 <block localId="8" height="87" width="99" instanceName="" typeName="OR"> |
138 <block localId="8" height="87" width="99" typeName="OR"> |
139 <position y="246" x="235"/> |
139 <position y="246" x="235"/> |
140 <inputVariables> |
140 <inputVariables> |
141 <variable formalParameter="IN1" negated="true"> |
141 <variable formalParameter="IN1" negated="true"> |
142 <connectionPointIn> |
142 <connectionPointIn> |
143 <relPosition y="36" x="0"/> |
143 <relPosition y="36" x="0"/> |
391 </variable> |
393 </variable> |
392 </outputVars> |
394 </outputVars> |
393 </interface> |
395 </interface> |
394 <body> |
396 <body> |
395 <IL> |
397 <IL> |
396 LD Y1 |
398 LD Y1 |
397 SUB Y2 (* Substract Y2 from Y1 *) |
399 SUB Y2 (* Substract Y2 from Y1 *) |
398 ST Temp (* Store Y1-Y2 in Temp *) |
400 ST Temp (* Store Y1-Y2 in Temp *) |
399 MUL Temp (* Multiply by Temp to square *) |
401 MUL Temp (* Multiply by Temp to square *) |
400 ADD( X1 (* Defer ADD *) |
402 ADD( X1 (* Defer ADD *) |
401 SUB X2 (* Substract X1 from X2 *) |
403 SUB X2 (* Substract X1 from X2 *) |
402 ST Temp (* Store X1-X2 in Temp *) |
404 ST Temp (* Store X1-X2 in Temp *) |
403 MUL Temp (* Multiply by Temp to square *) |
405 MUL Temp (* Multiply by Temp to square *) |
404 ) |
406 ) |
405 CAL SQRT (* Call Square root fun *) |
407 CAL SQRT (* Call Square root fun *) |
406 ST ILTest (* Setup function result *) |
408 ST ILTest (* Setup function result *) |
407 GT TMax (* Greater than TMax ? *) |
409 GT TMax (* Greater than TMax ? *) |
408 JMPC ERR (* Yes, Jump to Error *) |
410 JMPC ERR (* Yes, Jump to Error *) |
409 S ENO (* Set ENO *) |
411 S ENO (* Set ENO *) |
410 RET (* Normal return *) |
412 RET (* Normal return *) |
411 |
413 |
412 ERR: |
414 ERR: |
413 RET (* Error return, ENO not set *) |
415 RET (* Error return, ENO not set *) |
414 </IL> |
416 </IL> |
415 </body> |
417 </body> |
416 </pou> |
418 </pou> |
417 <pou name="SFCTest" pouType="program"> |
419 <pou name="SFCTest" pouType="program"> |
418 <interface> |
420 <interface> |
724 <position y="369" x="316"/> |
726 <position y="369" x="316"/> |
725 <position y="344" x="316"/> |
727 <position y="344" x="316"/> |
726 </connection> |
728 </connection> |
727 </connectionPointIn> |
729 </connectionPointIn> |
728 </jumpStep> |
730 </jumpStep> |
729 <actionBlock localId="20" height="60" width="100"> |
731 <actionBlock localId="20" height="60" width="181"> |
730 <position y="232" x="441"/> |
732 <position y="232" x="441"/> |
731 <connectionPointIn> |
733 <connectionPointIn> |
732 <relPosition y="15" x="0"/> |
734 <relPosition y="15" x="0"/> |
733 <connection refLocalId="10"> |
735 <connection refLocalId="10"> |
734 <position y="247" x="441"/> |
736 <position y="247" x="441"/> |
735 <position y="247" x="416"/> |
737 <position y="247" x="416"/> |
736 </connection> |
738 </connection> |
737 </connectionPointIn> |
739 </connectionPointIn> |
738 <action qualifier="N"> |
740 <action indicator="IN5" qualifier="N"> |
739 <reference name="ACT1"/> |
741 <reference name="ACT1"/> |
740 </action> |
742 </action> |
741 <action qualifier="S"> |
743 <action qualifier="D" duration="10s"> |
742 <reference name="IN1"/> |
744 <reference name="IN1"/> |
743 </action> |
745 </action> |
744 </actionBlock> |
746 </actionBlock> |
745 </SFC> |
747 </SFC> |
746 </body> |
748 </body> |