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
d71bc41b
Commit
d71bc41b
authored
Jun 07, 2021
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First POC of interation between cherry-picker and Beremiz.
parent
58d6046f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
30 deletions
+18
-30
Beremiz/beremiz_ivan_tutorial/build/POUS.c
Beremiz/beremiz_ivan_tutorial/build/POUS.c
+4
-7
Beremiz/beremiz_ivan_tutorial/build/beremiz_ivan_tutorial.so
Beremiz/beremiz_ivan_tutorial/build/beremiz_ivan_tutorial.so
+0
-0
Beremiz/beremiz_ivan_tutorial/build/generated_plc.st
Beremiz/beremiz_ivan_tutorial/build/generated_plc.st
+4
-7
Beremiz/beremiz_ivan_tutorial/build/lastbuildPLC.md5
Beremiz/beremiz_ivan_tutorial/build/lastbuildPLC.md5
+1
-1
Beremiz/beremiz_ivan_tutorial/build/plc.st
Beremiz/beremiz_ivan_tutorial/build/plc.st
+4
-7
Beremiz/beremiz_ivan_tutorial/build/resource1.o
Beremiz/beremiz_ivan_tutorial/build/resource1.o
+0
-0
Beremiz/beremiz_ivan_tutorial/plc.xml
Beremiz/beremiz_ivan_tutorial/plc.xml
+5
-8
No files found.
Beremiz/beremiz_ivan_tutorial/build/POUS.c
View file @
d71bc41b
...
...
@@ -234,18 +234,15 @@ void COUNTERST_body__(COUNTERST *data__) {
}
else
{
__SET_VAR
(
data__
->
,
CNT0
,,(
__GET_VAR
(
data__
->
CNT0
,)
+
1
));
__SET_VAR
(
data__
->
,
CNT1
,,(
__GET_VAR
(
data__
->
CNT1
,)
+
1
));
if
((
__GET_VAR
(
data__
->
CNT1
,)
>
100
))
{
__SET_EXTERNAL
(
data__
->
,
RELAY0VALUE
,,
__BOOL_LITERAL
(
FALS
E
));
if
((
__GET_VAR
(
data__
->
CNT1
,)
>
5
))
{
__SET_EXTERNAL
(
data__
->
,
RELAY0VALUE
,,
__BOOL_LITERAL
(
TRU
E
));
__SET_EXTERNAL
(
data__
->
,
RELAY1VALUE
,,
__BOOL_LITERAL
(
TRUE
));
__SET_EXTERNAL
(
data__
->
,
RELAY2VALUE
,,
__BOOL_LITERAL
(
FALSE
));
__SET_EXTERNAL
(
data__
->
,
RELAY3VALUE
,,
__BOOL_LITERAL
(
TRUE
));
}
else
{
__SET_EXTERNAL
(
data__
->
,
RELAY0VALUE
,,
__BOOL_LITERAL
(
TRUE
));
__SET_EXTERNAL
(
data__
->
,
RELAY1VALUE
,,
__BOOL_LITERAL
(
FALSE
));
__SET_EXTERNAL
(
data__
->
,
RELAY2VALUE
,,
__BOOL_LITERAL
(
TRUE
));
__SET_EXTERNAL
(
data__
->
,
RELAY3VALUE
,,
__BOOL_LITERAL
(
FALSE
));
};
if
((
__GET_VAR
(
data__
->
CNT1
,)
>
200
))
{
if
((
__GET_VAR
(
data__
->
CNT1
,)
>
7
))
{
__SET_EXTERNAL
(
data__
->
,
RELAY1VALUE
,,
__BOOL_LITERAL
(
FALSE
));
__SET_VAR
(
data__
->
,
CNT1
,,
0
);
};
};
...
...
Beremiz/beremiz_ivan_tutorial/build/beremiz_ivan_tutorial.so
View file @
d71bc41b
No preview for this file type
Beremiz/beremiz_ivan_tutorial/build/generated_plc.st
View file @
d71bc41b
...
...
@@ -25,19 +25,16 @@ FUNCTION_BLOCK CounterST
ELSE
Cnt0
:=
Cnt0
+
1
;
Cnt1
:=
Cnt1
+
1
;
IF
Cnt1
>
100
THEN
Relay0Value
:=
Fals
e
;
IF
Cnt1
>
5
THEN
Relay0Value
:=
Tru
e
;
Relay1Value
:=
True
;
Relay2Value
:=
False
;
Relay3Value
:=
True
;
ELSE
Relay0Value
:=
True
;
Relay1Value
:=
False
;
Relay2Value
:=
True
;
Relay3Value
:=
False
;
END_IF
;
IF
Cnt1>
200
THEN
IF
Cnt1
>
7
THEN
Relay1Value
:=
False
;
Cnt1
:=
0
;
END_IF
;
...
...
Beremiz/beremiz_ivan_tutorial/build/lastbuildPLC.md5
View file @
d71bc41b
8d1d2897b64bed41c973dabc5b27e597
\ No newline at end of file
6e1af784c3e7b7bca21bc2147e065019
\ No newline at end of file
Beremiz/beremiz_ivan_tutorial/build/plc.st
View file @
d71bc41b
...
...
@@ -119,19 +119,16 @@ FUNCTION_BLOCK CounterST
ELSE
Cnt0
:=
Cnt0
+
1
;
Cnt1
:=
Cnt1
+
1
;
IF
Cnt1
>
100
THEN
Relay0Value
:=
Fals
e
;
IF
Cnt1
>
5
THEN
Relay0Value
:=
Tru
e
;
Relay1Value
:=
True
;
Relay2Value
:=
False
;
Relay3Value
:=
True
;
ELSE
Relay0Value
:=
True
;
Relay1Value
:=
False
;
Relay2Value
:=
True
;
Relay3Value
:=
False
;
END_IF
;
IF
Cnt1>
200
THEN
IF
Cnt1
>
7
THEN
Relay1Value
:=
False
;
Cnt1
:=
0
;
END_IF
;
...
...
Beremiz/beremiz_ivan_tutorial/build/resource1.o
View file @
d71bc41b
No preview for this file type
Beremiz/beremiz_ivan_tutorial/plc.xml
View file @
d71bc41b
<?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=
"2021-06-0
1T14:05:5
8"
>
<contentHeader
name=
"Counter (OSIE)"
modificationDateTime=
"2021-06-0
3T16:47:1
8"
>
<coordinateInfo>
<fbd>
<scaling
x=
"0"
y=
"0"
/>
...
...
@@ -185,19 +185,16 @@
ELSE
Cnt0 := Cnt0 + 1;
Cnt1 := Cnt1 + 1;
IF Cnt1 >
10
0
THEN
Relay0Value :=
Fals
e;
IF Cnt1 >
10 THEN
Relay0Value :=
Tru
e;
Relay1Value := True;
Relay2Value := False;
Relay3Value := True;
ELSE
Relay0Value := True;
Relay1Value := False;
Relay2Value := True;
Relay3Value := False;
END_IF;
IF Cnt1>200 THEN
IF Cnt1 > 15 THEN
Relay1Value := False;
Cnt1 :=0;
END_IF;
...
...
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