Reads bytes of data from the specified input port.
[ lInBytes = ] PortInBytes ( nPort, pDst [, lBytes ] )
The PortInBytes procedure syntax has the following parts:
Name |
Type |
Description |
lInBytes |
Long |
Returned number of bytes read from the port |
nPort |
Val Short |
Input port number (address) |
pDst |
Var Any |
Receive data buffer |
lBytes |
Val Long |
Number of bytes to read. The default value is -1 - read the number of bytes as defined in pDst. |
The function, which may be used to read data from I/O-mapped, PC-based instruments, returns bytes containing the data read from nPort. nPort can be any number in the range 0x0000 - 0xFFFF.
Note: Physical memory and Port I/O access is a privileged instruction and require special access code from MTS. Contact MTS for obtaining the access code - ATEasy 2023/ (v12.0).
The following example reads 32,000 bytes from the address 0x311 to pDst:
lInBytes = PortInBytes (0x311, pDst, 32000)