Skip to content

Commit 2ca05c4

Browse files
committed
Realese V0.0.13
1 parent ce43825 commit 2ca05c4

File tree

9 files changed

+35
-124
lines changed

9 files changed

+35
-124
lines changed

README.md

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -150,62 +150,14 @@ Output example:
150150

151151
![io](doc/img/io_snippet.gif)
152152

153-
## PLCopen interface
154-
155-
```json
156-
"prefix" : ["plcopen enable"]
157-
```
158-
159-
Output:
160-
```
161-
FUNCTION_BLOCK sample
162-
VAR_INPUT
163-
enable : BOOL;
164-
END_VAR
165-
166-
VAR_OUTPUT
167-
busy : BOOL;
168-
valid : BOOL;
169-
error : BOOL;
170-
END_VAR
171-
172-
VAR
173-
END_VAR
174-
175-
VAR_TEMP
176-
END_VAR
177-
178-
;
179-
180-
END_FUNCTION_BLOCK
181-
```
182-
153+
## Iterate ARRAY[*] Snippet
183154
```json
184-
"prefix" : ["plcopen execute"]
155+
"prefix" : ["Iterate Array*"]
185156
```
157+
Output example:
186158

187-
```
188-
FUNCTION_BLOCK sample
189-
VAR_INPUT
190-
execute : BOOL;
191-
END_VAR
192-
193-
VAR_OUTPUT
194-
busy : BOOL;
195-
error : BOOL;
196-
done : BOOL;
197-
END_VAR
198-
199-
VAR
200-
END_VAR
201-
202-
VAR_TEMP
203-
END_VAR
159+
![io](doc/img//iterate_array_star.gif)
204160

205-
;
206-
207-
END_FUNCTION_BLOCK
208-
```
209161

210162
## Contribution
211163
Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.

apax.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: '@simatic-ax/snippetscollection'
2-
version: 0.0.12
2+
version: 0.0.13
33
author: Siemens AG
44
type: generic
55
variables:

changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@
77
- classMethodSupport.json: The final cursor position has been changed to be in the newly created section and not after it. Furthermore, the line comment for the return value has been modified to be a real return structure.
88
- classTemplate.json: There was a mistake (missing brakets) on line 14
99
- enum.json: The generic colour example has been changed to a real snippet with tab-able options
10-
- varSectionsSupport.json: The final cursor position has been changed to be in the newly created section and not after it.
10+
- varSectionsSupport.json: The final cursor position has been changed to be in the newly created section and not after it.
11+
12+
2022-06-21 Version 0.0.13
13+
- Add snippet for iterate ARRAY[*]
14+
- Remove unused PlcOpen snippets
15+

doc/cover.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

doc/img/iterate_array_star.gif

60.5 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"ClassTemplate": {
3+
"scope": "javascript,typescript,st",
4+
"prefix": ["Iterate Array *"],
5+
"body": [
6+
"VAR_TEMP",
7+
"\tlb, ub, i : DINT;",
8+
"END_VAR",
9+
"lb := LOWER_BOUND($1, 1);",
10+
"ub := UPPER_BOUND($1, 1);",
11+
"",
12+
"FOR i := lb TO ub DO",
13+
"\t$0;",
14+
"END_FOR;"
15+
],
16+
"description": "Creates a template of a class including namespace"
17+
}
18+
}

snippets/fb-plcopen-enable.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

snippets/fb-plcopen-execute.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/sample.st

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
NAMESPACE Siemens.Ax
1+
NAMESPACE Simatic.Ax
22
CLASS sample
3-
VAR PUBLIC
4-
5-
END_VAR
6-
VAR PROTECTED
7-
dummy : BOOL;
8-
END_VAR
9-
3+
104
METHOD PUBLIC MyMethod
5+
VAR_INPUT
6+
arr : ARRAY[*] OF INT;
7+
END_VAR
8+
119
;
1210
END_METHOD
1311
END_CLASS

0 commit comments

Comments
 (0)