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
1
Merge Requests
1
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
nexedi
osie
Commits
4671b69a
Commit
4671b69a
authored
Jun 19, 2024
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Plain Diff
Increase cycle time from 50 -> 100ms (conveyor is way slow anyway).
See merge request
!56
parents
be700458
845c4a4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
43 deletions
+41
-43
Beremiz/beremiz_oi_production_line/plc.xml
Beremiz/beremiz_oi_production_line/plc.xml
+41
-43
No files found.
Beremiz/beremiz_oi_production_line/plc.xml
View file @
4671b69a
<?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:47:43
"
>
<contentHeader
name=
"
OILine"
modificationDateTime=
"2024-06-18T16:11:18
"
>
<coordinateInfo>
<coordinateInfo>
<fbd>
<fbd>
<scaling
x=
"0"
y=
"0"
/>
<scaling
x=
"0"
y=
"0"
/>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<localVars>
<localVars>
<variable
name=
"CounterST0"
>
<variable
name=
"CounterST0"
>
<type>
<type>
<derived
name=
"
Counter
ST"
/>
<derived
name=
"
OILine
ST"
/>
</type>
</type>
</variable>
</variable>
</localVars>
</localVars>
...
@@ -51,10 +51,10 @@
...
@@ -51,10 +51,10 @@
<comment
localId=
"1"
height=
"143"
width=
"201"
>
<comment
localId=
"1"
height=
"143"
width=
"201"
>
<position
x=
"566"
y=
"75"
/>
<position
x=
"566"
y=
"75"
/>
<content>
<content>
<xhtml:p>
<![CDATA[This PLC controls a real production line which can select objects by shape and
blow them off
the line.]]>
</xhtml:p>
<xhtml:p>
<![CDATA[This PLC controls a real production line which can select objects by shape and
separate them on
the line.]]>
</xhtml:p>
</content>
</content>
</comment>
</comment>
<block
localId=
"2"
typeName=
"
Counter
ST"
instanceName=
"CounterST0"
executionOrderId=
"0"
height=
"109"
width=
"99"
>
<block
localId=
"2"
typeName=
"
OILine
ST"
instanceName=
"CounterST0"
executionOrderId=
"0"
height=
"109"
width=
"99"
>
<position
x=
"288"
y=
"192"
/>
<position
x=
"288"
y=
"192"
/>
<inputVariables>
<inputVariables>
<variable
formalParameter=
"Reset"
>
<variable
formalParameter=
"Reset"
>
...
@@ -119,15 +119,8 @@
...
@@ -119,15 +119,8 @@
</FBD>
</FBD>
</body>
</body>
</pou>
</pou>
<pou
name=
"
Counter
ST"
pouType=
"functionBlock"
>
<pou
name=
"
OILine
ST"
pouType=
"functionBlock"
>
<interface>
<interface>
<inputVars>
<variable
name=
"Reset"
>
<type>
<BOOL/>
</type>
</variable>
</inputVars>
<outputVars>
<outputVars>
<variable
name=
"Out1"
>
<variable
name=
"Out1"
>
<type>
<type>
...
@@ -141,29 +134,41 @@
...
@@ -141,29 +134,41 @@
</variable>
</variable>
</outputVars>
</outputVars>
<localVars>
<localVars>
<variable
name=
"
Cnt0
"
>
<variable
name=
"
tick_counter
"
>
<type>
<type>
<INT/>
<INT/>
</type>
</type>
<initialValue>
<simpleValue
value=
"0"
/>
</initialValue>
<documentation>
<xhtml:p>
<![CDATA[Cycles counter]]>
</xhtml:p>
</documentation>
</variable>
</variable>
</localVars>
<variable
name=
"oi_counter"
>
<externalVars>
<variable
name=
"ResetCounterValue"
>
<type>
<type>
<INT/>
<INT/>
</type>
</type>
<initialValue>
<simpleValue
value=
"0"
/>
</initialValue>
<documentation>
<xhtml:p>
<![CDATA[Cycles counter]]>
</xhtml:p>
</documentation>
</variable>
</variable>
<variable
name=
"OI_sensor_counter"
>
</localVars>
<externalVars>
<variable
name=
"OI_sensor_shape"
>
<type>
<type>
<LREAL/>
<LREAL/>
</type>
</type>
</variable>
</variable>
<variable
name=
"
VFD
_relay0"
>
<variable
name=
"
Conveyor
_relay0"
>
<type>
<type>
<DINT/>
<DINT/>
</type>
</type>
</variable>
</variable>
<variable
name=
"
Air_Valve_Relay0
"
>
<variable
name=
"
Separator_relay1
"
>
<type>
<type>
<DINT/>
<DINT/>
</type>
</type>
...
@@ -172,20 +177,21 @@
...
@@ -172,20 +177,21 @@
</interface>
</interface>
<body>
<body>
<ST>
<ST>
<xhtml:p>
<![CDATA[(* this will always switch on
VFD
_relay0 which controls conveyor line*)
<xhtml:p>
<![CDATA[(* this will always switch on
Conveyor
_relay0 which controls conveyor line*)
VFD
_relay0 := 1;
Conveyor
_relay0 := 1;
IF OI_sensor_counter=3.0 THEN
(* measure ticks of the PLC program *)
(* a circle was recognized thus switch ON air valve *)
tick_counter := tick_counter + 1;
Air_Valve_Relay0 := 1;
END_IF;
IF
OI_sensor_counter=0.0 OR OI_sensor_counter=1.0 OR OI_sensor_counter=2
.0 THEN
IF
OI_sensor_shape=3
.0 THEN
(* a rectange / triangle or nothing was recognized thus switch OFF air valve
*)
(* a circle was recognized thus switch ON selector
*)
Air_Valve_Relay0 := 0
;
Separator_relay1 := 1
;
END_IF;
END_IF;
]]>
</xhtml:p>
IF OI_sensor_shape=0.0 OR OI_sensor_shape=1.0 OR OI_sensor_shape=2.0 THEN
(* a rectange / triangle or nothing was recognized thus switch OFF selector *)
Separator_relay1 := 0;
END_IF;]]>
</xhtml:p>
</ST>
</ST>
</body>
</body>
</pou>
</pou>
...
@@ -195,20 +201,12 @@ END_IF;
...
@@ -195,20 +201,12 @@ END_IF;
<configurations>
<configurations>
<configuration
name=
"config"
>
<configuration
name=
"config"
>
<resource
name=
"resource1"
>
<resource
name=
"resource1"
>
<task
name=
"task0"
priority=
"0"
interval=
"T#
5
0ms"
>
<task
name=
"task0"
priority=
"0"
interval=
"T#
2
0ms"
>
<pouInstance
name=
"instance0"
typeName=
"plc_prg"
/>
<pouInstance
name=
"instance0"
typeName=
"plc_prg"
/>
</task>
</task>
</resource>
</resource>
<globalVars>
<globalVars>
<variable
name=
"ResetCounterValue"
>
<variable
name=
"OI_sensor_shape"
address=
"%IL1.2"
>
<type>
<INT/>
</type>
<initialValue>
<simpleValue
value=
"0"
/>
</initialValue>
</variable>
<variable
name=
"OI_sensor_counter"
address=
"%IL1.2"
>
<type>
<type>
<LREAL/>
<LREAL/>
</type>
</type>
...
@@ -216,20 +214,20 @@ END_IF;
...
@@ -216,20 +214,20 @@ 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=
"
VFD
_relay0"
address=
"%QD0.0"
>
<variable
name=
"
Conveyor
_relay0"
address=
"%QD0.0"
>
<type>
<type>
<DINT/>
<DINT/>
</type>
</type>
<documentation>
<documentation>
<xhtml:p>
<![CDATA[
VFD relay 0 (
drive motor)]]>
</xhtml:p>
<xhtml:p>
<![CDATA[
relay 0 (conveyor
drive motor)]]>
</xhtml:p>
</documentation>
</documentation>
</variable>
</variable>
<variable
name=
"
Air_Valve_Relay0
"
address=
"%QD0.1"
>
<variable
name=
"
Separator_relay1
"
address=
"%QD0.1"
>
<type>
<type>
<DINT/>
<DINT/>
</type>
</type>
<documentation>
<documentation>
<xhtml:p>
<![CDATA[relay
0 (air valve
)]]>
</xhtml:p>
<xhtml:p>
<![CDATA[relay
1 (separator
)]]>
</xhtml:p>
</documentation>
</documentation>
</variable>
</variable>
</globalVars>
</globalVars>
...
...
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