AdsLib
 All Classes Files Functions Variables Typedefs Macros Pages
Public Attributes | List of all members
AdsNotificationAttrib Struct Reference

This structure contains all the attributes for the definition of a notification. More...

#include <AdsDef.h>

Public Attributes

uint32_t cbLength
 
uint32_t nTransMode
 
uint32_t nMaxDelay
 
union {
   uint32_t   nCycleTime
 
   uint32_t   dwChangeFilter
 
}; 
 

Detailed Description

This structure contains all the attributes for the definition of a notification.

The ADS DLL is buffered from the real time transmission by a FIFO. TwinCAT first writes every value that is to be transmitted by means of the callback function into the FIFO. If the buffer is full, or if the nMaxDelay time has elapsed, then the callback function is invoked for each entry. The nTransMode parameter affects this process as follows:

ADSTRANS_SERVERCYCLE
The value is written cyclically into the FIFO at intervals of nCycleTime. The smallest possible value for nCycleTime is the cycle time of the ADS server; for the PLC, this is the task cycle time. The cycle time can be handled in 1ms steps. If you enter a cycle time of 0 ms, then the value is written into the FIFO with every task cycle.
ADSTRANS_SERVERONCHA
A value is only written into the FIFO if it has changed. The real-time sampling is executed in the time given in nCycleTime. The cycle time can be handled in 1ms steps. If you enter 0 ms as the cycle time, the variable is written into the FIFO every time it changes.

Warning: Too many read operations can load the system so heavily that the user interface becomes much slower.

Tip: Set the cycle time to the most appropriate values, and always close connections when they are no longer required.

Member Data Documentation

uint32_t AdsNotificationAttrib::cbLength

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

uint32_t AdsNotificationAttrib::nCycleTime

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

uint32_t AdsNotificationAttrib::nMaxDelay

The notification's callback function is invoked at the latest when this time has elapsed. The unit is 100 ns.

uint32_t AdsNotificationAttrib::nTransMode

ADSTRANS_SERVERCYCLE: The notification's callback function is invoked cyclically. ADSTRANS_SERVERONCHA: The notification's callback function is only invoked when the value changes.


The documentation for this struct was generated from the following file: