# HG changeset patch # User laurent # Date 1302943363 -7200 # Node ID 7ac133b1132121e4c0d1d6ed4ced4cb3408ddeda # Parent e307e1b278282305b15051d01f44d2ceafe33680 Fix bug in block with execution control generation fixed diff -r e307e1b27828 -r 7ac133b11321 PLCGenerator.py --- a/PLCGenerator.py Thu Apr 14 14:52:05 2011 +0200 +++ b/PLCGenerator.py Sat Apr 16 10:42:43 2011 +0200 @@ -758,7 +758,7 @@ self.RelatedConnections.append(related) undefined_blocks.append(instance) for instance in undefined_blocks: - block_infos = self.GetBlockType(instance.gettypeName(), tuple([self.ConnectionTypes.get(variable.connectionPointIn, "ANY") for variable in instance.inputVariables.getvariable()])) + block_infos = self.GetBlockType(instance.gettypeName(), tuple([self.ConnectionTypes.get(variable.connectionPointIn, "ANY") for variable in instance.inputVariables.getvariable() if variable.getformalParameter() != "EN"])) if block_infos is not None: self.ComputeBlockInputTypes(instance, block_infos, body) else: @@ -878,7 +878,7 @@ elif isinstance(instance, plcopen.fbdObjects_block): block_type = instance.gettypeName() self.ParentGenerator.GeneratePouProgram(block_type) - block_infos = self.GetBlockType(block_type, tuple([self.ConnectionTypes.get(variable.connectionPointIn, "ANY") for variable in instance.inputVariables.getvariable()])) + block_infos = self.GetBlockType(block_type, tuple([self.ConnectionTypes.get(variable.connectionPointIn, "ANY") for variable in instance.inputVariables.getvariable() if variable.getformalParameter() != "EN"])) block_infos["generate"](self, instance, block_infos, body, None) elif isinstance(instance, plcopen.commonObjects_connector): connector = instance.getname() @@ -933,7 +933,7 @@ elif isinstance(next, plcopen.fbdObjects_block): block_type = next.gettypeName() self.ParentGenerator.GeneratePouProgram(block_type) - block_infos = self.GetBlockType(block_type, tuple([self.ConnectionTypes.get(variable.connectionPointIn, "ANY") for variable in next.inputVariables.getvariable()])) + block_infos = self.GetBlockType(block_type, tuple([self.ConnectionTypes.get(variable.connectionPointIn, "ANY") for variable in next.inputVariables.getvariable() if variable.getformalParameter() != "EN"])) paths.append(str(block_infos["generate"](self, next, block_infos, body, connection, order))) elif isinstance(next, plcopen.commonObjects_continuation): name = next.getname()