ads-client 1.13.0 → 1.13.1
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 +6 -0
- package/README.md +20 -2
- package/package.json +1 -1
- package/src/ads-client-ads.js +6 -0
- package/src/ads-client.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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
|
+
## [1.13.1] - 04.04.2022
|
|
8
|
+
### Changed
|
|
9
|
+
- Bug fix: Undefined variable `message` [See issue #89](https://github.com/jisotalo/ads-client/issues/89)
|
|
10
|
+
- Updated ADS error codes with new ones [See issue #88](https://github.com/jisotalo/ads-client/issues/88)
|
|
11
|
+
- Updated README
|
|
12
|
+
|
|
7
13
|
## [1.13.0] - 27.02.2022
|
|
8
14
|
### Added
|
|
9
15
|
- Added new setting `bareClient`. If it's set, the client will only connect to the target, nothing else
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.org/package/ads-client)
|
|
5
|
-
[](https://www.paypal.com/donate/?business=KUWBXXCVGZZME&no_recurring=0¤cy_code=EUR)
|
|
6
6
|
[](https://github.com/jisotalo/ads-client)
|
|
7
7
|
[](https://choosealicense.com/licenses/mit/)
|
|
8
8
|
|
|
@@ -13,10 +13,15 @@ Coded from scratch using [TwinCAT ADS specification](https://infosys.beckhoff.co
|
|
|
13
13
|
There is automatically created documentation available at https://jisotalo.github.io/ads-client/
|
|
14
14
|
|
|
15
15
|
# Project status
|
|
16
|
-
This project is currently "ready". It's maintained actively and used in projects by the author and others
|
|
16
|
+
This project is currently "ready". It's maintained actively and used in projects by the author and others (also lot's of commercial projects)
|
|
17
17
|
|
|
18
18
|
Bugs are fixed if found and new features can be added. Please let me know if you have any ideas!
|
|
19
19
|
|
|
20
|
+
And if you want you can buy me a beer using PayPal :)
|
|
21
|
+
|
|
22
|
+
[](https://www.paypal.com/donate/?business=KUWBXXCVGZZME&no_recurring=0¤cy_code=EUR)
|
|
23
|
+
|
|
24
|
+
|
|
20
25
|
# Using Node-RED?
|
|
21
26
|
Check out the [node-red-contrib-ads-client](https://www.npmjs.com/package/node-red-contrib-ads-client) package. It's an `ads-client` wrapper for Node-RED to get the same functionality.
|
|
22
27
|
|
|
@@ -1662,6 +1667,19 @@ See https://github.com/jisotalo/ads-client/issues/82
|
|
|
1662
1667
|
|
|
1663
1668
|
- EADDRNOTAVAIL: See above and https://github.com/jisotalo/ads-client/issues/82
|
|
1664
1669
|
|
|
1670
|
+
### How to connect to PLC that is in CONFIG mode?
|
|
1671
|
+
As default, the ads-client checks if the target has PLC runtime at given port. However, when target system manager is at config mode, there is none. The client will throw an error during connecting.
|
|
1672
|
+
|
|
1673
|
+
`Target and system manager found but couldn't connect to the PLC runtime (see settings allowHalfOpen and bareClient)`
|
|
1674
|
+
|
|
1675
|
+
You can disable the check by providing setting `allowHalfOpen: true`. After that, it's possible to start the PLC by `setSystemManagerToRun()`. However, when using this setting internal subscription like symbol version etc. might not work properly.
|
|
1676
|
+
|
|
1677
|
+
Another option is to use setting `bareClient: true` (since v.1.13.0). However, when using this option, the ads-client does not handle anything automatically - it's just a bare client (duh).
|
|
1678
|
+
|
|
1679
|
+
I would suggest to use ads-client normally without any special settings. If the target is at config mode, use separate client instance to start it, and the again the normal instance to connect to a running system. This way the client works the best.
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
|
|
1665
1683
|
# Documentation
|
|
1666
1684
|
|
|
1667
1685
|
You can find the full html documentation from the project [GitHub home page](https://jisotalo.github.io/ads-client/) as well as from `./docs/` folder in the repository.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ads-client",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "Beckhoff TwinCAT ADS client library for Node.js (unofficial). Connects to Beckhoff TwinCAT automation systems using ADS protocol.",
|
|
5
5
|
"main": "./src/ads-client.js",
|
|
6
6
|
"scripts": {
|
package/src/ads-client-ads.js
CHANGED
|
@@ -352,6 +352,8 @@ const ADS_ERROR = {
|
|
|
352
352
|
26: 'TCP send error',
|
|
353
353
|
27: 'Host unreachable',
|
|
354
354
|
28: 'Invalid AMS fragment',
|
|
355
|
+
29: 'TLS send error – secure ADS connection failed.',
|
|
356
|
+
30: 'Access denied – secure ADS access denied.',
|
|
355
357
|
1280: 'No locked memory can be allocated',
|
|
356
358
|
1281: 'The size of the router memory could not be changed',
|
|
357
359
|
1282: 'The mailbox has reached the maximum number of possible messages. The current sent message was rejected',
|
|
@@ -363,6 +365,9 @@ const ADS_ERROR = {
|
|
|
363
365
|
1288: 'The maximum number of Ports reached',
|
|
364
366
|
1289: 'Invalid port',
|
|
365
367
|
1290: 'TwinCAT Router not active',
|
|
368
|
+
1291: 'The mailbox has reached the maximum number for fragmented messages.',
|
|
369
|
+
1292: 'A fragment timeout has occurred.',
|
|
370
|
+
1293: 'The port is removed.',
|
|
366
371
|
1792: 'General device error',
|
|
367
372
|
1793: 'Service is not supported by server',
|
|
368
373
|
1794: 'Invalid index group',
|
|
@@ -420,6 +425,7 @@ const ADS_ERROR = {
|
|
|
420
425
|
1862: 'Error in win32 subsystem',
|
|
421
426
|
1863: 'Invalid client timeout value',
|
|
422
427
|
1864: 'Ads-port not opened',
|
|
428
|
+
1865: 'No AMS address.',
|
|
423
429
|
1872: 'Internal error in ads sync',
|
|
424
430
|
1873: 'Hash table overflow',
|
|
425
431
|
1874: 'Key not found in hash',
|
package/src/ads-client.js
CHANGED
|
@@ -3128,7 +3128,7 @@ class ClientException extends Error {
|
|
|
3128
3128
|
if (typeof Error.captureStackTrace === 'function') {
|
|
3129
3129
|
Error.captureStackTrace(this, this.constructor)
|
|
3130
3130
|
} else {
|
|
3131
|
-
this.stack = (new Error(
|
|
3131
|
+
this.stack = (new Error(messageOrError)).stack
|
|
3132
3132
|
}
|
|
3133
3133
|
|
|
3134
3134
|
/**
|