Jump to content

Component: Webserver (WIZ810MJ) (Comms: Networking): Difference between revisions

From Flowcode Help
XML import - Pre 8.0 release
 
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| Matrix Ltd.
| Matrix Ltd.
|-
|-
| 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
| Comms: Networking
| Comms: Networking
|}
|}




==Webserver (WIZ810MJ) component==
Webserver component designed to work with the WIZ810MJ module from Wiznet, as used in the version 2 EB023 E-block and MIAC System Industrial Addon. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.


==[[File:Component Icon 9e68a715_edc2_4a98_be64_c0d02f700135.png|Image]] Webserver (WIZ810MJ) component==
==Component Source Code==
Webserver component designed to work with the WIZ810MJ module from Wiznet,
as used in the version 2 EB023 E-block and MIAC System Industrial Addon.
Provides a very simple interface to allow webpages to be hosted from hardware or simulation.


==Examples==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_WebServer_WIZ810MJ.fcfx FC_Comp_Source_WebServer_WIZ810MJ.fcfx]
''<span style="color:red;">No additional examples</span>''


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_WebServer_WIZ810MJ.fcfx FC_Comp_Source_WebServer_WIZ810MJ.fcfx]


==Downloadable macro reference==
==Detailed description==


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


'''Parameters'''


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


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




'''Return value'''


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




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


'''Parameters'''


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




'''Return value'''


:[[Variable Types|STRING]]




===<span style="font-weight: normal;"><u><tt>CreateServerSocket</tt></u></span>===
Creates a listening socket on the selected channel and port ready to accept incoming web page requests.


'''Parameters'''


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


:[[Variable Types|UINT]] ''Port''




'''Return value'''


:[[Variable Types|BYTE]]




===<span style="font-weight: normal;"><u><tt>CheckSocketActivity</tt></u></span>===
Checks for activity on the server socket and serves out the webpages to any requesting parties.


'''Parameters'''
''No detailed description exists yet for this component''


:''This macro has no parameters''
==Examples==




'''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''






==Simulation macro reference==


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




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


This property is of type ''Signed integer'' and can be referenced with the variable name ''max_pages''.


Maximum number of pages we can serve using the embedded page type webserver.


<span style="font-weight: normal;"><u>Name Page 1</u></span>


This property is of type ''Line of text'' and can be referenced with the variable name ''name1''.


Name of HTML page 1 - index.htm is the default page that will be presented.


<span style="font-weight: normal;"><u>HTML Page 1</u></span>


This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html1''.


Embedded HTML code used for page 1


<span style="font-weight: normal;"><u>Name Page 2</u></span>


This property is of type ''Line of text'' and can be referenced with the variable name ''name2''.
''<span style="color:red;">No additional examples</span>''


Name of HTML page 2


<span style="font-weight: normal;"><u>HTML Page 2</u></span>


This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html2''.


Embedded HTML code used for page 2


<span style="font-weight: normal;"><u>Name Page 3</u></span>


This property is of type ''Line of text'' and can be referenced with the variable name ''name3''.


Name of HTML page 3


<span style="font-weight: normal;"><u>HTML Page 3</u></span>


This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html3''.


Embedded HTML code used for page 3


<span style="font-weight: normal;"><u>Name Page 4</u></span>


This property is of type ''Line of text'' and can be referenced with the variable name ''name4''.
==Macro reference==


Name of HTML page 4
===CheckSocketActivity===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''CheckSocketActivity'''
|-
| colspan="2" | Checks for activity on the server socket and serves out the webpages to any requesting parties.&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''
|}


<span style="font-weight: normal;"><u>HTML Page 4</u></span>


This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html4''.
===CreateServerSocket===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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-u16-icon.png]] - UINT
| width="90%" | Port
|-
| 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''
|}


Embedded HTML code used for page 4


<span style="font-weight: normal;"><u>MIAC Industrial Addon</u></span>
===GetInValue===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''ORDINAL''.


''<span style="color:red;">No additional information</span>''
===IncRxPtr===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}




===Initialise===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


<span style="font-weight: normal;"><u>Channel</u></span>


