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
Sample19: Synchronous File Ac Sample19: Synchronous File Access
(0 voti)

This demo describes how to access files via the TwinCAT "ITCFileAccess" Interface. The access is synchronous and could for example be used to read configuration upon startup of a module.

The sample contains one C++ Module “TcFileTestDrv” with an instance of that module “TcFileTestDrv_Obj1”.
Within this example file access is done in the “PREOP to SAFEOP” transition, thus within the "SetObjStatePS()" method.

Helper methods encapsulate the file handling itself.
As demonstration first general file-information and a directory listing is printed to the logging facility of TwinCAT 3. Afterwards a file “%TC_TARGETPATH%DefaultConfig.xml” (usually “C:TwinCAT3.xTargetDefaultConfig.xml”) is copied to "%TC_TARGETPATH%DefaultConfig.xml.bak"

For accessing the log entries, please see the tab “Error List” of the Output window of TwinCAT 3.
You could adjust the verbosity by changing the TraceLevelMax variable at the instance “TcFileTestDrv_obj1” within the tab “Parameter (Init)”.

Informazioni

Versione:
Dimensione25.9 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.

.

.