Asked — Edited
Resolved Resolved by DJ Sures!

Http_Server - As A Static Webpage?

Good Morning,

I would like some assistance with the setting up the HTTP_Server Command - that points to a Virtual Desktop, that acts like a Static WebPage, Is this possible?

Thanks Wayne


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

#25  

Ok. I will post the code tomorrow morning when I get to the office.

Thank You very much.

#26  

@thetechguru

Good Morning.

Here is the code that I wrote for the program.



#WITN External Controller SoftwareV1


:START
#init all values

$B1T1= ""
$B1T2= ""
$B1T3= ""
$B1T4= ""
$B1T5= ""
$B1T6= ""
$B2T1= ""
$B2T2= ""
$B2T3= ""
$B2T4= ""
$B2T5= ""
$B2T6= ""
$B2T7= ""
$B3T1= ""
$B3T2= ""
$B3T3= ""
$B3T4= ""
$B3T5= ""
$B3T6= ""
#####################
$daymode = ""
$twimode = ""
$nitemode = ""
#####################
$mode = ""
$flsh = ""


:READ
#Read Inputs to get status

$B1T1 = GetDigital(D0)
sleep(10)
$B1T2 = GetDigital(D1)
sleep(10)
$B1T3 = GetDigital(D2)
sleep(10)
$B1T4 = GetDigital(D3)
sleep(10)
$B1T5 = GetDigital(D4)
sleep(10)
$B1T6 = GetDigital(D5)
sleep(10)
$B2T1 = GetDigital(D6)
sleep(10)
$B2T2 = GetDigital(D7)
sleep(10)
$B2T3 = GetDigital(D8)
sleep(10)
$B2T4 = GetDigital(D9)
sleep(10)
$B2T5 = GetDigital(D10)
sleep(10)
$B2T6 = GetDigital(D11)
sleep(10)
$B2T7 = GetDigital(D12)
sleep(10)
$B3T1 = GetDigital(D13)
sleep(10)
$B3T2 = GetDigital(D14)
sleep(10)
$B3T3 = GetDigital(D15)
sleep(10)
$B3T4 = GetDigital(D16)
sleep(10)
$B3T5 = GetDigital(D17)
sleep(10)
$B3T6 = GetDigital(D18)
sleep(10)
$daymode = GetDigital(D19)
sleep(10)
$twimode = GetDigital(D20)
sleep(10)
$nitemode = GetDigital(D21)
sleep(10)
$mode= GetDigital(D22)
sleep(10)
$flsh = GetDigital(D23)

#CONVERT 0 or 1 to pass or fail

if ($B1T1 = 0)
$B1T1D = "PASS"
elseif ($B1T1 = 1)
$B1T1D = "FAIL"
endif

if ($B1T2 = 0)
$B1T2D = "PASS"
elseif ($B1T2 = 1)
$B1T2D = "FAIL"
endif

if ($B1T3 = 0)
$B1T3D = "PASS"
elseif ($B1T3 = 1)
$B1T3D = "FAIL"
endif

if ($B1T4 = 0)
$B1T4D = "PASS"
elseif ($B1T4 = 1)
$B1T4D = "FAIL"
endif

if ($B1T5 = 0)
$B1T5D = "PASS"
elseif ($B1T5 = 1)
$B1T5D = "FAIL"
endif

if ($B1T6 = 0)
$B1T6D = "PASS"
elseif ($B1T6 = 1)
$B1T6D = "FAIL"
endif


if ($B2T1 = 0)
$B2T1D = "PASS"
elseif ($B2T1 = 1)
$B2T1D = "FAIL"
endif

if ($B2T2 = 0)
$B2T2D = "PASS"
elseif ($B2T2 = 1)
$B2T2D = "FAIL"
endif

if ($B2T3 = 0)
$B2T3D = "PASS"
elseif ($B2T3 = 1)
$B2T3D = "FAIL"
endif

if ($B2T4 = 0)
$B2T4D = "PASS"
elseif ($B2T4 = 1)
$B2T4D = "FAIL"
endif

if ($B2T5 = 0)
$B2T5D = "PASS"
elseif ($B2T5 = 1)
$B2T5D = "FAIL"
endif

if ($B2T6 = 0)
$B2T6D = "PASS"
elseif ($B2T6 = 1)
$B2T6D = "FAIL"
endif

if ($B2T7 = 0)
$B2T7D = "PASS"
elseif ($B2T7 = 1)
$B2T7D = "FAIL"
endif

if ($B3T1 = 0)
$B3T1D = "PASS"
elseif ($B3T1 = 1)
$B3T1D = "FAIL"
endif

if ($B3T2 = 0)
$B3T2D = "PASS"
elseif ($B3T2 = 1)
$B3T2D = "FAIL"
endif

if ($B3T3 = 0)
$B3T3D = "PASS"
elseif ($B3T3 = 1)
$B3T3D = "FAIL"
endif

if ($B3T4 = 0)
$B3T4D = "PASS"
elseif ($B3T4 = 1)
$B3T4D = "FAIL"
endif

if ($B3T5 = 0)
$B3T5D = "PASS"
elseif ($B3T5 = 1)
$B3T5D = "FAIL"
endif

if ($B3T6 = 0)
$B3T6D = "PASS"
elseif ($B3T6 = 1)
$B3T6D = "FAIL"
endif

if ($daymode = 1)
$daymodeD = "YES"
else 
$daymodeD = ""
EndIf 

if ($twimode = 1)
$twimodeD = "YES"
else 
$twimodeD = ""
endif

if ($nitemode = 1)
$nitemodeD = "YES"
else 
$nitemodeD = ""
endif 


#WHAT TO DO IN CASE OF FAILURE


if ($B1T1 OR $B1T2 OR $B1T3 OR $B1T4 OR $B1T5 OR $B1T6= 1)
$FAA = "CALL FAA AT 1-877-487-6867"
ELSE 
$FAA = ""
endif

if ($B2T1 OR $B2T2 OR $B2T3 OR $B2T4 OR $B2T5 OR $B2T6 OR $B2T7= 1)
$FAA = "CALL FAA AT 1-877-487-6867"
ELSE 
$FAA = ""
endif

if ($B3T1 OR $B3T2 OR $B3T3 OR $B3T4 OR $B3T5 OR $B3T6= 1)
$FAA = "CALL FAA AT 1-877-487-6867"
ELSE 
$FAA = ""
endif

goto(READ)


Any and all help that could be done would be most appreciate.

I know in the other forum post the code was cleaned up by other users. I need to take the time and work on that.

#27  

As long as the variable names stay the same, it should be pretty easy to make a web page. If DJ doesn't respond by the end of the day to my question about Custom HTTP syntax for displaying variables, I'll start looking into an alternate way to do it that would work either in Custom HTTP or any other web server.

Alan

#28  

Thanks for all of your help so far.

PRO
Synthiam
#29  

Last night on my flight I made changes to the http server to display variables and digital port status. I'll update ARC either this evening or tomorrow with the changes.

#30  

@DJ. Wow! That is awesome! Thank You!

#31  

@DJ Thanks much. Saved me a lot of head scratching too..

Alan