plcopen/structures.py
changeset 526 79900abdfa3c
parent 517 026ef159e8a2
child 541 24f111835805
equal deleted inserted replaced
525:e8d5ab0855d3 526:79900abdfa3c
    40     if len(mylist) > 0 :
    40     if len(mylist) > 0 :
    41         return reduce(lambda x, y: x + separator + y, mylist)
    41         return reduce(lambda x, y: x + separator + y, mylist)
    42     else :
    42     else :
    43         return mylist
    43         return mylist
    44 
    44 
    45 def generate_block(generator, block, body, link, order=False):
    45 def generate_block(generator, block, block_infos, body, link, order=False):
    46     body_type = body.getcontent()["name"]
    46     body_type = body.getcontent()["name"]
    47     name = block.getinstanceName()
    47     name = block.getinstanceName()
    48     type = block.gettypeName()
    48     type = block.gettypeName()
    49     executionOrderId = block.getexecutionOrderId()
    49     executionOrderId = block.getexecutionOrderId()
    50     block_infos = generator.GetBlockType(type)
       
    51     if block_infos["type"] == "function":
    50     if block_infos["type"] == "function":
    52         output_variables = block.outputVariables.getvariable()
    51         output_variables = block.outputVariables.getvariable()
    53         if not generator.ComputedBlocks.get(block, False) and not order:
    52         if not generator.ComputedBlocks.get(block, False) and not order:
    54             generator.ComputedBlocks[block] = True
    53             generator.ComputedBlocks[block] = True
    55             vars = []
    54             vars = []