# HG changeset patch # User jon # Date 1185523404 -7200 # Node ID 9bf197698af073b6cc9b5df4e8dc1d9ed423fd16 # Parent 7187e1c00975d7e5e72c2e9cf4623cf9b02b40e0 SVGUI Functions Blocks added diff -r 7187e1c00975 -r 9bf197698af0 PLCControler.py --- a/PLCControler.py Thu Jul 26 17:23:21 2007 +0200 +++ b/PLCControler.py Fri Jul 27 10:03:24 2007 +0200 @@ -852,14 +852,15 @@ if type == "function": blocktypes = [] for category in BlockTypes[:-1]: - cat = {"name" : category["name"], "list" : []} - for block in category["list"]: - if block["type"] == "function": - cat["list"].append(block) - if len(cat["list"]) > 0: - blocktypes.append(cat) + if category["name"] != "SVGUI function blocks": + cat = {"name" : category["name"], "list" : []} + for block in category["list"]: + if block["type"] == "function": + cat["list"].append(block) + if len(cat["list"]) > 0: + blocktypes.append(cat) else: - blocktypes = [category for category in BlockTypes[:-1]] + blocktypes = [category for category in BlockTypes[:-1] if category["name"] != "SVGUI function blocks"] if self.Project: blocktypes.append({"name" : "User-defined POUs", "list": []}) for blocktype in BlockTypes[-1]["list"]: diff -r 7187e1c00975 -r 9bf197698af0 plcopen/structures.py --- a/plcopen/structures.py Thu Jul 26 17:23:21 2007 +0200 +++ b/plcopen/structures.py Fri Jul 27 10:03:24 2007 +0200 @@ -120,7 +120,33 @@ {"name" : "RATIO_MONITOR", "type" : "functionBlock", "extensible" : False, "inputs" : [("PV1","REAL","none"),("PV2","REAL","none"),("RATIO","REAL","none"),("TIMON","TIME","none"),("TIMOFF","TIME","none"),("TOLERANCE","BOOL","none"),("RESET","BOOL","none"),("CYCLE","TIME","none")], "outputs" : [("ALARM","BOOL","none"),("TOTAL_ERR","BOOL","none")], - "comment" : "Ratio monitor\nThe ratio_monitor function block checks that one process value PV1 is always a given ratio (defined by input RATIO) of a second process value PV2."}, + "comment" : "Ratio monitor\nThe ratio_monitor function block checks that one process value PV1 is always a given ratio (defined by input RATIO) of a second process value PV2."} + ]}, + {"name" : "SVGUI function blocks", "list": + [{"name" : "Container", "type" : "functionBlock", "extensible" : False, + "inputs" : [("X","FLOAT","none"),("SetX","BOOL","none"),("Y","FLOAT","none"),("SetY","BOOL","none"),("Angle","FLOAT","none"),("SetAngle","BOOL","none")], + "outputs" : [("X","FLOAT","none"),("X Changed","BOOL","none"),("Y","FLOAT","none"),("Y Changed","BOOL","none"),("Angle","FLOAT","none"),("Angle Changed","BOOL","none")], + "comment" : "SVGUI Container"}, + {"name" : "Button", "type" : "functionBlock", "extensible" : False, + "inputs" : [("Show","BOOL","none"),("Toggle","BOOL","none")], + "outputs" : [("Visible","BOOL","none"),("State","BOOL","none")], + "comment" : "SVGUI Button"}, + {"name" : "TextCtrl", "type" : "functionBlock", "extensible" : False, + "inputs" : [("Text","STRING","none"),("Set Text","BOOL","none")], + "outputs" : [("Text","STRING","none"),("Text Changed","BOOL","none")], + "comment" : "SVGUI Text Control"}, + {"name" : "ScrollBar", "type" : "functionBlock", "extensible" : False, + "inputs" : [("Position","UINT","none"),("Set Position","BOOL","none")], + "outputs" : [("Position","UINT","none"),("Position Changed","BOOL","none")], + "comment" : "SVGUI ScrollBar"}, + {"name" : "NoteBook", "type" : "functionBlock", "extensible" : False, + "inputs" : [("Selected","UINT","none"),("Set Selected","BOOL","none")], + "outputs" : [("Selected","UINT","none"),("Selected Changed","BOOL","none")], + "comment" : "SVGUI Notebook"}, + {"name" : "RotatingCtrl", "type" : "functionBlock", "extensible" : False, + "inputs" : [("Angle","FLOAT","none"),("Set Angle","BOOL","none")], + "outputs" : [("Angle","FLOAT","none"),("Angle changed","BOOL","none")], + "comment" : "SVGUI Rotating Control"}, ]} ]