Jump to content

Component: Webserver (EB023 v1) (E-blocks 1): Difference between revisions

From Flowcode Help
XML import - Pre 8.0 release
 
No edit summary
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| Matrix TSL
| Matrix TSL
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 2.0 (Release)
| 2.0
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| E-blocks 1
| E-blocks 1
|}
|}




==Webserver component==
Webserver component designed to work with the NM7010A module from Wiznet, as used in the version 1 EB023 E-block. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.


==[[File:Component Icon c0a18557_a477_4d5a_b9ca_e0724378d983.png|Image]] Webserver (EB023 v1) component==
==Component Source Code==
Webserver component designed to work with the NM7010A module from Wiznet,
as used in the version 1 EB023 E-block.
Provides a very simple interface to allow webpages to be hosted from hardware or simulation.


==Examples==
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_WebServer_EB023-00-1_EB.fcfx FC_Comp_Source_WebServer_EB023-00-1_EB.fcfx]
''<span style="color:red;">No additional examples</span>''


==Detailed description==


==Downloadable macro reference==
''No detailed description exists yet for this component''


===<span style="font-weight: normal;"><u><tt>SetOutValue</tt></u></span>===
==Examples==
Set the value of an outbound substitution string


'''Parameters'''


:[[Variable Types|BYTE]] ''index''
''<span style="color:red;">No additional examples</span>''


:[[Variable Types|<- STRING]] ''value''
::''This parameter may be returned back to the caller''


==Downloadable macro reference==


'''Return value'''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetOutValue'''
|-
| colspan="2" | Set the value of an outbound substitution string&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | index
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | value
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:''This call does not return a value''


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page4'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


===<span style="font-weight: normal;"><u><tt>GetInValue</tt></u></span>===
Returns the string value of a Request parameter


'''Parameters'''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page3'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|BYTE]] ''index''


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page2'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Return value'''


:[[Variable Types|STRING]]
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page1'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===<span style="font-weight: normal;"><u><tt>CreateServerSocket</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Creates a listening socket on the selected channel and port ready to accept incoming web page requests.
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetInValue'''
|-
| colspan="2" | Returns the string value of a Request parameter&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | index
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''Channel''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateServerSocket'''
|-
| colspan="2" | Creates a listening socket on the selected channel and port ready to accept incoming web page requests.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Port_Hi
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Port_Lo
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|BYTE]] ''Port_Hi''


