Commit cce5355f authored by Ivan Tyagov's avatar Ivan Tyagov

Detect a circle as an anomaly for separation.

Reasons: easier to detect (not our goal to make the perfect oi-sensor
anyway).
parent d09c5642
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201"> <project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201">
<fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2021-05-14T14:33:11"/> <fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2021-05-14T14:33:11"/>
<contentHeader name="Counter (OSIE)" modificationDateTime="2024-05-22T13:06:58"> <contentHeader name="Counter (OSIE)" modificationDateTime="2024-05-22T13:47:43">
<coordinateInfo> <coordinateInfo>
<fbd> <fbd>
<scaling x="0" y="0"/> <scaling x="0" y="0"/>
...@@ -83,30 +83,34 @@ ...@@ -83,30 +83,34 @@
</variable> </variable>
</outputVariables> </outputVariables>
</block> </block>
<inVariable localId="3" executionOrderId="0" height="25" width="50" negated="false"> <inVariable localId="3" executionOrderId="0" height="27" width="50" negated="false">
<position x="181" y="206"/> <position x="181" y="206"/>
<connectionPointOut> <connectionPointOut>
<relPosition x="50" y="12"/> <relPosition x="50" y="13"/>
</connectionPointOut> </connectionPointOut>
<expression>Reset</expression> <expression>Reset</expression>
</inVariable> </inVariable>
<outVariable localId="4" executionOrderId="0" height="25" width="42" negated="false"> <outVariable localId="4" executionOrderId="0" height="27" width="42" negated="false">
<position x="433" y="266"/> <position x="433" y="266"/>
<connectionPointIn> <connectionPointIn>
<relPosition x="0" y="12"/> <relPosition x="0" y="13"/>
<connection refLocalId="2" formalParameter="Out0"> <connection refLocalId="2" formalParameter="Out0">
<position x="433" y="278"/> <position x="433" y="279"/>
<position x="410" y="279"/>
<position x="410" y="278"/>
<position x="387" y="278"/> <position x="387" y="278"/>
</connection> </connection>
</connectionPointIn> </connectionPointIn>
<expression>Cnt0</expression> <expression>Cnt0</expression>
</outVariable> </outVariable>
<outVariable localId="6" executionOrderId="0" height="25" width="42" negated="false"> <outVariable localId="6" executionOrderId="0" height="27" width="42" negated="false">
<position x="435" y="222"/> <position x="435" y="222"/>
<connectionPointIn> <connectionPointIn>
<relPosition x="0" y="12"/> <relPosition x="0" y="13"/>
<connection refLocalId="2" formalParameter="Out1"> <connection refLocalId="2" formalParameter="Out1">
<position x="435" y="234"/> <position x="435" y="235"/>
<position x="411" y="235"/>
<position x="411" y="234"/>
<position x="387" y="234"/> <position x="387" y="234"/>
</connection> </connection>
</connectionPointIn> </connectionPointIn>
...@@ -171,13 +175,13 @@ ...@@ -171,13 +175,13 @@
<xhtml:p><![CDATA[(* this will always switch on VFD_relay0 which controls conveyor line*) <xhtml:p><![CDATA[(* this will always switch on VFD_relay0 which controls conveyor line*)
VFD_relay0 := 1; VFD_relay0 := 1;
IF OI_sensor_counter=2.0 THEN IF OI_sensor_counter=3.0 THEN
(* a rectangle was recognized thus switch ON air valve *) (* a circle was recognized thus switch ON air valve *)
Air_Valve_Relay0 := 1; Air_Valve_Relay0 := 1;
END_IF; END_IF;
IF OI_sensor_counter=0.0 OR OI_sensor_counter=1.0 OR OI_sensor_counter=3.0 THEN IF OI_sensor_counter=0.0 OR OI_sensor_counter=1.0 OR OI_sensor_counter=2.0 THEN
(* a circle / triangle or nothing was recognized thus switch OFF air valve *) (* a rectange / triangle or nothing was recognized thus switch OFF air valve *)
Air_Valve_Relay0 := 0; Air_Valve_Relay0 := 0;
END_IF; END_IF;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment