Component: TCP/IP (BL0187) (E-blocks 2): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
||
| Line 70: | Line 70: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlLEDs''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlLEDs''' | ||
|- | |- | ||
| Line 89: | Line 89: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateIPSocket''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateIPSocket''' | ||
|- | |- | ||
| Line 118: | Line 118: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateMACSocket''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateMACSocket''' | ||
|- | |- | ||
| Line 147: | Line 147: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateTCPSocket''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateTCPSocket''' | ||
|- | |- | ||
| Line 171: | Line 171: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateUDPSocket''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateUDPSocket''' | ||
|- | |- | ||
| Line 195: | Line 195: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DHCP_Setup''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DHCP_Setup''' | ||
|- | |- | ||
| Line 209: | Line 209: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DNS_Lookup''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DNS_Lookup''' | ||
|- | |- | ||
| Line 233: | Line 233: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLocalIP''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLocalIP''' | ||
|- | |- | ||
| Line 252: | Line 252: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLocalMAC''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLocalMAC''' | ||
|- | |- | ||
| Line 271: | Line 271: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
|- | |- | ||
| Line 285: | Line 285: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRegister''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRegister''' | ||
|- | |- | ||
| Line 304: | Line 304: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxDataAvailable''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxDataAvailable''' | ||
|- | |- | ||
| Line 323: | Line 323: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxDataSize''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxDataSize''' | ||
|- | |- | ||
| Line 342: | Line 342: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxFlushData''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxFlushData''' | ||
|- | |- | ||
| Line 361: | Line 361: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatchMyIP''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatchMyIP''' | ||
|- | |- | ||
| Line 380: | Line 380: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatchMyMAC''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatchMyMAC''' | ||
|- | |- | ||
| Line 399: | Line 399: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatch_2_Bytes''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatch_2_Bytes''' | ||
|- | |- | ||
| Line 428: | Line 428: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatch_4_Bytes''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatch_4_Bytes''' | ||
|- | |- | ||
| Line 467: | Line 467: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatch_6_Bytes''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxMatch_6_Bytes''' | ||
|- | |- | ||
| Line 516: | Line 516: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxReadByte''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxReadByte''' | ||
|- | |- | ||
| Line 535: | Line 535: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxReadHeader''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxReadHeader''' | ||
|- | |- | ||
| Line 559: | Line 559: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxReadString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxReadString''' | ||
|- | |- | ||
| Line 583: | Line 583: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxSkipBytes''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxSkipBytes''' | ||
|- | |- | ||
| Line 607: | Line 607: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxStart''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RxStart''' | ||
|- | |- | ||
| Line 626: | Line 626: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDestination''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDestination''' | ||
|- | |- | ||
| Line 655: | Line 655: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetGateway''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetGateway''' | ||
|- | |- | ||
| Line 689: | Line 689: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLocalIP''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLocalIP''' | ||
|- | |- | ||
| Line 723: | Line 723: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMACAddress''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMACAddress''' | ||
|- | |- | ||
| Line 767: | Line 767: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSubnetMask''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSubnetMask''' | ||
|- | |- | ||
| Line 801: | Line 801: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TCP_Close''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TCP_Close''' | ||
|- | |- | ||
| Line 815: | Line 815: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TCP_Connect''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TCP_Connect''' | ||
|- | |- | ||
| Line 839: | Line 839: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxEnd''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxEnd''' | ||
|- | |- | ||
| Line 858: | Line 858: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendByte''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendByte''' | ||
|- | |- | ||
| Line 882: | Line 882: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendMyIP''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendMyIP''' | ||
|- | |- | ||
| Line 901: | Line 901: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendMyMAC''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendMyMAC''' | ||
|- | |- | ||
| Line 920: | Line 920: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxSendString''' | ||
|- | |- | ||
| Line 949: | Line 949: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxStart''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TxStart''' | ||
|- | |- | ||
| Line 968: | Line 968: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRegister''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRegister''' | ||
|- | |- | ||
Revision as of 14:17, 13 July 2026
| Author | Matrix TSL |
| Version | 2.3 |
| Category | E-blocks 2 |
TCP/IP component
A set of routines used to control a ENC28J60 TCP/IP Module. Required connections VCC, Reset, GND, SCK, MISO, MOSI, CS. Leave these pins disconnected CLKOUT, ENC_WOL, ENC_INT
Component Source Code
Please click here to download the component source project: FC_Comp_Source_TCPIP_BL0187.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_TCPIP_BL0187.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ControlLEDs
| ControlLEDs | |
| Allows both the LEDs on the Ethernet socket to be controlled. Useful for checking if the SPI communications are functioning correctly. | |
| Mode | |
| 0=Off, 1=On, 2=Auto | |
| Return | |
CreateIPSocket
CreateMACSocket
CreateTCPSocket
| CreateTCPSocket | |
| This macro creates a socket for sending and receiving TCP data. | |
| Channel | |
| Specifies the communications channel 0-3 | |
| Src_Port | |
| Port Number | |
| Return | |
CreateUDPSocket
| CreateUDPSocket | |
| This macro creates a socket for sending and receiving UDP data. | |
| Channel | |
| Specifies the communications channel 0-3 | |
| Src_Port | |
| Port Number | |
| Return | |
DHCP_Setup
| DHCP_Setup | |
| Return | |
DNS_Lookup
| DNS_Lookup | |
| Resolve the URL into an IP address via the DNS server. Returns non-zero if successful | |
| URL | |
| URL address string | |
| IP | |
| Returned IPv4 address | |
| Return | |
GetLocalIP
| GetLocalIP | |
| Gets the local IP address | |
| IP | |
| 4-byte Array to store the IP address | |
| Return | |
GetLocalMAC
| GetLocalMAC | |
| Gets the local MAC address | |
| MAC | |
| 6-byte Array to store the MAC address | |
| Return | |
Initialise
ReadRegister
| ReadRegister | |
| Reads the value from a single register onboard the ENC28J60 module. | |
| Address | |
| Return | |
RxDataAvailable
RxDataSize
| RxDataSize | |
| This macro is used to detect the size of data collected by the Rx_data_available macro. | |
| Channel | |
| Specifies the communications channel 0-3 | |
| Return | |
RxFlushData
RxMatchMyIP
RxMatchMyMAC
RxMatch_2_Bytes
RxMatch_4_Bytes
RxMatch_6_Bytes
RxReadByte
RxReadHeader
RxReadString
RxSkipBytes
RxStart
| RxStart | |
| Move the received buffer read pointer back to the start | |
| Channel | |
| Return | |
SetDestination
SetGateway
SetLocalIP
SetMACAddress
SetSubnetMask
TCP_Close
TCP_Connect
TxEnd
| TxEnd | |
| Once the transmit buffer has been filled with data, call this macro to actually send the data. | |
| Channel | |
| Specifies the communications channel 0-3 | |
| Return | |
TxSendByte
TxSendMyIP
TxSendMyMAC
TxSendString
TxStart
WriteRegister
| WriteRegister | |
| Writes a value to a single register onboard the ENC28J60 module. | |
| Address | |
| Data | |
| Return | |