equal
deleted
inserted
replaced
42 generator.GeneratePouProgram(type) |
42 generator.GeneratePouProgram(type) |
43 vars = [] |
43 vars = [] |
44 for variable in block.inputVariables.getVariable(): |
44 for variable in block.inputVariables.getVariable(): |
45 connections = variable.connectionPointIn.getConnections() |
45 connections = variable.connectionPointIn.getConnections() |
46 if connections and len(connections) == 1: |
46 if connections and len(connections) == 1: |
47 if body_type == "FBD": |
47 if body_type == "FBD" or body_type == "SFC": |
48 value = generator.ComputeFBDExpression(body, connections[0]) |
48 value = generator.ComputeFBDExpression(body, connections[0]) |
49 elif body_type == "LD": |
49 elif body_type == "LD": |
50 paths = generator.GenerateLDPaths(variable.connectionPointIn.getConnections(), body) |
50 paths = generator.GenerateLDPaths(variable.connectionPointIn.getConnections(), body) |
51 if len(paths) > 0: |
51 if len(paths) > 0: |
52 paths = tuple(paths) |
52 paths = tuple(paths) |
61 vars = [] |
61 vars = [] |
62 for variable in block.inputVariables.getVariable(): |
62 for variable in block.inputVariables.getVariable(): |
63 connections = variable.connectionPointIn.getConnections() |
63 connections = variable.connectionPointIn.getConnections() |
64 if connections and len(connections) == 1: |
64 if connections and len(connections) == 1: |
65 parameter = variable.getFormalParameter() |
65 parameter = variable.getFormalParameter() |
66 if body_type == "FBD": |
66 if body_type == "FBD" or body_type == "SFC": |
67 value = generator.ComputeFBDExpression(body, connections[0]) |
67 value = generator.ComputeFBDExpression(body, connections[0]) |
68 vars.append("%s := %s"%(parameter, generator.ExtractModifier(variable, value))) |
68 vars.append("%s := %s"%(parameter, generator.ExtractModifier(variable, value))) |
69 elif body_type == "LD": |
69 elif body_type == "LD": |
70 paths = generator.GenerateLDPaths(variable.connectionPointIn.getConnections(), body) |
70 paths = generator.GenerateLDPaths(variable.connectionPointIn.getConnections(), body) |
71 if len(paths) > 0: |
71 if len(paths) > 0: |