Beckhoff / ADS

Beckhoff protocol to communicate with TwinCAT devices.
MIT License
502 stars 194 forks source link

Checking if symbol table has changed #90

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi,

I was wondering if there is a function that can be called to poll if the symbol table has changed as an alternative to using a callback?

Thank you, Patrick

soberschmidt commented 5 years ago

Hi Patrick, you can register a notification or poll the online change counter, which will be incremented with every online change: TC3 symbol TwinCAT_SystemInfoVarList._AppInfo.OnlineChangeCnt.

If a new program is downloaded, the symbol version will be incremented. The symbol version can be polled by an AdsRead-Request to Indexgroup=0xF008 Offset=0 Bytelength=1.

Best Regards, Sven

ghost commented 5 years ago

Thank you!

-Patrick


From: Sven Oberschmidt notifications@github.com Sent: Friday, May 24, 2019 4:04 AM To: Beckhoff/ADS Cc: Thomas, Patrick; Author Subject: Re: [Beckhoff/ADS] Checking if symbol table has changed (#90)

Hi Patrick, you can register a notification or poll the online change counter, which will be incremented with every online change: TC3 symbol TwinCAT_SystemInfoVarList._AppInfo.OnlineChangeCnt.

If a new program is downloaded, the symbol version will be incremented. The symbol version can be polled by an AdsRead-Request to Indexgroup=0xF008 Offset=0 Bytelength=1.

Best Regards, Sven

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Beckhoff/ADS/issues/90?email_source=notifications&email_token=ADHMBUIDRVZBZDDBY3TZSUTPW7DVNA5CNFSM4HLVJLV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWE6KAY#issuecomment-495576323, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADHMBUKGGIKWHDTRGSM5DODPW7DVNANCNFSM4HLVJLVQ.