ads-client 1.12.2 → 1.13.2
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 +21 -0
- package/README.md +137 -4
- package/package.json +1 -1
- package/src/ads-client-ads.js +6 -0
- package/src/ads-client.js +36 -32
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ 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.2] - 17.05.2022
|
|
8
|
+
### Changed
|
|
9
|
+
- Bug fix: Incorrect parsing of ARRAY OF ARRAY, now works as should [See issue #91](https://github.com/jisotalo/ads-client/issues/91)
|
|
10
|
+
- Added settings descriptions to README
|
|
11
|
+
|
|
12
|
+
## [1.13.1] - 04.04.2022
|
|
13
|
+
### Changed
|
|
14
|
+
- Bug fix: Undefined variable `message` [See issue #89](https://github.com/jisotalo/ads-client/issues/89)
|
|
15
|
+
- Updated ADS error codes with new ones [See issue #88](https://github.com/jisotalo/ads-client/issues/88)
|
|
16
|
+
- Updated README
|
|
17
|
+
|
|
18
|
+
## [1.13.0] - 27.02.2022
|
|
19
|
+
### Added
|
|
20
|
+
- Added new setting `bareClient`. If it's set, the client will only connect to the target, nothing else
|
|
21
|
+
- No system manager, symbol version, device info and upload info are read
|
|
22
|
+
- Can be used to connect to non-PLC systems such as [ads-server](https://github.com/jisotalo/ads-server) targets and other ADS supported devices
|
|
23
|
+
- Only requirement is that ADS route is available
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Updated README
|
|
27
|
+
|
|
7
28
|
## [1.12.2] - 12.02.2022
|
|
8
29
|
### Changed
|
|
9
30
|
- Bug fix: `TOD` data type was not regonized on TwinCAT 2 and TwinCAT 3 (TC3 builds <= 4020)
|
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
|
|
|
@@ -29,9 +34,11 @@ Check out the [node-red-contrib-ads-client](https://www.npmjs.com/package/node-r
|
|
|
29
34
|
- [Enabling localhost support on TwinCAT 3](#enabling-localhost-support-on-twincat-3)
|
|
30
35
|
- [IMPORTANT: Writing STRUCT variables](#important-writing-struct-variables)
|
|
31
36
|
- [IMPORTANT: Things to know when using with TwinCAT 2](#important-things-to-know-when-using-with-twincat-2)
|
|
37
|
+
- [Connecting to systems without PLC runtime](#connecting-to-systems-without-plc-runtime)
|
|
32
38
|
- [Getting started](#getting-started)
|
|
33
39
|
* [Data types used in getting started](#data-types-used-in-getting-started)
|
|
34
40
|
* [Creating a new Client instance](#creating-a-new-client-instance)
|
|
41
|
+
* [Available settings](#available-settings)
|
|
35
42
|
* [Connecting and disconnecting](#connecting-and-disconnecting)
|
|
36
43
|
* [Reading any type PLC variable](#reading-any-type-plc-variable)
|
|
37
44
|
+ [Example: Reading `INT` type variable](#example-reading-int-type-variable)
|
|
@@ -336,6 +343,26 @@ await client.readSymbol('.ExampleSTRUCT') //TwinCAT 2
|
|
|
336
343
|
This is the only one non-working feature as there are no methods in TC2.
|
|
337
344
|
|
|
338
345
|
|
|
346
|
+
# Connecting to systems without PLC runtime
|
|
347
|
+
|
|
348
|
+
Since version 1.13.0 it's possible to connect to systems without PLC runtime and/or system manager using `ads-client`.
|
|
349
|
+
|
|
350
|
+
In previous versions, the client always checked the system state (RUN, CONFIG). However when connecting to different systems (non-PLC systems), there might be no system manager service. With default configuration this causes an error:
|
|
351
|
+
```
|
|
352
|
+
ClientException: Connection failed: Device system manager state read failed
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
By providing `bareClient` setting, the client connects to the router or target and nothing else. After that, the client can be used to read/write data. However, connection losses etc. need to be handled by the user.
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
```js
|
|
359
|
+
const client = new ads.Client({
|
|
360
|
+
targetAmsNetId: '192.168.5.131.3.1',
|
|
361
|
+
targetAdsPort: 1002,
|
|
362
|
+
bareClient: true //NOTE
|
|
363
|
+
})
|
|
364
|
+
```
|
|
365
|
+
|
|
339
366
|
# Getting started
|
|
340
367
|
|
|
341
368
|
This chapter includes some short getting started examples. See the JSDoc [documentation](#documentation) for detailed description of library classes and methods.
|
|
@@ -385,8 +412,6 @@ END_TYPE
|
|
|
385
412
|
|
|
386
413
|
The constructor takes settings as its parameter. Two settings are mandatory: `targetAmsNetId` and `targetAdsPort`. The first is the target PLC system AmsNetId (like *127.0.0.1.1.1* or *192.168.1.10.1.1*) and the latter is target system ADS port (*like 851 for TwinCAT 3 runtime 1*).
|
|
387
414
|
|
|
388
|
-
See all settings from the [Settings documentation](https://jisotalo.github.io/ads-client/global.html#Settings)
|
|
389
|
-
|
|
390
415
|
```js
|
|
391
416
|
const ads = require('ads-client')
|
|
392
417
|
|
|
@@ -396,6 +421,84 @@ const client = new ads.Client({
|
|
|
396
421
|
targetAdsPort: 851,
|
|
397
422
|
})
|
|
398
423
|
```
|
|
424
|
+
### Available settings
|
|
425
|
+
**REQUIRED:**
|
|
426
|
+
* `targetAmsNetId`
|
|
427
|
+
* Target system AmsNetId
|
|
428
|
+
* Use `127.0.0.1.1.1` or `localhost` if connecting to a local system
|
|
429
|
+
* `targetAdsPort`
|
|
430
|
+
* Target system ADS port.
|
|
431
|
+
* TwinCAT 3: 851 (1st runtime), 852 (2nd runtime) and so on
|
|
432
|
+
* TwinCAT 2: 801 (1st runtime)
|
|
433
|
+
|
|
434
|
+
**Optional:**
|
|
435
|
+
* `objectifyEnumerations`
|
|
436
|
+
* Default value: `true`
|
|
437
|
+
* If true, read ENUM data types are converted to objects instead of numbers, e.g. `{name: 'enumValue', value: 5}` instead of 5
|
|
438
|
+
* `convertDatesToJavascript`
|
|
439
|
+
* Default value: `true`
|
|
440
|
+
* If true, PLC DT (DATE_AND_TIME) and DATE types are converted to Javascript dates
|
|
441
|
+
* `readAndCacheSymbols`
|
|
442
|
+
* Default value: `false`
|
|
443
|
+
* If true, **all** PLC symbols are cached during connecting. Otherwise they are read and cached only when needed
|
|
444
|
+
* `readAndCacheDataTypes`
|
|
445
|
+
* Default value: `false`
|
|
446
|
+
* If true, **all** PLC data types are cached during connecting. Otherwise they are read and cached only when needed
|
|
447
|
+
* `disableSymbolVersionMonitoring`
|
|
448
|
+
* Default value: `false`
|
|
449
|
+
* If true, PLC symbol version changes aren't monitored and cached symbols and datatypes won't be updated after PLC program download
|
|
450
|
+
* `routerTcpPort`
|
|
451
|
+
* Default value: `48898`
|
|
452
|
+
* Target ADS router TCP port
|
|
453
|
+
* `routerAddress`
|
|
454
|
+
* Default value: `localhost`
|
|
455
|
+
* Target ADS router IP address/hostname
|
|
456
|
+
* `localAddress`
|
|
457
|
+
* Default value: `system default`
|
|
458
|
+
* Local IP address to use, use this to change used network interface if required
|
|
459
|
+
* `localTcpPort`
|
|
460
|
+
* Default value: `system default`
|
|
461
|
+
* Local TCP port to use for outgoing connections
|
|
462
|
+
* `localAmsNetId`
|
|
463
|
+
* Default value: `AMS router provides`
|
|
464
|
+
* Local AmsNetId to use
|
|
465
|
+
* Used especially when connecting from systems without own AMS router, like Raspberry Pi
|
|
466
|
+
* See: [Connecting from any Node.js supported system to the PLC](#setup-3---connecting-from-any-nodejs-supported-system-to-the-plc)
|
|
467
|
+
* `localAdsPort`
|
|
468
|
+
* Default value: `AMS router provides`
|
|
469
|
+
* Local ADS port to use
|
|
470
|
+
* Used especially when connecting from systems without own AMS router, like Raspberry Pi
|
|
471
|
+
* See: [Connecting from any Node.js supported system to the PLC](#setup-3---connecting-from-any-nodejs-supported-system-to-the-plc)
|
|
472
|
+
* `timeoutDelay`
|
|
473
|
+
* Default value: `2000`
|
|
474
|
+
* Time (milliseconds) after connecting to the router or waiting for command response is canceled to a timeout
|
|
475
|
+
* `hideConsoleWarnings`
|
|
476
|
+
* Default value: `false`
|
|
477
|
+
* If true, no warnings are written to console (=nothing is **ever** written to console)
|
|
478
|
+
* `autoReconnect`
|
|
479
|
+
* Default value: `true`
|
|
480
|
+
* If true and connection is lost, the client tries to reconnect automatically
|
|
481
|
+
* `reconnectInterval`
|
|
482
|
+
* Default value: `2000`
|
|
483
|
+
* Time (milliseconds) how often the lost connection is tried to re-establish
|
|
484
|
+
* `checkStateInterval`
|
|
485
|
+
* Default value: `1000`
|
|
486
|
+
* Time (milliseconds) how often the system manager state is read to see if connection is OK
|
|
487
|
+
* `connectionDownDelay`
|
|
488
|
+
* Default value: `5000`
|
|
489
|
+
* Time (milliseconds) after no successful reading of the system manager state the connection is determined to be lost
|
|
490
|
+
* `allowHalfOpen`
|
|
491
|
+
* Default value: `false`
|
|
492
|
+
* If true, connect() is successful even if no PLC runtime is found (but target and system manager are available) - Can be useful if it's ok that after connecting the PLC runtime is not immediately available (example: connecting before uploading PLC code and reading data later) -
|
|
493
|
+
* WARNING: If true, reinitializing subscriptions might fail after connection loss.
|
|
494
|
+
* `disableBigInt`
|
|
495
|
+
* Default value: `false`
|
|
496
|
+
* If true, 64-bit integer PLC variables are kept as `Buffer` objects instead of converting to Javascript `BigInt` variables (JSON.strigify and libraries that use it have no BigInt support)
|
|
497
|
+
* `bareClient`
|
|
498
|
+
* Default value: `false`
|
|
499
|
+
* If true, only direct ads connection is established (no system manager)
|
|
500
|
+
* Can be used to connect to systems without PLC runtime
|
|
501
|
+
* See [Connecting to systems without PLC runtime](#connecting-to-systems-without-plc-runtime)
|
|
399
502
|
|
|
400
503
|
|
|
401
504
|
## Connecting and disconnecting
|
|
@@ -1623,6 +1726,36 @@ For example, when copying a variable name from TwinCAT online view using CTRL+C,
|
|
|
1623
1726
|
|
|
1624
1727
|
If you have problems, try to read the variable information using `readSymbolInfo()`. The final solution is to read all data types using `readAndCacheDataTypes()` and manually finding the correct type.
|
|
1625
1728
|
|
|
1729
|
+
### ClientException: Connection failed: Device system manager state read failed
|
|
1730
|
+
|
|
1731
|
+
This error indicates that the given AmsnetId didn't contain system manager service (port 10000). If you connect to the PLC system, there is always system manager and PLC runtime(s). However, when connecting to other systems than PLC, it might be that there is no system manager service.
|
|
1732
|
+
|
|
1733
|
+
Solution:
|
|
1734
|
+
- Double check AmsNetId settings (if connecting directly to PLC)
|
|
1735
|
+
- [Set `bareClient` setting to skip all system manager and PLC runtime checks](#connecting-to-systems-without-plc-runtime) (version 1.13.0 ->)
|
|
1736
|
+
|
|
1737
|
+
### Connection failed (error EADDRNOTAVAIL)
|
|
1738
|
+
This could happen if you have manually provided `localAddress` or `localTcpPort` that don't exist.
|
|
1739
|
+
For example, setting localAddress to 192.168.10.1 when the computer has only ethernet interface with IP 192.168.1.1.
|
|
1740
|
+
|
|
1741
|
+
See https://github.com/jisotalo/ads-client/issues/82
|
|
1742
|
+
|
|
1743
|
+
### Problems running ads-client with docker
|
|
1744
|
+
|
|
1745
|
+
- EADDRNOTAVAIL: See above and https://github.com/jisotalo/ads-client/issues/82
|
|
1746
|
+
|
|
1747
|
+
### How to connect to PLC that is in CONFIG mode?
|
|
1748
|
+
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.
|
|
1749
|
+
|
|
1750
|
+
`Target and system manager found but couldn't connect to the PLC runtime (see settings allowHalfOpen and bareClient)`
|
|
1751
|
+
|
|
1752
|
+
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.
|
|
1753
|
+
|
|
1754
|
+
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).
|
|
1755
|
+
|
|
1756
|
+
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.
|
|
1757
|
+
|
|
1758
|
+
|
|
1626
1759
|
|
|
1627
1760
|
# Documentation
|
|
1628
1761
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ads-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.2",
|
|
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
|
@@ -74,6 +74,7 @@ class Client extends EventEmitter {
|
|
|
74
74
|
* @property {number} [connectionDownDelay=5000] - Time (milliseconds) after no successful reading of the system manager state the connection is determined to be lost - Optional (**default**: 5000 ms)
|
|
75
75
|
* @property {boolean} [allowHalfOpen=false] - If true, connect() is successful even if no PLC runtime is found (but target and system manager are available) - Can be useful if it's ok that after connect() the PLC runtime is not immediately available (example: connecting before uploading PLC code and reading data later) - WARNING: If true, reinitializing subscriptions might fail after connection loss.
|
|
76
76
|
* @property {boolean} [disableBigInt=false] - If true, 64 bit integer PLC variables are kept as Buffer objects instead of converting to Javascript BigInt variables (JSON.strigify and libraries that use it have no BigInt support)
|
|
77
|
+
* @property {boolean} [bareClient=false] - If true, only direct ads connection is established (no system manager etc) - Can be used to connect to systems without PLC runtimes etc.
|
|
77
78
|
*/
|
|
78
79
|
|
|
79
80
|
|
|
@@ -102,7 +103,8 @@ class Client extends EventEmitter {
|
|
|
102
103
|
checkStateInterval: 1000,
|
|
103
104
|
connectionDownDelay: 5000,
|
|
104
105
|
allowHalfOpen: false,
|
|
105
|
-
disableBigInt: false
|
|
106
|
+
disableBigInt: false,
|
|
107
|
+
bareClient: false
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -886,7 +888,7 @@ class Client extends EventEmitter {
|
|
|
886
888
|
} catch (err) {
|
|
887
889
|
return reject(new ClientException(this, 'readSymbol()', `Reading symbol ${variableName} failed: Reading data type failed`, err))
|
|
888
890
|
}
|
|
889
|
-
|
|
891
|
+
|
|
890
892
|
//4. Parse the data to javascript object
|
|
891
893
|
let data = {}
|
|
892
894
|
try {
|
|
@@ -3126,7 +3128,7 @@ class ClientException extends Error {
|
|
|
3126
3128
|
if (typeof Error.captureStackTrace === 'function') {
|
|
3127
3129
|
Error.captureStackTrace(this, this.constructor)
|
|
3128
3130
|
} else {
|
|
3129
|
-
this.stack = (new Error(
|
|
3131
|
+
this.stack = (new Error(messageOrError)).stack
|
|
3130
3132
|
}
|
|
3131
3133
|
|
|
3132
3134
|
/**
|
|
@@ -3396,43 +3398,45 @@ function _connect(isReconnecting = false) {
|
|
|
3396
3398
|
this._internals.socketErrorHandler = _onSocketError.bind(this)
|
|
3397
3399
|
socket.on('error', this._internals.socketErrorHandler)
|
|
3398
3400
|
|
|
3399
|
-
|
|
3400
|
-
//Try to read system manager state - If it's OK, connection is successful to the target
|
|
3401
|
-
await this.readSystemManagerState()
|
|
3402
|
-
_systemManagerStatePoller.call(this)
|
|
3403
|
-
|
|
3404
|
-
} catch (err) {
|
|
3401
|
+
if (this.settings.bareClient !== true) {
|
|
3405
3402
|
try {
|
|
3406
|
-
|
|
3403
|
+
//Try to read system manager state - If it's OK, connection is successful to the target
|
|
3404
|
+
await this.readSystemManagerState()
|
|
3405
|
+
_systemManagerStatePoller.call(this)
|
|
3406
|
+
|
|
3407
3407
|
} catch (err) {
|
|
3408
|
-
|
|
3408
|
+
try {
|
|
3409
|
+
await _disconnect.call(this, false, isReconnecting)
|
|
3410
|
+
} catch (err) {
|
|
3411
|
+
debug(`_connect(): Reading target system manager failed -> Connection closed`)
|
|
3412
|
+
}
|
|
3413
|
+
this.connection.connected = false
|
|
3414
|
+
|
|
3415
|
+
return reject(new ClientException(this, '_connect()', `Connection failed: ${err.message}`, err))
|
|
3409
3416
|
}
|
|
3410
|
-
this.connection.connected = false
|
|
3411
3417
|
|
|
3412
|
-
return reject(new ClientException(this, '_connect()', `Connection failed: ${err.message}`, err))
|
|
3413
|
-
}
|
|
3414
3418
|
|
|
3419
|
+
try {
|
|
3420
|
+
await _reInitializeInternals.call(this)
|
|
3415
3421
|
|
|
3416
|
-
|
|
3417
|
-
|
|
3422
|
+
} catch (err) {
|
|
3423
|
+
if (this.settings.allowHalfOpen !== true) {
|
|
3424
|
+
try {
|
|
3425
|
+
await _disconnect.call(this, false, true)
|
|
3426
|
+
} catch (err) {
|
|
3427
|
+
debug(`_connect(): Connecting to target PLC runtime failed -> Connection closed`)
|
|
3428
|
+
}
|
|
3429
|
+
this.connection.connected = false
|
|
3418
3430
|
|
|
3419
|
-
|
|
3420
|
-
if (this.settings.allowHalfOpen !== true) {
|
|
3421
|
-
try {
|
|
3422
|
-
await _disconnect.call(this, false, true)
|
|
3423
|
-
} catch (err) {
|
|
3424
|
-
debug(`_connect(): Connecting to target PLC runtime failed -> Connection closed`)
|
|
3431
|
+
return reject(new ClientException(this, '_connect()', `Target and system manager found but couldn't connect to the PLC runtime (see settings allowHalfOpen and bareClient): ${err.message}`, err))
|
|
3425
3432
|
}
|
|
3426
|
-
this.connection.connected = false
|
|
3427
3433
|
|
|
3428
|
-
|
|
3434
|
+
//Todo: Redesign this
|
|
3435
|
+
if (this.metaData.systemManagerState.adsState !== ADS.ADS_STATE.Run)
|
|
3436
|
+
_console.call(this, `WARNING: Target is connected but not in RUN mode (mode: ${this.metaData.systemManagerState.adsStateStr}) - connecting to runtime (ADS port ${this.settings.targetAdsPort}) failed`)
|
|
3437
|
+
else
|
|
3438
|
+
_console.call(this, `WARNING: Target is connected but connecting to runtime (ADS port ${this.settings.targetAdsPort}) failed - Check the port number and that the target system state (${this.metaData.systemManagerState.adsStateStr}) is valid.`)
|
|
3429
3439
|
}
|
|
3430
|
-
|
|
3431
|
-
//Todo: Redesign this
|
|
3432
|
-
if (this.metaData.systemManagerState.adsState !== ADS.ADS_STATE.Run)
|
|
3433
|
-
_console.call(this, `WARNING: Target is connected but not in RUN mode (mode: ${this.metaData.systemManagerState.adsStateStr}) - connecting to runtime (ADS port ${this.settings.targetAdsPort}) failed`)
|
|
3434
|
-
else
|
|
3435
|
-
_console.call(this, `WARNING: Target is connected but connecting to runtime (ADS port ${this.settings.targetAdsPort}) failed - Check the port number and that the target system state (${this.metaData.systemManagerState.adsStateStr}) is valid.`)
|
|
3436
3440
|
}
|
|
3437
3441
|
|
|
3438
3442
|
//Listening connection lost events
|
|
@@ -5680,8 +5684,8 @@ function _getDataTypeRecursive(dataTypeName, firstLevel = true, size = null) {
|
|
|
5680
5684
|
const arrayType = await _getDataTypeRecursive.call(this, dataType.type, false)
|
|
5681
5685
|
|
|
5682
5686
|
parsedDataType = arrayType
|
|
5683
|
-
|
|
5684
|
-
|
|
5687
|
+
//Combining array information (for ARRAY OF ARRAY support)
|
|
5688
|
+
parsedDataType.arrayData = dataType.arrayData.concat(parsedDataType.arrayData)
|
|
5685
5689
|
|
|
5686
5690
|
//If the data type has flag "DataType" and it's enum
|
|
5687
5691
|
} else if (dataType.flagsStr.includes('DataType') && dataType.flagsStr.includes('EnumInfos')) {
|