On_sys_init Event

Top  Previous  Next

The sys object provides a very important event- on_sys_init. This event is guaranteed to be generated first when your device starts running. Therefore, you should put all your initialization code for sockets, ports, .etc into the event handler for this event:

 

 

sub on_sys_init

 net.ip="192.168.1.95"

 sock.num=0

 sock.targetip= "192.168.1.96"

 '...and everything else that you may need!

end sub