1. Why aren't you using Sleep(3000)? I am waiting writed data to PLC.
2. Why aren't you using jServer to build a real http server? I have use server as following
B4X:
Sub Process_Globals
Private srvr As Server
Private timer1 As Timer
End Sub
Sub AppStart (Args() As String)
plc.Initialize
'
srvr.Initialize("srvr")
srvr.Port = 8010
srvr.AddHandler("/put", "PutHandler", False)
srvr.AddHandler("/get", "GetHandler", False)
srvr.Start
Log($"Server started by ${srvr.Port}"$)
timer1.Initialize("timer1",250)
timer1.Enabled=True
StartMessageLoop
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.