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

AdsNotificationAttrib #9

Closed
Satheesh-satz opened this issue Oct 8, 2015 · 3 comments
Closed

AdsNotificationAttrib #9

Satheesh-satz opened this issue Oct 8, 2015 · 3 comments

Comments

@Satheesh-satz
Copy link

Hi,
Could you please help me to understand the event notification related queries

AdsNotificationAttrib::cbLength : Length of the data that is to be passed to the callback function.

What would be the length of cbLength data of the AdsNotificationAttrib structure variable passed as a
parameter to register a notification via a call to the AdsSyncAddDeviceNotificationReq

is this related to the

AdsSyncAddDeviceNotificationReq::hUser parameter
[in] 32-bit value that is passed to the callback function.
if yes, it would be 4 bytes value always right?

So, What kind of data would be passed back to the callback function via pNotification->data and what would be the size of the data?

How to handle if i require more than 550 notification?

nCycleTime
The ADS server checks whether the variable has changed after this time interval. The unit is 100 ns.

What would be the time delay if i registered for 100 notification with the nCycleTime set to 100ns?

@soberschmidt
Copy link
Contributor

Please check the spec: http://infosys.beckhoff.de/index.php?content=../content/1033/tcadsdll2/html/tcadsdll_funcadssyncadddevicenotificationreq.htm&id=21801

The limitation is only related to our TcAdsDll for windows. But keep in mind that notifications cost time. ADS isn't a fieldbus. The delay isn't predictable. But you get an exact timestamp by the notification.

@Satheesh-satz
Copy link
Author

Hi Sven,

Sorry about not being clear, My questions are ...

Question 1:
From the spec : http://infosys.beckhoff.com/english.php?content=../content/1033/tcadsdll2/html/TcAdsDll_StrucAmsAddr.htm&id=

The hUser parameter to the function "AdsSyncAddDeviceNotificationReq" says
hUser
[in] 32-bit value that is passed to the callback function.

I understand that from the sample provided at the following link

http://infosys.beckhoff.com/english.php?content=../content/1033/tcsample_vc/html/tcadsdll_api_cpp_sample08.htm&id=

That it is the handle to the plc variable name, but my question here is what if i want to use the index group and offset value instead of passing the handle to the variable name.

Question 2:
And the spec : http://infosys.beckhoff.com/english.php?content=../content/1033/tcadsdll2/html/TcAdsDll_StrucAdsNotificationAttrib.htm&id=

The cbLength AdsNotificationAttrib structure member variable says

cbLength
Length of the data that is to be passed to the callback function.

I understand the callback function will be called with "AdsNotificationHeader* pNotification" and the pNotification->data will be have the change in value. is that right?

If yes, what if i set cbLength to a value of 12 or more than 4 bytes, how does this affect the data passed back to the call back function.

@soberschmidt
Copy link
Contributor

Q1: Indexgroup and Offset can also be used to announce a notification
Q2: Our TcAdsDll.dll for Windows OSs differs to our OpenSource AdsLib to provide a wider range of architecture support. Please use the structure information of our AdsLib.

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