Releases: jisotalo/ads-client
Releases · jisotalo/ads-client
v.2.1.0
[2.1.0] - 27.01.2025
Added
- New method
readTcSystemExtendedState()
- Reads extended target TwinCAT system state (if available)
- Improved detection of TwinCAT system service restart
- Available if remote system supports
readTcSystemExtendedState()
- Tested with TwinCAT 3.1.4022, 3.1.4024 and 3.1.4026
- Client detects a restart of TwinCAT system and reconnects to re-establish subscriptions
- See issue issue #159
- Available if remote system supports
- Added tests for subscription persistence during TwinCAT system restart
Changed
- Changed
activeSubscriptions
property visibility from private to public disconnect
event is no longer emitted continuously each reconnect attempt (only during the initial disconnect / connection lost event)disconnect
event parameterisReconnecting
changed toconnectionLost
- TwinCAT system state type (
metaData.tcSystemState
) changed fromAdsState
toAdsTcSystemState
- Not a breaking change - the new type extends
AdsState
- Not a breaking change - the new type extends
v.2.0.2
[2.0.2] - 14.12.2024
IMPORTANT: This is a major version update. There are lots of breaking changes!
Updating v1 -> v2 requires manual changes to your codebase!
See MIGRATION.md for all breaking changes and follow the instructions.
Special thanks
- Special thanks to Christian Rishøj for valuable contribution!
Changes
- v.2.01 & v.2.02: Readme fixes - messed up with the links
- Everything rewritten in TypeScript
- Everything is tested before releasing
- Lots of optimizations
- Lots of name changes
- New methods:
resetPlc()
,readWriteRawMulti()
,writeRawByPath()
,readValueBySymbol()
,writeValueBySymbol()
- New setting
disableCaching
: disables all symbol and data type caching - Added optional
targetOpts
argument in all methods- Possible to provide different target address (AmsNetId and/or AdsPort) than specified in the settings
- Caching is only available for the original target provided in settings
- The same client can be used for many different targets at the same time
- Added support for reading/writing
INTERFACE
data types - Added support for reading/writing empty
FUNCTION_BLOCK
s - Added support for reading/writing
BIT
data type - Writing a
STRING
orWSTRING
value that is longer than the target data type causes the string to be truncated.- Previously the string end character was lost, which caused "never ending string" and
<Value of the expression cannot be retrieved
in PLC online view. - E.g. writing 85 bytes of string to
STRING(80)
variable
- Previously the string end character was lost, which caused "never ending string" and
BOOL
andBIT
data values are now true if the value is anything else than 0- In TwinCAT,
BOOL
is true if the value is anything else than zero (see x_TO_BOOL) - Before, ads-client set the value to true only if value was true or 1, otherwise it was 0
- In TwinCAT,
writeControl()
accepts also string values foradsState
- Added support for UTF-8 encoded ADS symols
- Required for TwinCAT 3.1.4026 support
- Required for TwinCAT 3.1.4022/3.1.4024 with
UTF-8 Encoding
checked underTwinCAT XAE -> SYSTEM -> Settings -> ADS Symbolic
.
- Added new
metaData.adsSymbolsUseUtf8
- Set
true
if target system is using UTF-8 for ADS symbol encoding
- Set
- Added new setting
forceUtf8ForAdsSymbols
(default:false
)- If set, client always handles ADS symbols as UTF-8 encoded
- Otherwise tries to detect the encoding or fallbacks to cp1252
readPlcUploadInfo()
updated to support new version 3 upload info (inc. ADS symbol encoding info)- Also added support for old version 1 upload info (perhaps old TC2 devices..?)
- New method
sendAdsCommandWithFallback()
- Calls
sendAdsCommand()
with a specific command. If it fails to certain ADS errors, tries the fallback command.
- Calls
- Added test suites for TwinCAT 2
- Separate TwinCAT 2 test PLC project created (See https://github.com/jisotalo/ads-client-test-plc-project/tree/v2-dev)
- Updated tests to work with TC2 (and removed tests for TC2 unsupported features)
- Added
warning
event to listen for console warnings
2.0.0-beta.5
[2.0.0-beta.5] - 25.11.2024
- Added support for UTF-8 encoded ADS symbols
- Required for TwinCAT 3.1.4026 support
- Required for TwinCAT 3.1.4022/3.1.4024 with
UTF-8 Encoding
checked underTwinCAT XAE -> SYSTEM -> Settings -> ADS Symbolic
.
- Added new
metaData.adsSymbolsUseUtf8
- Set
true
if target system is using UTF-8 for ADS symbol encoding
- Set
- Added new setting
forceUtf8ForAdsSymbols
(default:false
)- If set, client always handles ADS symbols as UTF-8 encoded
- Otherwise tries to detect the encoding or fallbacks to cp1252
readPlcUploadInfo()
updated to support new version 3 upload info (inc. ADS symbol encoding info)- Also added support for old version 1 upload info (perhaps old TC2 devices..?)
- New method
sendAdsCommandWithFallback()
- Calls
sendAdsCommand()
with a specific command. If it fails to certain ADS errors, tries the fallback command.
- Calls
- Bug fix: If RPC method parameter had attributes, error was thrown
- Bug fix: If RPC method parameter had multiple flags, error was thrown (
Response with ADS error received (error 1797 - Parameter size not correct)
) - When calling
readPlcRuntimeState()
and state has changed, eventplcRuntimeStateChange
is emitted (previously emitted only if notification received from PLC)- See issue #159
startPlc()
,resetPlc()
,stopPlc()
andrestartPlc()
callreadPlcRuntimeState()
afterwards to update the runtime state to metadata (and to emit event if needed)- See issue #159
- Added support for ENUM value comments and attributes (TwinCAT 3.1.4026 and newer)
- See issue #163
v.1.14.4
2.0.0-beta.4
[2.0.0-beta.4] - 02.10.2024
- Improved TwinCAT 2 support
- Improved performance by caching base data types that aren't available in the PLC (for example,
INT16
in TC2) - Bug fix: Building data types for TC2 system didn't always work (
DataType
flag is not set in base types) - Bug fix: Building data types for TC2 system didn't always work (with arrays of base types)
- Improved performance by caching base data types that aren't available in the PLC (for example,
- Added test suites for TwinCAT 2
- Separate TwinCAT 2 test PLC project created (See https://github.com/jisotalo/ads-client-test-plc-project/tree/v2-dev)
- Updated tests to work with TC2 (and removed tests for TC2 unsupported features)
- Bug fix: Client failed to disconnect when using AdsRouterConsole as a TwinCAT router
- Client now waits for port unregistering response, if the connection is not dropped immediately
Thank you Christian Rishøj for contribution!
2.0.0-beta.3
[2.0.0-beta.3] - 10.09.2024
- BREAKING: Renamed
ReadWriteRawMultiCommand
propertywriteData
tovalue
- Added
warning
event to listen for console warnings - Bugfix:
writeRawByPath()
didn't use thetargetOpts
parameter - Type
ClientEvents
renamed toAdsClientEvents
- Added automatic deletion of stale subscriptions / unknown ADS notification handles
- New setting:
deleteUnknownSubscriptions
(default:true
)
- New setting:
Thank you Christian Rishøj for contribution!
[2.0.0-beta.2] - 26.08.2024
- Changed
subscribeSymbol()
->subscribeValue()
- Bug fix: Fixing issue #144
[2.0.0-beta.1] - 24.08.2024
IMPORTANT: This is a major version update. There are lots of breaking changes!
Updating v1 -> v2 requires manual changes to your codebase!
See MIGRATION.md for all breaking changes and follow the instructions. This changelog does not have breaking changes listed for 2.0.0.
Changes
- Everything rewritten in TypeScript
- Everything is tested before releasing
- Lots of optimizations
- Lots of name changes
- New methods:
resetPlc()
,readWriteRawMulti()
,writeRawByPath()
,readValueBySymbol()
,writeValueBySymbol()
- New setting
disableCaching
: disables all symbol and data type caching - Added optional
targetOpts
argument in all methods- Possible to provide different target address (AmsNetId and/or AdsPort) than specified in the settings
- Caching is only available for the original target provided in settings
- The same client can be used for many different targets at the same time
- Added support for reading/writing
INTERFACE
data types - Added support for reading/writing empty
FUNCTION_BLOCK
s - Added support for reading/writing
BIT
data type - Writing a
STRING
orWSTRING
value that is longer than the target data type causes the string to be truncated.- Previously the string end character was lost, which caused "never ending string" and
<Value of the expression cannot be retrieved
in PLC online view. - E.g. writing 85 bytes of string to
STRING(80)
variable
- Previously the string end character was lost, which caused "never ending string" and
BOOL
andBIT
data values are now true if the value is anything else than 0- In TwinCAT,
BOOL
is true if the value is anything else than zero (see x_TO_BOOL) - Before, ads-client set the value to true only if value was true or 1, otherwise it was 0
- In TwinCAT,
writeControl()
accepts also string values foradsState
v.1.14.3
[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 https://github.com/jisotalo/ads-client/issues/116
- This caused
- 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 https://github.com/jisotalo/ads-client/issues/116
- Reason was
Added
- Updated readme to include information about TypeScript types
- Thanks to Christian Rishøj
- 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
)