Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
osie
Commits
19e243dd
Commit
19e243dd
authored
Sep 12, 2023
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename variables to keep conventions.
parent
67441a7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
Beremiz/beremiz_oi_sensor_tutorial/plc.xml
Beremiz/beremiz_oi_sensor_tutorial/plc.xml
+20
-20
No files found.
Beremiz/beremiz_oi_sensor_tutorial/plc.xml
View file @
19e243dd
<?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-12T1
5:58:31
"
>
<contentHeader
name=
"Counter (OSIE)"
modificationDateTime=
"2023-09-12T1
6: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=
"O
pticalShape
"
>
<variable
name=
"O
I_sensor_counter
"
>
<type>
<type>
<LREAL/>
<LREAL/>
</type>
</type>
</variable>
</variable>
<variable
name=
"
R
elay0"
>
<variable
name=
"
VFD_r
elay0"
>
<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=
"
mes
5_int_counter_in"
>
<variable
name=
"
MES
5_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=
"
mes
5_int_counter_out"
>
<variable
name=
"
MES
5_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*)
R
elay0 := 1;
VFD_r
elay0 := 1;
IF O
pticalShape
=2.0 THEN
IF O
I_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 := mes
5_int_counter_in + 1;
MES5_int_counter_in := MES
5_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 := mes
5_int_counter_in;
MES5_int_counter_out := MES
5_int_counter_in;
END_IF;
END_IF;
IF O
pticalShape=0.0 OR OpticalShape=1.0 OR OpticalShape
=3.0 THEN
IF O
I_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=
"O
pticalShape
"
address=
"%IL1.2"
>
<variable
name=
"O
I_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=
"
R
elay0"
address=
"%QD0.0"
>
<variable
name=
"
VFD_r
elay0"
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=
"
mes
5_int_counter_in"
address=
"%IL2.2"
>
<variable
name=
"
MES
5_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=
"
mes
5_int_counter_out"
address=
"%QL2.2"
>
<variable
name=
"
MES
5_int_counter_out"
address=
"%QL2.2"
>
<type>
<type>
<LINT/>
<LINT/>
</type>
</type>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment