AddDeviceNotification
Connects a variable to the client. The client is indicated by an event.
HRESULT AddDeviceNotification(
long indexGroup,
long indexOffset,
long cbLenData,
ADSTRANSMODE transMode,
long nMaxDelay,
long nCycleTime,
long* phNotification
);
Parameter
indexGroup | [in] Variable of type long containing the index group of the variable to be written to. |
indexOffset | [in] Variable of type long containing the index offset of the variable to be written to. |
cbLenData | [in] Number of bytes to be read from the connected variable. |
transMode | [out] Mode, how the variable is connected with the type ADSTRANSMODE. |
nMaxDelay | [in] The time with a resolution of 100 ns after which a callback of the implemented _ITcAdsSyncEvent interface is expected. |
nCycleTime | [in] The time with a resolution of 100 ns how the variable is to be collected. |
phNotification | [out, retval] Pointer to the handle which alone identifies the connection to the variable. |
Comments
A nCycleTime= 10000 and nMaxDelay=100000 would get 10 values every 10 ms with the resolution of 1 ms.