[r76]: / branches / timvh / example / CODESYS_Control / Plc Logic / AppLowMemory / FB_ParseRecipeData / svnobj  Maximize  Restore  History

Download this file

23 lines (22 with data), 9.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
CASE _iParseStep OF
    0: // read file and write into buffer
        IF xParse THEN
            xParsingBusy := TRUE;
            // in this case always go to the start of the buffer.
            _Xml.ClearBuffer();
                stRecipe.usiPreperationTime := TO_USINT(_Xml.GetTagData());
            ELSIF _Xml.sTagsSeek = '/recipe/cooktime' THEN
                stRecipe.usiTotalTime := TO_USINT(_Xml.GetTagData());
            ELSIF _Xml.sTagsSeek = '/recipe/ingredient/li' THEN
    udiStartPos : UDINT; // start pos where selected recipe data can be found
END_VAR
VAR_OUTPUT
    xParsingDone : BOOL;
    xParsingBusy : BOOL;
    xParsingError : BOOL;
VAR_IN_OUT
    stRecipe : ST_RECIPE;
VAR
	_Xml : FB_XmlControl;
	szFilename : STRING := './AppLowMemory/recipes.xml';
	// select your buffertype