This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::CHANNEL''.
===MIAC_Module_GetData===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_GetData'''
|-
| colspan="2" | &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-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


SPI Channel selector


<span style="font-weight: normal;"><u>Prescale</u></span>
===MIAC_Module_Message===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_Message'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CAN_ID
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CMD_ID
|-
| 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''
|}


This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::PR_SCALE''.


Prescale option selector
===MIAC_Module_PushData===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_PushData'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| 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>MOSI</u></span>


This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MOSI''.
===MIAC_Module_SetData===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_SetData'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D0
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D2
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D3
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D4
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D5
|-
| 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''
|}


SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.


<span style="font-weight: normal;"><u>MISO</u></span>
===Send_Embedded_HTML_Page1===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MISO''.


SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
===Send_Embedded_HTML_Page2===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


<span style="font-weight: normal;"><u>CLK</u></span>


This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::CLK''.
===Send_Embedded_HTML_Page3===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


SPI Clock Pin CLK - The Clock signal is driven by the SPI master.


<span style="font-weight: normal;"><u>CS / SS</u></span>
===Send_Embedded_HTML_Page4===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::SS''.


Chip Select / Slave Select Pin
===SetOutValue===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''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''
|}


Master Mode: General purpose output pin used to select the remote SPI device.


Slave Mode: Hardware chip select pin input used to select the SPI device.
===WM_CH_CR===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_CH_CR'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


<span style="font-weight: normal;"><u>Int Pin</u></span>


This property is of type ''Single digital pin'' and can be referenced with the variable name ''int_pin''.
===WM_CH_IR===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_CH_IR'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


Interrupt pin connection on Wiznet module


<span style="font-weight: normal;"><u>Gateway0</u></span>
===WM_CH_MR===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_CH_MR'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway0''.


IP address of the gateway to the internet if applicable.
===WM_CH_PORT===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_CH_PORT'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


<span style="font-weight: normal;"><u>Gateway1</u></span>


This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway1''.
===WM_CH_RX_RSR===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_CH_RX_RSR'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


IP address of the gateway to the internet if applicable.


<span style="font-weight: normal;"><u>Gateway2</u></span>
===WM_CH_SR===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_CH_SR'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


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.
===WM_CH_TX_WR===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_CH_TX_WR'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


<span style="font-weight: normal;"><u>Gateway3</u></span>


This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway3''.
===WM_RXMEM===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_RXMEM'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


IP address of the gateway to the internet if applicable.


<span style="font-weight: normal;"><u>Subnet0</u></span>
===WM_TXMEM===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''WM_TXMEM'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet0''.


Subnet mask of the server - usually 255.255.255.0
==Property reference==


<span style="font-weight: normal;"><u>Subnet1</u></span>
{| class="mtx-class-macrotable wikitable"
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet1''.
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
 
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
Subnet mask of the server - usually 255.255.255.0
|-
 
|-
<span style="font-weight: normal;"><u>Subnet2</u></span>
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | HTML Source
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%" | Max Pages
<span style="font-weight: normal;"><u>Subnet3</u></span>
|-
 
| colspan="2" | Maximum number of pages we can serve using the embedded page type webserver.&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet3''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
Subnet mask of the server - usually 255.255.255.0
| width="90%" | Name Page 1
 
|-
<span style="font-weight: normal;"><u>IP0</u></span>
| colspan="2" | Name of HTML page 1 - index.htm is the default page that will be presented.&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip0''.
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 1
IP address of the server - usually 192.168.0.x or 192.168.1.x
|-
 
| colspan="2" | Embedded HTML code used for page 1&nbsp;
<span style="font-weight: normal;"><u>IP1</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip1''.
| width="90%" | Name Page 2
 
|-
IP address of the server - usually 192.168.0.x or 192.168.1.x
| colspan="2" | Name of HTML page 2&nbsp;
 
|-
<span style="font-weight: normal;"><u>IP2</u></span>
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 2
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip2''.
|-
 
| colspan="2" | Embedded HTML code used for page 2 &nbsp;
IP address of the server - usually 192.168.0.x or 192.168.1.x
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
<span style="font-weight: normal;"><u>IP3</u></span>
| width="90%" | Name Page 3
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip3''.
| colspan="2" | Name of HTML page 3&nbsp;
 
|-
IP address of the server - usually 192.168.0.x or 192.168.1.x
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 3
<span style="font-weight: normal;"><u>MAC0</u></span>
|-
 
| colspan="2" | Embedded HTML code used for page 3&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac0''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
MAC address of the server
| width="90%" | Name Page 4
 
|-
<span style="font-weight: normal;"><u>MAC1</u></span>
| colspan="2" | Name of HTML page 4&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac1''.
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
| width="90%" | HTML Page 4
MAC address of the server
|-
 
| colspan="2" | Embedded HTML code used for page 4&nbsp;
<span style="font-weight: normal;"><u>MAC2</u></span>
|-
 
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac2''.
| width="90%" class="mtx-class-propfolder" | Connections
 
|-
MAC address of the server
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>MAC3</u></span>
| width="90%" | Channel
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac3''.
| colspan="2" | SPI Channel selector&nbsp;
 
|-
MAC address of the server
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Prescale
<span style="font-weight: normal;"><u>MAC4</u></span>
|-
 
| colspan="2" | Prescale option selector&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac4''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
MAC address of the server
| width="90%" | MOSI
 
|-
<span style="font-weight: normal;"><u>MAC5</u></span>
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac5''.
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | MISO
MAC address of the server
|-
 
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.&nbsp;
<span style="font-weight: normal;"><u>Count</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Outgoing_Count''.
| width="90%" | CLK
 
|-
Maximum number of outbound string substitutions
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
 
|-
<span style="font-weight: normal;"><u>Length 0</u></span>
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | CS / SS
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_0''.
|-
 
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device. &nbsp;
Number of bytes to reserve for data string.
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
<span style="font-weight: normal;"><u>Length 1</u></span>
| width="90%" | Int Pin
 
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_1''.
| colspan="2" | Interrupt pin connection on Wiznet module&nbsp;
 
|-
Number of bytes to reserve for data string.
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | Gateway IP
<span style="font-weight: normal;"><u>Length 2</u></span>
|-
 
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_2''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Gateway0
Number of bytes to reserve for data string.
|-
 
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
<span style="font-weight: normal;"><u>Count</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 ''Incoming_Count''.
| width="90%" | Gateway1
 
|-
Maximum number of inbound string substitutions
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
 
|-
<span style="font-weight: normal;"><u>Length 0</u></span>
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Gateway2
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''In_Len_0''.
|-
 
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
Number of bytes to reserve for data string.
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
<span style="font-weight: normal;"><u>Label</u></span>
| width="90%" | Gateway3
 
|-
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
 
|-
Label used to help identify the component on the panel.
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | Subnet Mask
<span style="font-weight: normal;"><u>Sim Type</u></span>
|-
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''SimType''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Subnet0
Decides how to perform the simulation of the component.
|-
 
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
TCP IP - Communicates using the Windows TCP IP communications DLL
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
SPI / Injector - Communicates using the CAL SPI to allow the communications to be analysed and debugged.
| width="90%" | Subnet1
 
|-
<span style="font-weight: normal;"><u>Scope Traces</u></span>
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
 
|-
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ScopeTraces''.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Subnet2
Selects if the scope traces are automatically generated or not
|-
 
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
<span style="font-weight: normal;"><u>Console Data</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ConsoleData''.
| width="90%" | Subnet3
 
|-
Selects if the console data is automatically generated or not
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
 
|-
<span style="font-weight: normal;"><u>Injector</u></span>
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | IP Address
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::Injector''.
|-
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | IP0
 
|-
 
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
<span style="font-weight: normal;"><u>Network Interface</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 ''TCP_Base::interface''.
| width="90%" | IP1
 
|-
List of network interfaces connected to the PC.
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
 
|-
Sets which interface we are communicating via.
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | IP2
|-
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | IP3
|-
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | MAC Address
|-
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | MAC0
|-
| colspan="2" | MAC address of the server&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | MAC1
|-
| colspan="2" | MAC address of the server&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | MAC2
|-
| colspan="2" | MAC address of the server&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | MAC3
|-
| colspan="2" | MAC address of the server&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | MAC4
|-
| colspan="2" | MAC address of the server&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | MAC5
|-
| colspan="2" | MAC address of the server&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Substitutions
|-
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Outgoing
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Count
|-
| colspan="2" | Maximum number of outbound string substitutions&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Length 0
|-
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Length 1
|-
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Length 2
|-
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Incoming
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Count
|-
| colspan="2" | Maximum number of inbound string substitutions&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Length 0
|-
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| width="90%" | Label
|-
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Sim Type
|-
| colspan="2" | Decides how to perform the simulation of the component. TCP IP - Communicates using the Windows TCP IP communications DLL SPI / API - Communicates using the CAL SPI to allow the communications to be analysed and debugged.&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | TCP Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Network Interface
|-
| colspan="2" | List of network interfaces connected to the PC.  Sets which interface we are communicating via.&nbsp;
|}

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd.
Version 2.0
Category Comms: Networking


Webserver (WIZ810MJ) component

Webserver component designed to work with the WIZ810MJ module from Wiznet, as used in the version 2 EB023 E-block and MIAC System Industrial Addon. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_WebServer_WIZ810MJ.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_WebServer_WIZ810MJ.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

CheckSocketActivity

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


CreateServerSocket

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


GetInValue

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


IncRxPtr

IncRxPtr
 
- BYTE Channel
 
- VOID Return


Initialise

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


MIAC_Module_GetData

MIAC_Module_GetData
 
- BYTE Index
 
- BYTE Return


MIAC_Module_Message

MIAC_Module_Message
 
- UINT CAN_ID
 
- UINT CMD_ID
 
- BYTE Return


MIAC_Module_PushData

MIAC_Module_PushData
 
- BYTE Data
 
- VOID Return


MIAC_Module_SetData

MIAC_Module_SetData
 
- BYTE Count
 
- BYTE D0
 
- BYTE D1
 
- BYTE D2
 
- BYTE D3
 
- BYTE D4
 
- BYTE D5
 
- VOID Return


Send_Embedded_HTML_Page1

Send_Embedded_HTML_Page1
 
- VOID Return


Send_Embedded_HTML_Page2

Send_Embedded_HTML_Page2
 
- VOID Return


Send_Embedded_HTML_Page3

Send_Embedded_HTML_Page3
 
- VOID Return


Send_Embedded_HTML_Page4

Send_Embedded_HTML_Page4
 
- VOID Return


SetOutValue

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


WM_CH_CR

WM_CH_CR
 
- BYTE ch
 
- UINT Return


WM_CH_IR

WM_CH_IR
 
- BYTE ch
 
- UINT Return


WM_CH_MR

WM_CH_MR
 
- BYTE ch
 
- UINT Return


WM_CH_PORT

WM_CH_PORT
 
- BYTE ch
 
- UINT Return


WM_CH_RX_RSR

WM_CH_RX_RSR
 
- BYTE ch
 
- UINT Return


WM_CH_SR

WM_CH_SR
 
- BYTE ch
 
- UINT Return


WM_CH_TX_WR

WM_CH_TX_WR
 
- BYTE ch
 
- UINT Return


WM_RXMEM

WM_RXMEM
 
- BYTE ch
 
- UINT Return


WM_TXMEM

WM_TXMEM
 
- BYTE ch
 
- UINT Return


Property reference

Properties
HTML Source
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
SPI Channel selector 
Prescale
Prescale option selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
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. 
Simulation
Label
Label used to help identify the component on the panel. 
Sim Type
Decides how to perform the simulation of the component. TCP IP - Communicates using the Windows TCP IP communications DLL SPI / API - Communicates using the CAL SPI to allow the communications to be analysed and debugged. 
TCP Simulation
Network Interface
List of network interfaces connected to the PC. Sets which interface we are communicating via.