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

Rename variables to keep conventions.

parent 67441a7c
<?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">
<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>
<fbd>
<scaling x="0" y="0"/>
......@@ -149,22 +149,22 @@
<INT/>
</type>
</variable>
<variable name="OpticalShape">
<variable name="OI_sensor_counter">
<type>
<LREAL/>
</type>
</variable>
<variable name="Relay0">
<variable name="VFD_relay0">
<type>
<DINT/>
</type>
</variable>
<variable name="Relay1">
<variable name="Air_Valve_Relay0">
<type>
<DINT/>
</type>
</variable>
<variable name="mes5_int_counter_in">
<variable name="MES5_int_counter_in">
<type>
<LINT/>
</type>
......@@ -172,7 +172,7 @@
<xhtml:p><![CDATA[MES5 counter (read only)]]></xhtml:p>
</documentation>
</variable>
<variable name="mes5_int_counter_out">
<variable name="MES5_int_counter_out">
<type>
<LINT/>
</type>
......@@ -184,22 +184,22 @@
</interface>
<body>
<ST>
<xhtml:p><![CDATA[(* this will always switch on relay0 which controls conveyor line*)
Relay0 := 1;
<xhtml:p><![CDATA[(* this will always switch on VFD_relay0 which controls conveyor line*)
VFD_relay0 := 1;
IF OpticalShape=2.0 THEN
IF OI_sensor_counter=2.0 THEN
(* 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
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 *)
mes5_int_counter_out := mes5_int_counter_in;
MES5_int_counter_out := MES5_int_counter_in;
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 *)
Relay1 := 0;
Air_Valve_Relay0 := 0;
END_IF;
]]></xhtml:p>
......@@ -225,7 +225,7 @@ END_IF;
<simpleValue value="0"/>
</initialValue>
</variable>
<variable name="OpticalShape" address="%IL1.2">
<variable name="OI_sensor_counter" address="%IL1.2">
<type>
<LREAL/>
</type>
......@@ -233,15 +233,15 @@ END_IF;
<xhtml:p><![CDATA[OPC UA optical shape sensor]]></xhtml:p>
</documentation>
</variable>
<variable name="Relay0" address="%QD0.0">
<variable name="VFD_relay0" address="%QD0.0">
<type>
<DINT/>
</type>
<documentation>
<xhtml:p><![CDATA[relay 0 (drive motor)]]></xhtml:p>
<xhtml:p><![CDATA[VFD relay 0 (drive motor)]]></xhtml:p>
</documentation>
</variable>
<variable name="Relay1" address="%QD0.1">
<variable name="Air_Valve_Relay0" address="%QD0.1">
<type>
<DINT/>
</type>
......@@ -249,7 +249,7 @@ END_IF;
<xhtml:p><![CDATA[relay 0 (air valve)]]></xhtml:p>
</documentation>
</variable>
<variable name="mes5_int_counter_in" address="%IL2.2">
<variable name="MES5_int_counter_in" address="%IL2.2">
<type>
<LINT/>
</type>
......@@ -257,7 +257,7 @@ END_IF;
<xhtml:p><![CDATA[MES5 integer (in)]]></xhtml:p>
</documentation>
</variable>
<variable name="mes5_int_counter_out" address="%QL2.2">
<variable name="MES5_int_counter_out" address="%QL2.2">
<type>
<LINT/>
</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