WinCC Globale Sript - DCE FEL ČVUT v Praze
WinCC Globale Sript - DCE FEL ČVUT v Praze
WinCC Globale Sript - DCE FEL ČVUT v Praze
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Global Script C Actions and Functions<br />
Output field for<br />
- Search files<br />
- Compile all functions<br />
SITRAIN<br />
ST-BWINCCS /GlobalScript Page 3 Siemens AG © 2007<br />
Example of a Project Function and/or Standard Function<br />
0<br />
A function defined in the Global Script (Standard Functions:<br />
void BitSet(BOOL OnOff, char* lpszWordtag, WORD wbitnumber)<br />
{<br />
Switching on a motor:<br />
Events/ Mouse/ Left mouse button/ C function...<br />
BitSet ( 1, "MotorStatus", 2);<br />
/*Bit 2 is set in the “MotorStatus” tag, to reset the<br />
bit use: BitSet ( 0, “MotorStatus”, 2)*/<br />
WORD winput = 0; // Create local tags<br />
int iscreen = 1;<br />
winput = GetTagWord ( lpszWordtag ) ; // Read process tags<br />
iscreen