Commit 0a602d04 authored by Ivan Tyagov's avatar Ivan Tyagov

Integrate line example with MES5.

parent 8894d341
<?xml version='1.0' encoding='utf-8'?>
<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="2" Name="opcua_2"/>
<?xml version='1.0' encoding='utf-8'?>
<OPCUAClient xmlns:xsd="http://www.w3.org/2001/XMLSchema" Server_URI="opc.tcp://192.168.0.118:4841"/>
input,erp5-variable-integer,2,int,2,Int64,2
output,erp5-variable-integer,2,int,2,Int64,2
<?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-07-12T15:09:32">
<contentHeader name="Counter (OSIE)" modificationDateTime="2023-09-12T15:40:45">
<coordinateInfo>
<fbd>
<scaling x="0" y="0"/>
......@@ -164,6 +164,22 @@
<DINT/>
</type>
</variable>
<variable name="mes5_int_counter_in">
<type>
<LINT/>
</type>
<documentation>
<xhtml:p><![CDATA[MES5 counter (read only)]]></xhtml:p>
</documentation>
</variable>
<variable name="mes5_int_counter_out">
<type>
<LINT/>
</type>
<documentation>
<xhtml:p><![CDATA[MES5 counter (write only)]]></xhtml:p>
</documentation>
</variable>
</externalVars>
</interface>
<body>
......@@ -174,6 +190,11 @@ Relay0 := 1;
IF OpticalShape=2.0 THEN
(* a rectangle was recognized thus switch ON air valve *)
Relay1 := 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;
(* set to MES5 the counter value so it is kept permanently *)
mes5_int_counter_out := mes5_int_counter_in;
END_IF;
IF OpticalShape=0.0 OR OpticalShape=1.0 OR OpticalShape=3.0 THEN
......@@ -228,6 +249,22 @@ END_IF;
<xhtml:p><![CDATA[relay 0 (air valve)]]></xhtml:p>
</documentation>
</variable>
<variable name="mes5_int_counter_in" address="%IL2.2">
<type>
<LINT/>
</type>
<documentation>
<xhtml:p><![CDATA[MES5 integer (in)]]></xhtml:p>
</documentation>
</variable>
<variable name="mes5_int_counter_out" address="%QL2.2">
<type>
<LINT/>
</type>
<documentation>
<xhtml:p><![CDATA[MES5 integer (out)]]></xhtml:p>
</documentation>
</variable>
</globalVars>
</configuration>
</configurations>
......
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