Edit the cicode functions _tagDebugRead()
and _tagDebugWrite() found in the TAG.CI library file of the
Include project as follows:
/*
** _tagDebugRead()
**
** Callback for Read button. This function will read the tag
** from the I/O Device and display on the form.
*/
INT
FUNCTION
_tagDebugRead()
INT pos1;
INT pos2;
INT index;
index = 0;
FormGetData(hForm);
pos1 = StrSearch(0, sTag, "[");
IF pos1 > 0 THEN
pos2 = StrSearch(0, sTag,
"]");
IF pos2 > 0 THEN
index =
StrToInt(StrMid(sTag, pos1 + 1, pos2 - pos1 - 1));
END
ELSE
pos1 = StrLength(sTag);
END
sValue = TagRead(StrLeft(sTag, pos1), index);
FormSetData(hForm);
RETURN 0;
END
/*
** _tagDebugWrite()
**
** Callback for Write button. This function will write to the
** I/O Device from the value in the form.
*/
INT
FUNCTION
_tagDebugWrite()
INT pos1;
INT pos2;
INT index;
index = 0;
FormGetData(hForm);
pos1 = StrSearch(0, sTag, "[");
IF pos1 > 0 THEN
pos2 = StrSearch(0, sTag,
"]");
IF pos2 > 0 THEN
index =
StrToInt(StrMid(sTag, pos1 + 1, pos2 - pos1 - 1));
END
ELSE
pos1 = StrLength(sTag);
END
TagWrite(StrLeft(sTag, pos1), sValue, index);
RETURN 0;
END
|