# HG changeset patch # User greg # Date 1242977242 -7200 # Node ID 20ccf1e5266eeb5af20865c2334903fed4b9e8e9 # Parent f2be2307d666ceae63beac4215ea6450b4b1e2c9 Allow usage of FunctionBlock without output diff -r f2be2307d666 -r 20ccf1e5266e plcopen/structures.py --- a/plcopen/structures.py Fri May 22 09:26:35 2009 +0200 +++ b/plcopen/structures.py Fri May 22 09:27:22 2009 +0200 @@ -133,7 +133,8 @@ if not connectionPoint or block.getx() + blockPointx == connectionPoint.getx() and block.gety() + blockPointy == connectionPoint.gety(): output_info = (generator.TagName, "block", block.getlocalId(), "output", i) return generator.ExtractModifier(variable, [("%s.%s"%(name, variable.getformalParameter()), output_info)], output_info) - raise ValueError, "No output variable found" + if link is not None: + raise ValueError, "No output variable found" def initialise_block(type, name, block = None): return [(type, name, None, None)]