:[[Variable Types|BYTE]] ''Port_Lo''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IncRxPtr'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Return value'''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
:[[Variable Types|BYTE]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckSocketActivity'''
 
|-
===<span style="font-weight: normal;"><u><tt>CheckSocketActivity</tt></u></span>===
| colspan="2" | Checks for activity on the server socket and serves out the webpages to any requesting parties.&nbsp;
Checks for activity on the server socket and serves out the webpages to any requesting parties.
|-
 
|-
'''Parameters'''
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
:''This macro has no parameters''
|}
 
 
'''Return value'''
 
:[[Variable Types|BYTE]]
 
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
Resets and initialises the Internet E-Block. It sets up the gateway address, subnet mask, device IP address and device MAC address as defined in the properties of the Flowcode component. This macro must be called before any other TCP_IP component macros
 
'''Parameters'''
 
:''This macro has no parameters''
 
 
'''Return value'''
 
:''This call does not return a value''




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
| colspan="2" | Resets and initialises the Internet E-Block. It sets up the gateway address, subnet mask, device IP address and device MAC address as defined in the properties of the Flowcode component. This macro must be called before any other TCP_IP component macros &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


==Simulation macro reference==


''This component does not contain any simulation macros''




==Property reference==
==Property reference==
<span style="font-weight: normal;"><u>Label</u></span>


This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
Label used to help identify the component on the panel.
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
<span style="font-weight: normal;"><u>Max Channels</u></span>
|-
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''max_channels''.
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
| width="90%" | Label
Max number of concurrent channels allowed
|-
 
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
<span style="font-weight: normal;"><u>I2C Address</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''MAC_WR_ADDR''.
| width="90%" | Max Channels
 
|-
I2C address of the module - bit 0
| colspan="2" | Max number of concurrent channels allowed&nbsp;
 
|-
<span style="font-weight: normal;"><u>HTML Source</u></span>
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | I2C Address
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''html_source''.
|-
 
| colspan="2" | I2C address of the module - bit 0&nbsp;
Sets the method for streaming data, we can either host it loacally using a property or refer to external files.
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>Max Pages</u></span>
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | HTML Source
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''max_pages''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Maximum number of pages we can serve using the embedded page type webserver.
| width="90%" | HTML Source
 
|-
<span style="font-weight: normal;"><u>Name Page 1</u></span>
| colspan="2" | Sets the method for streaming data, we can either host it loacally using a property or refer to external files.&nbsp;
 
|-
This property is of type ''Line of text'' and can be referenced with the variable name ''name1''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Max Pages
Name of HTML page 1 - index.htm is the default page that will be presented.
|-
 
| colspan="2" | Maximum number of pages we can serve using the embedded page type webserver.&nbsp;
<span style="font-weight: normal;"><u>HTML Page 1</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html1''.
| width="90%" | Name Page 1
 
|-
Embedded HTML code used for page 1
| colspan="2" | Name of HTML page 1 - index.htm is the default page that will be presented.&nbsp;
 
|-
<span style="font-weight: normal;"><u>Name Page 2</u></span>
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 1
This property is of type ''Line of text'' and can be referenced with the variable name ''name2''.
|-
 
| colspan="2" | Embedded HTML code used for page 1&nbsp;
Name of HTML page 2
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
<span style="font-weight: normal;"><u>HTML Page 2</u></span>
| width="90%" | Name Page 2
 
|-
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html2''.
| colspan="2" | Name of HTML page 2&nbsp;
 
|-
Embedded HTML code used for page 2
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 2
<span style="font-weight: normal;"><u>Name Page 3</u></span>
|-
 
| colspan="2" | Embedded HTML code used for page 2&nbsp;
This property is of type ''Line of text'' and can be referenced with the variable name ''name3''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
Name of HTML page 3
| width="90%" | Name Page 3
 
|-
<span style="font-weight: normal;"><u>HTML Page 3</u></span>
| colspan="2" | Name of HTML page 3 &nbsp;
 
|-
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html3''.
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 3
Embedded HTML code used for page 3
|-
 
| colspan="2" | Embedded HTML code used for page 3 &nbsp;
<span style="font-weight: normal;"><u>Name Page 4</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Line of text'' and can be referenced with the variable name ''name4''.
| width="90%" | Name Page 4
 
|-
Name of HTML page 4
| colspan="2" | Name of HTML page 4&nbsp;
 
|-
<span style="font-weight: normal;"><u>HTML Page 4</u></span>
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 4
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html4''.
|-
 
| colspan="2" | Embedded HTML code used for page 4&nbsp;
Embedded HTML code used for page 4
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>Channel</u></span>
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_i2c::CHANNEL''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Channel selection
| width="90%" | Channel
 
|-
<span style="font-weight: normal;"><u>Baud Select</u></span>
| colspan="2" | Channel selection&nbsp;
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_i2c::BAUD_LIST''.
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Baud Select
Baud rate option selector
|-
 
| colspan="2" | Baud rate option selector&nbsp;
<span style="font-weight: normal;"><u>Baud Rate</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''Signed integer'' and can be referenced with the variable name ''cal_i2c::BAUD''.
| width="90%" | Baud Rate
 
|-
Baud rate to be used
| colspan="2" | Baud rate to be used&nbsp;
 
|-
<span style="font-weight: normal;"><u>Stop Delay</u></span>
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Stop Delay
This property is of type ''True or false'' and can be referenced with the variable name ''cal_i2c::StopDel''.
|-
 
| colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not  a 10ms delay between an I2C stop event and the next I2C start event.  Most modern microcontrollers will not have a problem so this property can be disabled to speed up the  I2C communications. &nbsp;
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
a 10ms delay between an I2C stop event and the next I2C start event.
| width="90%" | SDA
 
|-
 
| colspan="2" | Pin used for SDA (data signal)&nbsp;
 
|-
Most modern microcontrollers will not have a problem so this property can be disabled to speed up the
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | SCL
I2C communications.
|-
 
| colspan="2" | Pin used for SCL (clock signal)&nbsp;
<span style="font-weight: normal;"><u>SDA</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_i2c::SDA''.
| width="90%" | Int Pin
 
|-
Pin used for SDA (data signal)
| colspan="2" | Interrupt pin connection on Wiznet module&nbsp;
 
|-
<span style="font-weight: normal;"><u>SCL</u></span>
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Gateway IP
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_i2c::SCL''.
|-
 
|-
Pin used for SCL (clock signal)
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Gateway0
<span style="font-weight: normal;"><u>Int Pin</u></span>
|-
 
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''int_pin''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Interrupt pin connection on Wiznet module
| width="90%" | Gateway1
 
|-
<span style="font-weight: normal;"><u>Gateway0</u></span>
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway0''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Gateway2
IP address of the gateway to the internet if applicable.
|-
 
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
<span style="font-weight: normal;"><u>Gateway1</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway1''.
| width="90%" | Gateway3
 
|-
IP address of the gateway to the internet if applicable.
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
 
|-
<span style="font-weight: normal;"><u>Gateway2</u></span>
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Subnet Mask
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway2''.
|-
 
|-
IP address of the gateway to the internet if applicable.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Subnet0
<span style="font-weight: normal;"><u>Gateway3</u></span>
|-
 
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway3''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
IP address of the gateway to the internet if applicable.
| width="90%" | Subnet1
 
|-
<span style="font-weight: normal;"><u>Subnet0</u></span>
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet0''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Subnet2
Subnet mask of the server - usually 255.255.255.0
|-
 
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
<span style="font-weight: normal;"><u>Subnet1</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet1''.
| width="90%" | Subnet3
 
|-
Subnet mask of the server - usually 255.255.255.0
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
 
|-
<span style="font-weight: normal;"><u>Subnet2</u></span>
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | IP Address
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet2''.
|-
 
|-
Subnet mask of the server - usually 255.255.255.0
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | IP0
<span style="font-weight: normal;"><u>Subnet3</u></span>
|-
 
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet3''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Subnet mask of the server - usually 255.255.255.0
| width="90%" | IP1
 
|-
<span style="font-weight: normal;"><u>IP0</u></span>
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip0''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | IP2
IP address of the server - usually 192.168.0.x or 192.168.1.x
|-
 
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
<span style="font-weight: normal;"><u>IP1</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip1''.
| width="90%" | IP3
 
|-
IP address of the server - usually 192.168.0.x or 192.168.1.x
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
 
|-
<span style="font-weight: normal;"><u>IP2</u></span>
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | MAC Address
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip2''.
|-
 
|-
IP address of the server - usually 192.168.0.x or 192.168.1.x
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | MAC0
<span style="font-weight: normal;"><u>IP3</u></span>
|-
 
| colspan="2" | MAC address of the server&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip3''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
IP address of the server - usually 192.168.0.x or 192.168.1.x
| width="90%" | MAC1
 
|-
<span style="font-weight: normal;"><u>MAC0</u></span>
| colspan="2" | MAC address of the server&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac0''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | MAC2
MAC address of the server
|-
 
| colspan="2" | MAC address of the server&nbsp;
<span style="font-weight: normal;"><u>MAC1</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac1''.
| width="90%" | MAC3
 
|-
MAC address of the server
| colspan="2" | MAC address of the server&nbsp;
 
|-
<span style="font-weight: normal;"><u>MAC2</u></span>
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | MAC4
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac2''.
|-
 
| colspan="2" | MAC address of the server&nbsp;
MAC address of the server
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
<span style="font-weight: normal;"><u>MAC3</u></span>
| width="90%" | MAC5
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac3''.
| colspan="2" | MAC address of the server&nbsp;
 
|-
MAC address of the server
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Substitutions
<span style="font-weight: normal;"><u>MAC4</u></span>
|-
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac4''.
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Outgoing
MAC address of the server
|-
 
|-
<span style="font-weight: normal;"><u>MAC5</u></span>
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Count
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac5''.
|-
 
| colspan="2" | Maximum number of outbound string substitutions&nbsp;
MAC address of the server
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
<span style="font-weight: normal;"><u>Count</u></span>
| width="90%" | Length 0
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Outgoing_Count''.
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
 
|-
Maximum number of outbound string substitutions
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Length 1
<span style="font-weight: normal;"><u>Length 0</u></span>
|-
 
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_0''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Number of bytes to reserve for data string.
| width="90%" | Length 2
 
|-
<span style="font-weight: normal;"><u>Length 1</u></span>
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
 
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_1''.
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Incoming
Number of bytes to reserve for data string.
|-
 
|-
<span style="font-weight: normal;"><u>Length 2</u></span>
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Count
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_2''.
|-
 
| colspan="2" | Maximum number of inbound string substitutions&nbsp;
Number of bytes to reserve for data string.
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
<span style="font-weight: normal;"><u>Count</u></span>
| width="90%" | Length 0
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Incoming_Count''.
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
 
|}
Maximum number of inbound string substitutions
 
<span style="font-weight: normal;"><u>Length 0</u></span>
 
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''In_Len_0''.
 
Number of bytes to reserve for data string.

Revision as of 14:43, 16 January 2023

Author Matrix TSL
Version 2.0
Category E-blocks 1


Webserver component

Webserver component designed to work with the NM7010A module from Wiznet, as used in the version 1 EB023 E-block. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.

Component Source Code

Please click here for the component source code: FC_Comp_Source_WebServer_EB023-00-1_EB.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

SetOutValue
Set the value of an outbound substitution string 
- BYTE index
 
- STRING value
 
- VOID Return


Send_Embedded_HTML_Page4
 
- VOID Return


Send_Embedded_HTML_Page3
 
- VOID Return


Send_Embedded_HTML_Page2
 
- VOID Return


Send_Embedded_HTML_Page1
 
- VOID Return


GetInValue
Returns the string value of a Request parameter 
- BYTE index
 
- STRING Return


CreateServerSocket
Creates a listening socket on the selected channel and port ready to accept incoming web page requests. 
- BYTE Channel
 
- BYTE Port_Hi
 
- BYTE Port_Lo
 
- BYTE Return


IncRxPtr
 
- BYTE Channel
 
- VOID Return


CheckSocketActivity
Checks for activity on the server socket and serves out the webpages to any requesting parties. 
- BYTE Return


Initialise
Resets and initialises the Internet E-Block. It sets up the gateway address, subnet mask, device IP address and device MAC address as defined in the properties of the Flowcode component. This macro must be called before any other TCP_IP component macros  
- VOID Return



Property reference

Properties
Label
Label used to help identify the component on the panel. 
Max Channels
Max number of concurrent channels allowed 
I2C Address
I2C address of the module - bit 0 
HTML Source
HTML Source
Sets the method for streaming data, we can either host it loacally using a property or refer to external files. 
Max Pages
Maximum number of pages we can serve using the embedded page type webserver. 
Name Page 1
Name of HTML page 1 - index.htm is the default page that will be presented. 
HTML Page 1
Embedded HTML code used for page 1 
Name Page 2
Name of HTML page 2 
HTML Page 2
Embedded HTML code used for page 2 
Name Page 3
Name of HTML page 3  
HTML Page 3
Embedded HTML code used for page 3  
Name Page 4
Name of HTML page 4 
HTML Page 4
Embedded HTML code used for page 4 
Connections
Channel
Channel selection 
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Stop Delay
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.  
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Int Pin
Interrupt pin connection on Wiznet module 
Gateway IP
Gateway0
IP address of the gateway to the internet if applicable. 
Gateway1
IP address of the gateway to the internet if applicable. 
Gateway2
IP address of the gateway to the internet if applicable. 
Gateway3
IP address of the gateway to the internet if applicable. 
Subnet Mask
Subnet0
Subnet mask of the server - usually 255.255.255.0 
Subnet1
Subnet mask of the server - usually 255.255.255.0 
Subnet2
Subnet mask of the server - usually 255.255.255.0 
Subnet3
Subnet mask of the server - usually 255.255.255.0 
IP Address
IP0
IP address of the server - usually 192.168.0.x or 192.168.1.x 
IP1
IP address of the server - usually 192.168.0.x or 192.168.1.x 
IP2
IP address of the server - usually 192.168.0.x or 192.168.1.x 
IP3
IP address of the server - usually 192.168.0.x or 192.168.1.x 
MAC Address
MAC0
MAC address of the server 
MAC1
MAC address of the server 
MAC2
MAC address of the server 
MAC3
MAC address of the server 
MAC4
MAC address of the server 
MAC5
MAC address of the server 
Substitutions
Outgoing
Count
Maximum number of outbound string substitutions 
Length 0
Number of bytes to reserve for data string. 
Length 1
Number of bytes to reserve for data string. 
Length 2
Number of bytes to reserve for data string. 
Incoming
Count
Maximum number of inbound string substitutions 
Length 0
Number of bytes to reserve for data string.