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'?>
<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=
"2024-05-22T13:47:43
"
>
<contentHeader
name=
"
OILine"
modificationDateTime=
"2024-06-18T16:11:18
"
>
<coordinateInfo>
<fbd>
<scaling
x=
"0"
y=
"0"
/>
...
...
@@ -41,7 +41,7 @@
<localVars>
<variable
name=
"CounterST0"
>
<type>
<derived
name=
"
Counter
ST"
/>
<derived
name=
"
OILine
ST"
/>
</type>
</variable>
</localVars>
...
...
@@ -51,10 +51,10 @@
<comment
localId=
"1"
height=
"143"
width=
"201"
>
<position
x=
"566"
y=
"75"
/>
<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>
</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"
/>
<inputVariables>
<variable
formalParameter=
"Reset"
>
...
...
@@ -119,15 +119,8 @@
</FBD>
</body>
</pou>
<pou
name=
"
Counter
ST"
pouType=
"functionBlock"
>
<pou
name=
"
OILine
ST"
pouType=
"functionBlock"
>
<interface>
<inputVars>
<variable
name=
"Reset"
>
<type>
<BOOL/>
</type>
</variable>
</inputVars>
<outputVars>
<variable
name=
"Out1"
>
<type>
...
...
@@ -141,29 +134,41 @@
</variable>
</outputVars>
<localVars>
<variable
name=
"
Cnt0
"
>
<variable
name=
"
tick_counter
"
>
<type>
<INT/>
</type>
<initialValue>
<simpleValue
value=
"0"
/>
</initialValue>
<documentation>
<xhtml:p>
<![CDATA[Cycles counter]]>
</xhtml:p>
</documentation>
</variable>
</localVars>
<externalVars>
<variable
name=
"ResetCounterValue"
>
<variable
name=
"oi_counter"
>
<type>
<INT/>
</type>
<initialValue>
<simpleValue
value=
"0"
/>
</initialValue>
<documentation>
<xhtml:p>
<![CDATA[Cycles counter]]>
</xhtml:p>
</documentation>
</variable>
<variable
name=
"OI_sensor_counter"
>
</localVars>
<externalVars>
<variable
name=
"OI_sensor_shape"
>
<type>
<LREAL/>
</type>
</variable>
<variable
name=
"
VFD
_relay0"
>
<variable
name=
"
Conveyor
_relay0"
>
<type>
<DINT/>
</type>
</variable>
<variable
name=
"
Air_Valve_Relay0
"
>
<variable
name=
"
Separator_relay1
"
>
<type>
<DINT/>
</type>
...
...
@@ -172,20 +177,21 @@
</interface>
<body>
<ST>
<xhtml:p>
<![CDATA[(* this will always switch on
VFD
_relay0 which controls conveyor line*)
VFD
_relay0 := 1;
<xhtml:p>
<![CDATA[(* this will always switch on
Conveyor
_relay0 which controls conveyor line*)
Conveyor
_relay0 := 1;
IF OI_sensor_counter=3.0 THEN
(* a circle was recognized thus switch ON air valve *)
Air_Valve_Relay0 := 1;
END_IF;
(* measure ticks of the PLC program *)
tick_counter := tick_counter + 1;
IF
OI_sensor_counter=0.0 OR OI_sensor_counter=1.0 OR OI_sensor_counter=2
.0 THEN
(* a rectange / triangle or nothing was recognized thus switch OFF air valve
*)
Air_Valve_Relay0 := 0
;
IF
OI_sensor_shape=3
.0 THEN
(* a circle was recognized thus switch ON selector
*)
Separator_relay1 := 1
;
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>
</body>
</pou>
...
...
@@ -195,20 +201,12 @@ END_IF;
<configurations>
<configuration
name=
"config"
>
<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"
/>
</task>
</resource>
<globalVars>
<variable
name=
"ResetCounterValue"
>
<type>
<INT/>
</type>
<initialValue>
<simpleValue
value=
"0"
/>
</initialValue>
</variable>
<variable
name=
"OI_sensor_counter"
address=
"%IL1.2"
>
<variable
name=
"OI_sensor_shape"
address=
"%IL1.2"
>
<type>
<LREAL/>
</type>
...
...
@@ -216,20 +214,20 @@ END_IF;
<xhtml:p>
<![CDATA[OPC UA optical shape sensor]]>
</xhtml:p>
</documentation>
</variable>
<variable
name=
"
VFD
_relay0"
address=
"%QD0.0"
>
<variable
name=
"
Conveyor
_relay0"
address=
"%QD0.0"
>
<type>
<DINT/>
</type>
<documentation>
<xhtml:p>
<![CDATA[
VFD relay 0 (
drive motor)]]>
</xhtml:p>
<xhtml:p>
<![CDATA[
relay 0 (conveyor
drive motor)]]>
</xhtml:p>
</documentation>
</variable>
<variable
name=
"
Air_Valve_Relay0
"
address=
"%QD0.1"
>
<variable
name=
"
Separator_relay1
"
address=
"%QD0.1"
>
<type>
<DINT/>
</type>
<documentation>
<xhtml:p>
<![CDATA[relay
0 (air valve
)]]>
</xhtml:p>
<xhtml:p>
<![CDATA[relay
1 (separator
)]]>
</xhtml:p>
</documentation>
</variable>
</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