Flowcode Project File Parser
Ben Rowland 2019 (C) Matrix TSL
Target Device
SCADA.SCADA.WEBEXP
Constants
Globals
Clear
Return: VOID
Vars: SIGNED LONG iTemp
STRING sTemp
FillRectangle
Return: VOID
Params: SIGNED LONG x0
SIGNED LONG y0
SIGNED LONG dx
SIGNED LONG dy
SIGNED LONG col
PlotLine
Return: VOID
Params: SIGNED LONG x0
SIGNED LONG y0
SIGNED LONG x1
SIGNED LONG y1
SIGNED LONG col
BYTE thickness
PlotPoint
Return: VOID
Params: SIGNED LONG x
SIGNED LONG y
SIGNED LONG col
ClearToColour
Return: VOID
Params: SIGNED LONG col
Vars: SIGNED LONG iTemp
STRING sTemp
Ev_Property
Return: UNSIGNED LONG
PickerToHex
Return: STRING
Params: STRING Str
Vars: BYTE StrDiff
BYTE StrLen
Ev_HtmlScriptHeader
Return: UNSIGNED LONG
Params: STRING CompID
STRING HeaderScript
Vars: FLOAT fSize
SIGNED LONG iTemp
STRING sTemp
Ev_HtmlBodyInfo
Return: UNSIGNED LONG
Params: STRING CompID
STRING BodyInfo
Vars: FLOAT fSize
FLOAT fPos
STRING sHeight
STRING sWidth
DrawRectangle
Return: VOID
Params: SIGNED LONG x0
SIGNED LONG y0
SIGNED LONG dx
SIGNED LONG dy
SIGNED LONG col
BYTE thickness
Main
Return: VOID
\'\'", 100, 1013);
ctx.drawImage(calc, 10, 1037);
ctx.fillText("Set return to zero to ensure text is added to html file", 60, 1051);
ctx.fillText(".Return = 0", 100, 1071);
ctx.drawImage(end, 10, 1095);
var canvas = document.getElementById("DrawRectangle");
var ctx = canvas.getContext("2d");
ctx.font = "12px Arial";
ctx.beginPath();
ctx.rect(0, 0, 1916, 199);
ctx.fillStyle = 'white';
ctx.fill();
ctx.fillStyle = 'black';
ctx.fillText("DrawRectangle", 1, 10);
ctx.drawImage(start, 10, 15);
ctx.drawImage(ccode, 10, 73);
ctx.fillText("Javascript for web export file", 60, 87);
ctx.fillText("const ctx = document.getElementById(FC_THIS).getContext(\'\'2d\'\'); let col = Number(FCL_COL); let sCol = \'\'#\'\' + col.toString(16).padStart(6,0); ctx.strokeStyle = sCol; ctx.lineWidth = FCL_THICKNESS; ctx.strokeRect(FCL_X0,FCL_Y0,FCL_DX,FCL_DY);", 100, 107);
ctx.drawImage(end, 10, 131);
var canvas = document.getElementById("Main");
var ctx = canvas.getContext("2d");
ctx.font = "12px Arial";
ctx.beginPath();
ctx.rect(0, 0, 410, 141);
ctx.fillStyle = 'white';
ctx.fill();
ctx.fillStyle = 'black';
ctx.fillText("Main", 1, 10);
ctx.drawImage(start, 10, 15);
ctx.drawImage(end, 10, 73);
};
Verison History
Version 0.6
12/09/19 BR - Created initial recursive parser
14/09/19 BR - Added support for disabled icons
18/09/19 BR - Fixed decision icon parsing
19/09/19 BR - Added switch icon support
23/09/19 BR - Fixed recursive loop spacing
27/09/19 BR - Further tweaked spacing and added Macro menu
30/09/19 BR - Improved all string spacing
01/10/19 BR - Improved While icon support