Commit 7b99e2c3 authored by Ivan Tyagov's avatar Ivan Tyagov

Add module entry point.

parent 692223fd
...@@ -172,8 +172,10 @@ def run_async_server(): ...@@ -172,8 +172,10 @@ def run_async_server():
StartTcpServer(context, identity=identity, address=("0.0.0.0", 502), StartTcpServer(context, identity=identity, address=("0.0.0.0", 502),
custom_functions=[CustomModbusRequest]) custom_functions=[CustomModbusRequest])
if __name__ == "__main__": def main():
"""
Main OSIE-PLC entry point.
"""
# switch OFF all relays # switch OFF all relays
mod_io.setRelayStateAllOff() mod_io.setRelayStateAllOff()
...@@ -182,3 +184,7 @@ if __name__ == "__main__": ...@@ -182,3 +184,7 @@ if __name__ == "__main__":
# switch off all # switch off all
mod_io.setRelayStateAllOff() mod_io.setRelayStateAllOff()
if __name__ == "__main__":
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment