ads-client 2.0.0-beta.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -2
- package/README.md +777 -896
- package/dist/ads-client.d.ts +18 -4
- package/dist/ads-client.js +63 -34
- package/dist/ads-client.js.map +1 -1
- package/dist/ads-commons.d.ts +7 -6
- package/dist/ads-commons.js +3 -2
- package/dist/ads-commons.js.map +1 -1
- package/dist/types/ads-protocol-types.d.ts +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,38 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [2.0.0
|
|
8
|
-
|
|
7
|
+
## [2.0.0] - 14.12.2024
|
|
8
|
+
**IMPORTANT:** This is a major version update. There are lots of **breaking changes**!
|
|
9
|
+
|
|
10
|
+
<u>**Updating v1 -> v2 requires manual changes to your codebase!**</u>
|
|
11
|
+
|
|
12
|
+
See [MIGRATION.md](MIGRATION.md) for all breaking changes and follow the instructions.
|
|
13
|
+
|
|
14
|
+
### Special thanks
|
|
15
|
+
- Special thanks to [Christian Rishøj](https://github.com/crishoj) for valuable contribution!
|
|
16
|
+
|
|
17
|
+
### Changes
|
|
18
|
+
- Everything rewritten in TypeScript
|
|
19
|
+
- Everything is tested before releasing
|
|
20
|
+
- Lots of optimizations
|
|
21
|
+
- Lots of name changes
|
|
22
|
+
- New methods: `resetPlc()`, `readWriteRawMulti()`, `writeRawByPath()`, `readValueBySymbol()`, `writeValueBySymbol()`
|
|
23
|
+
- New setting `disableCaching`: disables all symbol and data type caching
|
|
24
|
+
- Added optional `targetOpts` argument in **all methods**
|
|
25
|
+
- Possible to provide different target address (AmsNetId and/or AdsPort) than specified in the settings
|
|
26
|
+
- Caching is only available for the original target provided in settings
|
|
27
|
+
- The same client can be used for many different targets at the same time
|
|
28
|
+
- Added support for reading/writing `INTERFACE` data types
|
|
29
|
+
- Added support for reading/writing empty `FUNCTION_BLOCK`s
|
|
30
|
+
- Added support for reading/writing `BIT` data type
|
|
31
|
+
- Writing a `STRING` or `WSTRING` value that is longer than the target data type causes the string to be truncated.
|
|
32
|
+
- Previously the string end character was lost, which caused "never ending string" and `<Value of the expression cannot be retrieved` in PLC online view.
|
|
33
|
+
- E.g. writing 85 bytes of string to `STRING(80)` variable
|
|
34
|
+
- `BOOL` and `BIT` data values are now true if the value is anything else than 0
|
|
35
|
+
- In TwinCAT, `BOOL` is true if the value is anything else than zero (see [x_TO_BOOL](https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_plc_intro/2529047435.html&id=))
|
|
36
|
+
- Before, ads-client set the value to true only if value was true or 1, otherwise it was 0
|
|
37
|
+
- `writeControl()` accepts also string values for `adsState`
|
|
38
|
+
- Added support for UTF-8 encoded ADS symols
|
|
9
39
|
- Required for TwinCAT 3.1.4026 support
|
|
10
40
|
- Required for TwinCAT 3.1.4022/3.1.4024 with `UTF-8 Encoding` checked under `TwinCAT XAE -> SYSTEM -> Settings -> ADS Symbolic`.
|
|
11
41
|
- Added new `metaData.adsSymbolsUseUtf8`
|
|
@@ -17,6 +47,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
47
|
- Also added support for old version 1 upload info (perhaps old TC2 devices..?)
|
|
18
48
|
- New method `sendAdsCommandWithFallback()`
|
|
19
49
|
- Calls `sendAdsCommand()` with a specific command. If it fails to certain ADS errors, tries the fallback command.
|
|
50
|
+
- Added test suites for TwinCAT 2
|
|
51
|
+
- Separate TwinCAT 2 test PLC project created (See [https://github.com/jisotalo/ads-client-test-plc-project/tree/v2-dev](https://github.com/jisotalo/ads-client-test-plc-project/tree/v2-dev))
|
|
52
|
+
- Updated tests to work with TC2 (and removed tests for TC2 unsupported features)
|
|
53
|
+
- Added `warning` event to listen for console warnings
|
|
54
|
+
|
|
55
|
+
## [2.0.0 beta releases]
|
|
56
|
+
<details>
|
|
57
|
+
<summary>Click to display release notes of 2.0.0-beta1...2.0.0-beta5</summary>
|
|
58
|
+
|
|
59
|
+
## [2.0.0-beta.6] - 14.12.2024
|
|
60
|
+
- Final release before releasing 2.0.0 stable
|
|
61
|
+
|
|
62
|
+
## [2.0.0-beta.5] - 25.11.2024
|
|
63
|
+
- Added support for UTF-8 encoded ADS symols
|
|
64
|
+
- Required for TwinCAT 3.1.4026 support
|
|
65
|
+
- Required for TwinCAT 3.1.4022/3.1.4024 with `UTF-8 Encoding` checked under `TwinCAT XAE -> SYSTEM -> Settings -> ADS Symbolic`.b
|
|
66
|
+
- Added new `metaData.adsSymbolsUseUtf8`
|
|
67
|
+
- Set `true` if target system is using UTF-8 for ADS symbol encoding
|
|
68
|
+
- Added new setting `forceUtf8ForAdsSymbols` (default: `false`)
|
|
69
|
+
- If set, client always handles ADS symbols as UTF-8 encoded
|
|
70
|
+
- Otherwise tries to detect the encoding or fallbacks to cp1252
|
|
71
|
+
- `readPlcUploadInfo()` updated to support new version 3 upload info (inc. ADS symbol encoding info)
|
|
72
|
+
- Also added support for old version 1 upload info (perhaps old TC2 devices..?)
|
|
73
|
+
- New method `sendAdsCommandWithFallback()`
|
|
74
|
+
- Calls `sendAdsCommand()` with a specific command. If it fails to certain ADS errors, tries the fallback command.
|
|
20
75
|
- Bug fix: If RPC method parameter had attributes, error was thrown
|
|
21
76
|
- Bug fix: If RPC method parameter had multiple flags, error was thrown (`Response with ADS error received (error 1797 - Parameter size not correct)`)
|
|
22
77
|
- When calling `readPlcRuntimeState()` and state has changed, event `plcRuntimeStateChange` is emitted (previously emitted only if notification received from PLC)
|
|
@@ -82,6 +137,8 @@ See [MIGRATION.md](MIGRATION.md) for all breaking changes and follow the instruc
|
|
|
82
137
|
- Before, ads-client set the value to true only if value was true or 1, otherwise it was 0
|
|
83
138
|
- `writeControl()` accepts also string values for `adsState`
|
|
84
139
|
|
|
140
|
+
</details>
|
|
141
|
+
|
|
85
142
|
## [1.14.3] - 23.09.2023
|
|
86
143
|
### Changed
|
|
87
144
|
- Bug fix: Some TwinCAT 2 devices (such as BK9050) do not send data length if answering with error code
|