plcopen/structures.py
changeset 247 4a47ccafbef7
parent 242 5b3e1c4569e6
child 250 e6b58eafef1a
equal deleted inserted replaced
246:9cf9694e8d66 247:4a47ccafbef7
   172                 {"name" : "TP", "type" : "functionBlock", "extensible" : False, 
   172                 {"name" : "TP", "type" : "functionBlock", "extensible" : False, 
   173                     "inputs" : [("IN","BOOL","none"),("PT","TIME","none")], 
   173                     "inputs" : [("IN","BOOL","none"),("PT","TIME","none")], 
   174                     "outputs" : [("Q","BOOL","none"),("ET","TIME","none")],
   174                     "outputs" : [("Q","BOOL","none"),("ET","TIME","none")],
   175                     "comment" : "Pulse timer\nThe pulse timer can be used to generate output pulses of a given time duration.",
   175                     "comment" : "Pulse timer\nThe pulse timer can be used to generate output pulses of a given time duration.",
   176                     "generate" : generate_block, "initialise" : initialise_block},
   176                     "generate" : generate_block, "initialise" : initialise_block},
   177                 {"name" : "TOF", "type" : "functionBlock", "extensible" : False, 
   177                 {"name" : "TON", "type" : "functionBlock", "extensible" : False, 
   178                     "inputs" : [("IN","BOOL","none"),("PT","TIME","none")], 
   178                     "inputs" : [("IN","BOOL","none"),("PT","TIME","none")], 
   179                     "outputs" : [("Q","BOOL","none"),("ET","TIME","none")],
   179                     "outputs" : [("Q","BOOL","none"),("ET","TIME","none")],
   180                     "comment" : "On-delay timer\nThe on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true.",
   180                     "comment" : "On-delay timer\nThe on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true.",
   181                     "generate" : generate_block, "initialise" : initialise_block},
   181                     "generate" : generate_block, "initialise" : initialise_block},
   182                 {"name" : "TON", "type" : "functionBlock", "extensible" : False, 
   182                 {"name" : "TOF", "type" : "functionBlock", "extensible" : False, 
   183                     "inputs" : [("IN","BOOL","none"),("PT","TIME","none")], 
   183                     "inputs" : [("IN","BOOL","none"),("PT","TIME","none")], 
   184                     "outputs" : [("Q","BOOL","none"),("ET","TIME","none")],
   184                     "outputs" : [("Q","BOOL","none"),("ET","TIME","none")],
   185                     "comment" : "Off-delay timer\nThe off-delay timer can be used to delay setting an output false, for fixed period after input goes false.",
   185                     "comment" : "Off-delay timer\nThe off-delay timer can be used to delay setting an output false, for fixed period after input goes false.",
   186                     "generate" : generate_block, "initialise" : initialise_block},
   186                     "generate" : generate_block, "initialise" : initialise_block},
   187                 {"name" : "RTC", "type" : "functionBlock", "extensible" : False, 
   187                 {"name" : "RTC", "type" : "functionBlock", "extensible" : False, 
   584 
   584 
   585 
   585 
   586 # Keywords for Instruction List
   586 # Keywords for Instruction List
   587 IL_KEYWORDS = ["TRUE", "FALSE", "LD", "LDN", "ST", "STN", "S", "R", "AND", "ANDN", "OR", "ORN",
   587 IL_KEYWORDS = ["TRUE", "FALSE", "LD", "LDN", "ST", "STN", "S", "R", "AND", "ANDN", "OR", "ORN",
   588  "XOR", "XORN", "NOT", "ADD", "SUB", "MUL", "DIV", "MOD", "GT", "GE", "EQ", "NE",
   588  "XOR", "XORN", "NOT", "ADD", "SUB", "MUL", "DIV", "MOD", "GT", "GE", "EQ", "NE",
   589  "LE", "LT", "JMP", "JMPC", "JMPNC", "CAL", "CALC", "CALNC", "RET", "RETC", "RETNC"]
   589  "LE", "LT", "JMP", "JMPC", "JMPCN", "CAL", "CALC", "CALCN", "RET", "RETC", "RETCN"]
   590 
   590 
   591 
   591 
   592 # Keywords for Structured Text
   592 # Keywords for Structured Text
   593 ST_KEYWORDS = ["TRUE", "FALSE", "IF", "THEN", "ELSIF", "ELSE", "END_IF", "CASE", "OF", "END_CASE", 
   593 ST_KEYWORDS = ["TRUE", "FALSE", "IF", "THEN", "ELSIF", "ELSE", "END_IF", "CASE", "OF", "END_CASE", 
   594  "FOR", "TO", "BY", "DO", "END_FOR", "WHILE", "DO", "END_WHILE", "REPEAT", "UNTIL", 
   594  "FOR", "TO", "BY", "DO", "END_FOR", "WHILE", "DO", "END_WHILE", "REPEAT", "UNTIL",