Read-MdpTransferStatus

SYNOPSIS

Reads the current MDP Service Transfer status from the target system.

SYNTAX

NetIdPort (Default)

Read-MdpTransferStatus [-NetId <AmsNetId>] [-Timeout <Int32>] [-Count <Int32>] [-Delay <Int32>]
 [<CommonParameters>]

AddressStr

Read-MdpTransferStatus [-Address] <String> [-Timeout <Int32>] [-Count <Int32>] [-Delay <Int32>]
 [<CommonParameters>]

Route

Read-MdpTransferStatus [-InputObject] <IRoute> [-Timeout <Int32>] [-Count <Int32>] [-Delay <Int32>]
 [<CommonParameters>]

Session

Read-MdpTransferStatus -Session <ISession> [-Timeout <Int32>] [-Count <Int32>] [-Delay <Int32>]
 [<CommonParameters>]

DESCRIPTION

The Read-MdpTransferStatus cmdlet reads the MDP Service Transfer status register (SubIndex 2) and optionally the output register (SubIndex 3) from the specified target system. This is useful for monitoring the progress of asynchronous MDP operations that were triggered with Write-MdpTransferObject -PollingRate 0 (fire-and-forget).

Use -Count to perform multiple reads and -Delay to control the interval between reads (in seconds). A Delay of 0 or less reads as fast as possible.

This cmdlet is preliminary and subject to change.

EXAMPLES

Example 1

PS> Read-MdpTransferStatus

Status StatusDescription     Timestamp
------ -----------------     ---------
0      Success (no data)     2026-05-20T10:30:00.1234567+02:00

Reads the current service transfer status from the local system (single read).

Example 2

PS> Read-MdpTransferStatus -Count 5 -Delay 1

Status StatusDescription     Timestamp
------ -----------------     ---------
150    Busy (50%)            2026-05-20T10:30:00.1234567+02:00
175    Busy (75%)            2026-05-20T10:30:01.1345678+02:00
0      Success (no data)     2026-05-20T10:30:02.1456789+02:00
0      Success (no data)     2026-05-20T10:30:03.1567890+02:00
0      Success (no data)     2026-05-20T10:30:04.1678901+02:00

Polls the transfer status 5 times with a 1-second delay between reads.

Example 3

PS> Read-MdpTransferStatus -NetId 5.62.192.46.1.1 -Count 3 -Delay 0

Reads the transfer status from a remote target 3 times as fast as possible.

PARAMETERS

-NetId

NetId of the target system. Tab completion: Completes AmsNetId values from currently reachable routes on the local TwinCAT system.

Type: AmsNetId
Parameter Sets: NetIdPort
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Address

The address of the target system. This can be the RouteName, NetId, HostName, or IPAddress. Wildcards are permitted. Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system.

Type: String
Parameter Sets: AddressStr
Aliases: Name

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-InputObject

The route object to the target system. Can be piped from Get-AdsRoute. Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system.

Type: IRoute
Parameter Sets: Route
Aliases: Destination, Route

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Session

An existing ADS session to use for communication.

Type: ISession
Parameter Sets: Session
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Timeout

The communication ADS timeout in milliseconds. A value of 0 disables the timeout. Default is 5000 ms.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: -1
Accept pipeline input: False
Accept wildcard characters: False

-Count

Specifies the number of status reads to perform. The default value is 1.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False

-Delay

Specifies the interval between status reads, in seconds. This is used only in combination with the 'Count' parameter. The default value is 1 second. A value of 0 or less reads as fast as possible.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

TwinCAT.IRoute

TwinCAT.ISession

OUTPUTS

NOTES