Questo sito utilizza i cookie per migliorare servizi ed esperienza degli utenti. Se decidi di continuare la navigazione consideriamo che accetti il loro uso.

Panoramica Cerca Sopra
Dettagli del download
Sample07: Receiving ADS Notificat Sample07: Receiving ADS Notifications
(0 voti)

This demo describes how to receive ADS notifications in a TwinCAT C++ module.

For this the solution contains 2 modules

A C++ module, which registers for retrieving ADS notifications of a variable.
For easy understanding: A PLC program, which provides a variable “MAIN.PlcVar”.
If its value is changes, an ads notification will be sent to the C++ module.
The C++ module makes use of the logging capabilities – so for understanding the code, please simply start the sample and look at the Output / Error log if you change the value of PLC module’s “Main.PlcVar”.
 

Within the module transition PREOP->SAFEOP ( “SetObjStatePS”) the address is prepared. The “CycleUpdate” method contains a simple state machine, sending the required ADS commands. Corresponding Methods indicate the received confirmations.

The inherited and overloaded method “AdsDeviceNotificationInd” will be called upon arrival of a notification.

During shutdown ADS messages for deregistration are sent out in transition (“SetObjStateOS”) and the module waits for arrival of confirmations until a timeout occurs.

Informazioni

Versione:
Dimensione205.57 KB
Downloads0
Lingua
Licenza
Autore
Sito Web
Prezzo
Creato17-02-2015
Creato da
Modificato il17-02-2015
Modificato daroby

Solo gli utenti registrati e loggati possono scaricare questo file.

.

.