Skip to content

Commit e10578a

Browse files
committed
mdlinter -fixes
1 parent d0eadb4 commit e10578a

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
# PLCopen Snippets
1+
# PLCopen Snippets
22

33
The following block-template snippets for AX Code are based on the
44
PLCopen-like standard **'Function Blocks for Motion Control' V2.0** which can also be found in the LGF library for TIA Portal [here](https://support.industry.siemens.com/cs/ww/en/view/109479728).
55

66
This collection consists of 6x PLCopen FB code-snippets (3x "Execute"-variants / 3x "Enable"-variants) plus 2x complementary structured-types. We also added 4x basic FC's and 4x basic FB's variants inspired by PLCopen, which in addition should emphasise you to build more predictable blocks(interfaces) with standardized execution behaviours.
77
These vscode snippets gives you a head-start in content creation for your very own SIMATIC AX library or application.
88

9-
## About: PLCopen ##
9+
## About: PLCopen
10+
1011
*"The PLCopen organization has defined a standard for Motion Control blocks. This standard can be generalized in that way, that it can be applied to all asynchronous blocks. Asynchronous means in this context, that the execution of the function inside the block extends over multiple (more than one) execution cycles of the PLC, e.g. for communication, closed loop control or motion control applications."*
1112
<br/>
1213
<br/>
1314

14-
### A function block with an **"enable"** - behaviour: ###
15+
### A function block with an **"enable"** - behaviour
16+
1517
*"Blocks which are started and initialized only once and afterwards remain in operation to respond to inputs have an "enable" input parameter.
1618
Example: A communication block (acting as server) waits after initialization for incoming connection requests from a client. After a successful data exchange the server waits for other incoming connection requests.
1719
Setting the parameter "enable" starts the execution of an asynchronous task. If "enable" remains set, the task execution remains active and new values are being accepted and processed.
18-
Resetting the parameter "enable" will shut down the working state of the block."*
20+
Resetting the parameter "enable" will shut down the working state of the block."*
1921
.. read [more](https://support.industry.siemens.com/cs/ww/en/view/109479728)
2022
> #continuous-asynchronous #enable
2123
2224
<br/>
2325

26+
### A function block with an **"execute"** - behaviour
2427

25-
### A function block with an **"execute"** - behaviour:
2628
*"Blocks, which get executed only once have an input parameter "execute".
2729
Example: A communication block (client) requests data of a server only once. This is triggered by an edge at the input signal "execute". After the processing the reply the execution is done. A new request is placed by another edge on "execute". A rising edge on "execute" starts the task and the values at the input parameters are applied.
2830
Any changes to the values after the start of the task only take effect after a start of a new task, unless "continuousUpdate" is being used.
@@ -33,7 +35,7 @@ The reset of the parameter "execute" does no stop the execution of the current t
3335
<br/>
3436
<br/>
3537

36-
# Install the snippets collection
38+
## Install the snippets collection
3739

3840
Before installing the snippets collection, the URL to the package registry need to be defined in the apax.yml
3941

@@ -48,14 +50,15 @@ Install the snippets collection to your workspace by entering the following comm
4850
apax add @simatic-ax/plcopen-snippets --dev
4951
```
5052

51-
> - For installing this package you need to login into the GitHub registry. You'll find more information [here](https://github.com/simatic-ax/.sharedstuff/blob/main/doc/personalaccesstoken.md).
53+
> - For installing this package you need to login into the GitHub registry. You'll find more information [here](https://github.com/simatic-ax/.sharedstuff/blob/main/doc/personalaccesstoken.md).
5254
> - Installing snippet-packages to your project / ax code-instance may cause you to restart the IDE in order to make them work for the intellicense.
5355
5456
<br/>
5557
<br/>
5658

5759
## Use PLCopen block templates
58-
You can use the intellicense in the scope of a .st file to make use of the snippets. <br>
60+
61+
You can use the intellicense in the scope of a .st file to make use of the snippets. <br>
5962
Just start typing-in the following available variants:
6063

6164
```json
@@ -81,6 +84,7 @@ Complementary plc-types: <br>
8184
```json
8285
"type, plcopen," : ["FbStates enum"]
8386
```
87+
8488
These types can be used to complete a clean block & type plcopen construct. After insertion you easily can change the name and it's type-references in the block-templates by
8589

8690
<details close>
@@ -94,7 +98,8 @@ These types can be used to complete a clean block & type plcopen construct. Afte
9498
<br/>
9599

96100
## Use general block templates
97-
You can use the intellicense in the scope of a .st file to make use of the snippets. <br>
101+
102+
You can use the intellicense in the scope of a .st file to make use of the snippets. <br>
98103
Just start typing-in the following available variants:
99104

100105
```json
@@ -121,23 +126,24 @@ Differences: <br>
121126
<br/>
122127
<br/>
123128

124-
# Notes from the developer
129+
## Notes from the developer
130+
131+
BEWARE !
125132

126-
BEWARE !
127133
- This package currently has no ST OOP content
128134
- This package only ships .json vs-code snippet files that work for .st files
129135
- The code-snippets follow our [SIMATIC AX style-guide](https://console.simatic-ax.siemens.io/docs/st-styleguide) for ST-programming
130136
- The snippets may or may not include TIAX restrictions, which unfortunatly cause unwanted transformations or compile errors using it blank in "AX2TIA" library-projects, that used to be converted to TIA Portal. Please always check back the latest [news](https://console.simatic-ax.siemens.io/docs/ax2tia/restrictions) on these restrictions. There are no workarounds implemented.
131137
<br>
132138

133-
Happy coding ...
139+
Happy coding ...
134140

135141
🐱‍💻 BEEP, BOOP, BEEP, BEEP, BOOP 🐱‍🏍
136142

137143
<br/>
138144
<br/>
139145

140-
# Contribution
146+
## Contribution
141147

142148
Thanks for your interest in contributing. Anybody is free to report bugs, improvements, 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". The CODEOWNERS will take care.
143149

0 commit comments

Comments
 (0)