"%d%d%s%f%d" are the type descriptions of the tags to be read.
"gs_tag_bit" is the tag to be read.
"&lValue1" is the address of the tags in which the value of the tags gs_tag_bit should be stored.
"gs_tag_SByte" is the tag to be read.
"&lValue2" is the address of the tags in which the value of the tags gs_tag_SByte should be
stored.
The other parameters are to be handled in the same way as those described previously.
1. Creating a DWord-Array with the required size (Number of tags).
2. Reading and storing the values of the tags. The value of the tags gs_tag_bit is stored
temporarily in lValue1. The value of the tags gs_tag_SByte is stored temporarily in lValue2,
etc.
3. Executing user-defined code for processing return values.
GetTagMultiWait example
DWORD dwVar1Value;
char* szVar2Value;
//Memory for the tag value is
//created by teh function with SysMalloc
double dbVar3Value;
BOOL ok;
ok=GetTagMultiWait("%d%s%f", "Ernie_word", &dwVar1Value,
"Ernie_char", &szVar2Value,
"Ernie_double", &dbVar3Value);
printf("Word %d, String %s, Double %f\r\n",
dwVar1Value, szVar2Value, dbVar3Value);
GetTagPrefix example
{
char* pszTagPrefix = NULL;
char szTagPrefix[7];
//Get the current tag prefix
pszTagPrefix = GetTagPrefix(lpszPictureName,"PicWindow1");
if(pszTagPrefix != NULL)
{
//Copy the string
strncpy(szTagPrefix,pszTagPrefix,6);
ANSI-C function descriptions
3.4 Appendix
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
1501