Herunterladen Inhalt Inhalt Diese Seite drucken

Digitronic Automationsanlagen DigiWEB Bedienungsanleitung Seite 34

C-schnittstelle
Vorschau ausblenden Andere Handbücher für DigiWEB:
Inhaltsverzeichnis

Werbung

DigiWEB
C-Schnittstelle
Beispiel:
typedef struct
{
long Diagrammfield[50];
}tAppData;
tAppData AppData= {0};
const tDigiWebSymbol DigiWebSymbols[]=
{
DIGIWEBSYMBOL_LA_(tAppData, SECURITY_NONE, Diagrammfield, 10),
0
};
static long DigiWebGetDiagrammValue(EMUPARAMETER *emuparameter,size_t x)
{
long c=0;
long *p=emuparameter->g.opt.pField;
if((long)x<emuparameter->g.opt.XEnd)
c=p[x];
return c;
}
uintcpu DigiWebG(EMUPARAMETER *emuparameter,const char *str)
{
if(!strcmp(str, "##DiaTest[##X]"))
{
emuparameter->g.opt.DiaXPrg=&DigiWebGetDiagrammValue;
emuparameter->g.opt.pField=AppData.Diagrammfield;
emuparameter->g.opt.shift=0;
emuparameter->g.opt.bitmask=0xffffffff;
emuparameter->g.opt.XEnd=FIELDCOUNT(AppData.Diagrammfield);
emuparameter->g.opt.diacount=-emuparameter->g.opt.XEnd;
return true;
}
return false;
}
Seite 34 von 44
Automationsanlagen GmbH
Digitronic
3. Juni 2011

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis