You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## [1.14.3] - 23.09.2023
### Changed
- Bug fix: Some TwinCAT 2 devices (such as BK9050) do not send data length if answering with error code
- This caused `RangeError: Index out of range` exception as there wasn't enough bytes received
- See [issue #116](#116)
- Bug fix: If using older Node.js versions such as 8.x, connection lost could have caused unhandled exception
- Reason was `catch {}` which isn't supported in old versions
- See [issue #116](#116)
### Added
- Updated readme to include information about TypeScript types
- Thanks to [Christian Rishøj](https://github.com/crishoj)
- Updated readme with FAQ about TwinCAT 2 low-end devices
- Updated readme about v2 development
- Added option to run tests with usermode runtime AmsNetId (`192.168.4.1.1.1`) instead of localhost (`npm run test-um`)
Beckhoff TwinCAT ADS client library for Node.js (unofficial). Connects to Beckhoff TwinCAT automation systems using ADS protocol.
10
10
11
11
Coded from scratch using [TwinCAT ADS specification](https://infosys.beckhoff.com/content/1033/tc3_ads_intro/116157835.html?id=124964102706356243) and [Beckhoff.TwinCAT.Ads nuget package](https://www.nuget.org/packages/Beckhoff.TwinCAT.Ads/5.0.0-preview6). Inspiration from similar projects like [node-ads](https://www.npmjs.com/package/node-ads), [beckhoff-js](https://www.npmjs.com/package/beckhoff-js) and [iecstruct](https://www.npmjs.com/package/iecstruct).
12
12
13
-
There is automatically created documentation available at https://jisotalo.github.io/ads-client/
13
+
There is automatically created documentation available at https://jisotalo.fi/ads-client/
14
14
15
15
# Project status
16
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 :)
20
+
If you want to support my work, you can do it using PayPal. I can provide you support in exchange.
Version 2 is under development in [`v2-dev`](https://github.com/jisotalo/ads-client/tree/v2-dev) branch. It's written in TypeScript (including all types!) and will also be more optimized. At the moment basic functions *might* work but it's not ready for production use.
23
26
24
27
25
28
# Using Node-RED?
@@ -101,6 +104,13 @@ Install the [npm package](https://www.npmjs.com/package/ads-client) using npm co
101
104
npm i ads-client
102
105
```
103
106
107
+
If you are using TypeScript, install unofficial types using npm command (thanks [Christian Rishøj](https://github.com/crishoj)):
108
+
```bash
109
+
npm install --save @types/ads-client
110
+
```
111
+
112
+
*Note: Version 2 under development will be written in 100% TypeScript*
113
+
104
114
Include the module in your code
105
115
```js
106
116
constads=require('ads-client')
@@ -1764,12 +1774,17 @@ Solution:
1764
1774
* When closing application, first unsubscribe from all notifications using `unsubscribeAll()`
1765
1775
* Use router instead of direct connection, see https://github.com/jisotalo/ads-client/issues/85#issuecomment-1193098519
1766
1776
1777
+
### Issues with TwinCAT 2 low-end devices (BK9050, BC9050 etc.)
1778
+
* You can only use raw commands (such as `readRaw()`, `writeRaw()`, `subscribeRaw()`) as these devices provide no symbols
1779
+
* See [issue 114](https://github.com/jisotalo/ads-client/issues/114) and [issue 116](https://github.com/jisotalo/ads-client/issues/116) for starters
1780
+
1781
+
1767
1782
# Automatic testing
1768
1783
Since version 1.14.0 the library has automatic testing using Jest. Idea is to run the tests before updates to make sure everything works OK (this should have been done much earlier...)
1769
1784
1770
1785
Separate PLC project is required for testing, see https://github.com/jisotalo/ads-client-test-plc-project for more project and more info.
1771
1786
1772
-
Tests are run with command `npm test` (not in npm version, please clone this repository).
1787
+
Tests are run with command `npm test`or `npm run test-um` (usermode runtime) (not in npm version, please clone this repository).
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Tue May 02 2023 21:37:58 GMT+0300 (Itä-Euroopan kesäaika) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
7728
+
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Sat Sep 23 2023 08:34:17 GMT+0300 (Itä-Euroopan kesäaika) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Copy file name to clipboardExpand all lines: docs/Client.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9027,7 +9027,7 @@ <h5>Returns:</h5>
9027
9027
<brclass="clear">
9028
9028
9029
9029
<footer>
9030
-
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Tue May 02 2023 21:37:58 GMT+0300 (Itä-Euroopan kesäaika) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
9030
+
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Sat Sep 23 2023 08:34:17 GMT+0300 (Itä-Euroopan kesäaika) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Copy file name to clipboardExpand all lines: docs/ClientException.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -857,7 +857,7 @@ <h5>Type:</h5>
857
857
<brclass="clear">
858
858
859
859
<footer>
860
-
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> on Tue May 02 2023 21:37:58 GMT+0300 (Itä-Euroopan kesäaika) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
860
+
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Sat Sep 23 2023 08:34:17 GMT+0300 (Itä-Euroopan kesäaika) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
0 commit comments