Commit 19e243dd authored by Ivan Tyagov's avatar Ivan Tyagov

Rename variables to keep conventions.

parent 67441a7c
<?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="2023-09-12T15:58:31"> <contentHeader name="Counter (OSIE)" modificationDateTime="2023-09-12T16:20:59">
<coordinateInfo> <coordinateInfo>
<fbd> <fbd>
<scaling x="0" y="0"/> <scaling x="0" y="0"/>
...@@ -149,22 +149,22 @@ ...@@ -149,22 +149,22 @@
<INT/> <INT/>
</type> </type>
</variable> </variable>
<variable name="OpticalShape"> <variable name="OI_sensor_counter">
<type> <type>
<LREAL/> <LREAL/>
</type> </type>
</variable> </variable>
<variable name="Relay0"> <variable name="VFD_relay0">
<type> <type>
<DINT/> <DINT/>
</type> </type>
</variable> </variable>
<variable name="Relay1"> <variable name="Air_Valve_Relay0">
<type> <type>
<DINT/> <DINT/>
</type> </type>
</variable> </variable>
<variable name="mes5_int_counter_in"> <variable name="MES5_int_counter_in">
<type> <type>
<LINT/> <LINT/>
</type> </type>
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<xhtml:p><![CDATA[MES5 counter (read only)]]></xhtml:p> <xhtml:p><![CDATA[MES5 counter (read only)]]></xhtml:p>
</documentation> </documentation>
</variable> </variable>
<variable name="mes5_int_counter_out"> <variable name="MES5_int_counter_out">
<type> <type>
<LINT/> <LINT/>
</type> </type>
...@@ -184,22 +184,22 @@ ...@@ -184,22 +184,22 @@
</interface> </interface>
<body> <body>
<ST> <ST>
<xhtml:p><![CDATA[(* this will always switch on relay0 which controls conveyor line*) <xhtml:p><![CDATA[(* this will always switch on VFD_relay0 which controls conveyor line*)
Relay0 := 1; VFD_relay0 := 1;
IF OpticalShape=2.0 THEN IF OI_sensor_counter=2.0 THEN
(* a rectangle was recognized thus switch ON air valve *) (* a rectangle was recognized thus switch ON air valve *)
Relay1 := 1; Air_Valve_Relay0 := 1;
(* read from MES5 counter value so we continue from where we were. In this case (* read from MES5 counter value so we continue from where we were. In this case
increment blow counter at MES5*) increment blow counter at MES5*)
mes5_int_counter_in := mes5_int_counter_in + 1; MES5_int_counter_in := MES5_int_counter_in + 1;
(* set to MES5 the counter value so it is kept permanently *) (* set to MES5 the counter value so it is kept permanently *)
mes5_int_counter_out := mes5_int_counter_in; MES5_int_counter_out := MES5_int_counter_in;
END_IF; END_IF;
IF OpticalShape=0.0 OR OpticalShape=1.0 OR OpticalShape=3.0 THEN IF OI_sensor_counter=0.0 OR OI_sensor_counter=1.0 OR OI_sensor_counter=3.0 THEN
(* a circle / triangle or nothing was recognized thus switch OFF air valve *) (* a circle / triangle or nothing was recognized thus switch OFF air valve *)
Relay1 := 0; Air_Valve_Relay0 := 0;
END_IF; END_IF;
]]></xhtml:p> ]]></xhtml:p>
...@@ -225,7 +225,7 @@ END_IF; ...@@ -225,7 +225,7 @@ END_IF;
<simpleValue value="0"/> <simpleValue value="0"/>
</initialValue> </initialValue>
</variable> </variable>
<variable name="OpticalShape" address="%IL1.2"> <variable name="OI_sensor_counter" address="%IL1.2">
<type> <type>
<LREAL/> <LREAL/>
</type> </type>
...@@ -233,15 +233,15 @@ END_IF; ...@@ -233,15 +233,15 @@ END_IF;
<xhtml:p><![CDATA[OPC UA optical shape sensor]]></xhtml:p> <xhtml:p><![CDATA[OPC UA optical shape sensor]]></xhtml:p>
</documentation> </documentation>
</variable> </variable>
<variable name="Relay0" address="%QD0.0"> <variable name="VFD_relay0" address="%QD0.0">
<type> <type>
<DINT/> <DINT/>
</type> </type>
<documentation> <documentation>
<xhtml:p><![CDATA[relay 0 (drive motor)]]></xhtml:p> <xhtml:p><![CDATA[VFD relay 0 (drive motor)]]></xhtml:p>
</documentation> </documentation>
</variable> </variable>
<variable name="Relay1" address="%QD0.1"> <variable name="Air_Valve_Relay0" address="%QD0.1">
<type> <type>
<DINT/> <DINT/>
</type> </type>
...@@ -249,7 +249,7 @@ END_IF; ...@@ -249,7 +249,7 @@ END_IF;
<xhtml:p><![CDATA[relay 0 (air valve)]]></xhtml:p> <xhtml:p><![CDATA[relay 0 (air valve)]]></xhtml:p>
</documentation> </documentation>
</variable> </variable>
<variable name="mes5_int_counter_in" address="%IL2.2"> <variable name="MES5_int_counter_in" address="%IL2.2">
<type> <type>
<LINT/> <LINT/>
</type> </type>
...@@ -257,7 +257,7 @@ END_IF; ...@@ -257,7 +257,7 @@ END_IF;
<xhtml:p><![CDATA[MES5 integer (in)]]></xhtml:p> <xhtml:p><![CDATA[MES5 integer (in)]]></xhtml:p>
</documentation> </documentation>
</variable> </variable>
<variable name="mes5_int_counter_out" address="%QL2.2"> <variable name="MES5_int_counter_out" address="%QL2.2">
<type> <type>
<LINT/> <LINT/>
</type> </type>
......
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