FP_IPV6_GET_CONNECTION

Get connection parameters

This FP instruction reads the parameters from the Ethernet connection and writes the values into the DUT FP_IPV6_CONNECTION_DUT.

Parameters

Input

nPort (WORD, INT, UINT)

Ethernet port on CPU (FP7 E types):

SYS_ETHERNET_USER_CONNECTION_1SYS_ETHERNET_USER_CONNECTION_216

Output

dutIPv6Connection (FP_IPV6_CONNECTION_DUT)

Parameters of the Ethernet connection

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		bGetConnection: BOOL:=FALSE;
		dutIPv6Connection: FP_IPv6_CONNECTION_DUT;
		bGetMac: BOOL:=FALSE;
		dutIPv6MAC: FP_IPv6_MAC_DUT;
	END_VAR

POU body

When the variables bGetConnection and bGetMac are set to TRUE, the functions are carried out.

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 6 ;
        NETWORK_BODY
B(B_VAROUT,,dutIPv6Connection,45,3,47,5,);
B(B_CONTACT,,bGetConnection,4,2,6,4,);
B(B_F,FP_IPV6_GET_CONNECTION!,,31,1,45,5,,?DEN?DnPort?AENO?CdutIPv6Connection);
B(B_VARIN,,SYS_ETHERNET_USER_CONNECTION_12,29,3,31,5,);
B(B_CONTACT,,sys_bIsEthernetIPAddressAssigned,15,2,17,4,);
L(6,3,15,3);
L(17,3,31,3);
L(1,3,4,3);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_CONTACT,,bGetMac,4,2,6,4,);
B(B_VAROUT,,dutIPv6MAC,21,3,23,5,);
B(B_F,FP_IPV6_GET_MAC!,,11,1,21,5,,?DEN?AENO?CdutIPv6MAC);
L(1,3,4,3);
L(6,3,11,3);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF bGetConnection Then
    FP_IPV6_GET_CONNECTION(nPort := SYS_ETHERNET_USER_CONNECTION_2, dutIPv6Connection => FP_IPv6_CONNECTION_DUT);
END_IF;
IF bGetMac Then
    FP_IPV6_GET_MAC(dutIPv6MAC => FP_IPv6_MAC_DUT);
END_IF;

Modified on: 2022-01-18Feedback on this pagePanasonic hotline