These functions include a version request and an IP4 request function.
This function returns an FP-I4C version number.
FPWEB_GET_VERSION(source);
The version number as a hex/BCD value (V1.23 returns 16#0123)
DT[1000] := FPWEB_GET_ VERSION (1);
This function allows you to get information about the current state of the Ethernet interface, such as the IP address or the cable connection.
This function can be called continuously.
Each item must be requested separately.
The IP numbers are in Big Endian byte order and can be changed to a readable STRING in the PLC by the function IPADDR_TO_STRING.
Compatibility:
The FP-I4C unit uses ETH0 and ETH1 instead of ETH (FPWEB2) to specify the interface.
Configuration file settings and the ADDRESS2 and DHCP items are not supported by the FP-I4C unit.
The STATUS item only returns cable connection information.
FPWEB_GET_IP4(interface, item);
The IP address or status as a DWORD value
The Ethernet interface ("ETH0", "ETH1", "BR0", or "DNS") and the item to be evaluated
"ETHx", "ADDRESS": Requests the current primary IP address of the specified Ethernet interface.
Example: DDT[30] := FPWEB_GET_IP4("ETH0", "ADDRESS");
"ETHx", "NETMASK": Requests the current primary IP netmask of the Ethernet interface.
"ETHx", "NETMASK2": Requests the current secondary IP netmask of the Ethernet interface.
"ETHx", "GATEWAY": Requests the current gateway address used by the Ethernet interface.
"ETHx", "STATUS": Requests the status of the Ethernet interface.
Example: DDT[46] := FPWEB_GET_IP4("ETH0", "STATUS");
"ETHx", "MAC": Requests the current MAC address of the Ethernet interface.
Example: DT[44] := FPWEB_GET_IP4("ETH0", "MAC");
"BR0", "ADDRESS": Requests the current IP address of both Ethernet interfaces (available if Bridge/Switch Service is enabled in System Settings).
"DNS": Requests the stored settings, not the current state.
"DNS", "NAME_SERVER1": Requests the setting of the primary DNS (Domain Name Server) IP address.
Example: DDT[40] := FPWEB_GET_IP4("DNS", "NAME_SERVER1");
"DNS", "NAME_SERVER2": Requests the setting of the secondary DNS (Domain Name Server) IP address.
"PORT_INBOUND": Requests the number of connections established by a TCP listening port.
Specify the port number in the request (decimal value, e.g. 9094, or hex number, e.g. 16#2386).
Values: 0 to 65535 (16#0 to 16#FFFF)
Example: WI[16004] := FPWEB_GET_IP4("PORT_INBOUND", "9097");
"PORT_OUTBOUND": Requests the number of connections established by a TCP send port. There can be only one connection.
Specify the port number in the request (decimal value, e.g. 9094, or hex number, e.g. 16#2386).
Example: DT[100] := FPWEB_GET_IP4("PORT_OUTBOUND", "9094");