Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly handle ADS error 1812: Device Notify Handle Invalid (Onlinechange, Release handle and get a new one) #234

Open
xin-tsla opened this issue Sep 19, 2024 · 3 comments

Comments

@xin-tsla
Copy link

Hi All,
Wondering when encounter this error, it seems not easy to create a new one, the reason is that when receiving the handle id, there is no context info of which path in PLC we could re-create handle id for.
Is there any way to know which path for the handle it to be able to re-create?
Thanks!

@soberschmidt
Copy link
Contributor

soberschmidt commented Sep 20, 2024

Hi,
I would recommend to persist the PLC symbol on creation of the handles to cover this scenario. Furthermore I would observe the online change counter (Tc3 symbol path: TwinCAT_SystemInfoVarList._AppInfo.OnlineChangeCnt) and the symbol version (ADS Read command with IndexGroup ADSIGRP_SYM_VERSION (0xF008), Offset 0, size = 1 byte). If one of both will change (e.g. online change), I would recommend to release all handles/notifications and create new ones.

@xin-tsla
Copy link
Author

Hi @soberschmidt ,
Thanks for the info! I will give it a try.

@xin-tsla
Copy link
Author

Hi @soberschmidt ,
Wondering when TwinCAT_SystemInfoVarList._AppInfo.OnlineChangeCnt will be changed to 0?
How twincat know the client side release all handles and reset the counter to 0?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants