Jump to content

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

From Flowcode Help
No edit summary
No edit summary
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_WebServer_EB023-00-2_EB.fcfx FC_Comp_Source_WebServer_EB023-00-2_EB.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/WebServer_EB023-00-2_EB.fcfx FC_Comp_Source_temp/WebServer_EB023-00-2_EB.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_WebServer_EB023-00-2_EB.fcfx FC_Comp_Source_WebServer_EB023-00-2_EB.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/WebServer_EB023-00-2_EB.fcfx FC_Comp_Source_temp/WebServer_EB023-00-2_EB.fcfx]


==Detailed description==
==Detailed description==
Line 49: Line 49:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




Line 57: Line 59:
==Macro reference==
==Macro reference==


===WM_CH_MR===
===CheckSocketActivity===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_MR'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckSocketActivity'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Checks for activity on the server socket and serves out the webpages to any requesting parties.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===WM_CH_PORT===
===CreateServerSocket===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_PORT'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateServerSocket'''
|-
|-
| colspan="2" | &nbsp;
| 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="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Port
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===WM_TXMEM===
===GetInValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_TXMEM'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetInValue'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Returns the string value of a Request parameter&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
| width="90%" | index
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===MIAC_Module_SetData===
===IncRxPtr===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_SetData'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IncRxPtr'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 124: Line 126:
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
| width="90%" | Channel
|-
| 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;
| colspan="2" | &nbsp;
Line 163: Line 135:




===WM_CH_RX_RSR===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_RX_RSR'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
|-
| colspan="2" | &nbsp;
| 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" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 201: Line 168:




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




===Send_Embedded_HTML_Page4===
===MIAC_Module_PushData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| 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'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_PushData'''
|-
|-
| colspan="2" | &nbsp;
| 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 239: Line 211:




===MIAC_Module_Message===
===MIAC_Module_SetData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_Message'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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;
| 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-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | CAN_ID
| width="90%" | D4
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | CMD_ID
| width="90%" | D5
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===Send_Embedded_HTML_Page3===
===Send_Embedded_HTML_Page1===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| 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'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page1'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 291: Line 288:




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




===Send_Embedded_HTML_Page1===
===Send_Embedded_HTML_Page4===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| 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'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page4'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 324: Line 316:




===GetInValue===
===SetOutValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetInValue'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetOutValue'''
|-
|-
| colspan="2" | Returns the string value of a Request parameter&nbsp;
| colspan="2" | Set the value of an outbound substitution string&nbsp;
|-
|-
|-
|-
Line 338: Line 330:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===MIAC_Module_PushData===
===WM_CH_CR===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_PushData'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_CR'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 353: Line 350:
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
| width="90%" | ch
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




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




===WM_CH_CR===
===WM_CH_MR===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_CR'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_MR'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 405: Line 397:




===WM_CH_TX_WR===
===WM_CH_PORT===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_TX_WR'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_PORT'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 424: Line 416:




===IncRxPtr===
===WM_CH_RX_RSR===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IncRxPtr'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_RX_RSR'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 434: Line 426:
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
| width="90%" | ch
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===CheckSocketActivity===
===WM_CH_SR===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckSocketActivity'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_SR'''
|-
| colspan="2" | &nbsp;
|-
|-
|-
| colspan="2" | Checks for activity on the server socket and serves out the webpages to any requesting parties.&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-u8-icon.png]] - BYTE
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===WM_CH_SR===
===WM_CH_TX_WR===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_SR'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_CH_TX_WR'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 495: Line 492:




===Initialise===
===WM_TXMEM===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WM_TXMEM'''
|-
| colspan="2" | &nbsp;
|-
|-
|-
| 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" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ch
|-
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}

Revision as of 12:03, 3 February 2023

Author Matrix TSL
Version 2.0
Category E-blocks 1


Webserver 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_temp/WebServer_EB023-00-2_EB.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/WebServer_EB023-00-2_EB.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 / Injector - 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.