viPeek8/viPeek16/viPeek32/viPeek64

NI-VISA 15.0 Help

Edition Date: June 2015

Part Number: 370131S-01

»View Product Info

Purpose

Reads an 8-bit, 16-bit, 32-bit, or 64-bit value from the specified address.

C Syntax

void viPeek8(ViSession vi, ViAddr addr, ViPUInt8 val8)

void viPeek16(ViSession vi, ViAddr addr, ViPUInt16 val16)

void viPeek32(ViSession vi, ViAddr addr, ViPUInt32 val32)

void viPeek64(ViSession vi, ViAddr addr, ViPUInt64 val64)

Visual Basic Syntax

viPeek8(ByVal vi&, ByVal addr&, val8 as Byte)

viPeek16(ByVal vi&, ByVal addr&, val16%)

viPeek32(ByVal vi&, ByVal addr&, val32&)

Resource Classes

PXI INSTR, PXI MEMACC, VXI INSTR, VXI MEMACC

Parameters

Name Direction Description

vi

IN

Unique logical identifier to a session.

addr

IN

Source address to read the value.

val8, val16, val32, or val64

OUT

Data read from bus (8 bits for viPeek8(), 16 bits for viPeek16(), 32 bits for viPeek32(), and 64 bits for viPeek64()).

Return Values

None

Description

The viPeekXX() operations read an 8-bit, 16-bit, 32-bit value, or 64-bit value, respectively, from the address location specified in addr. The address must be a valid memory address in the current process mapped by a previous viMapAddress() call.

Note Note  If you use NI I/O Trace to debug these operations, enable the Force peek/poke calls to appear in NI I/O Trace option in Measurement & Automation Explorer (Windows), visaconf (Linux), or NI-VISA Configuration (Mac OS X). If you do not enable this option, NI I/O Trace might not log these operations.


Related Topics

INSTR Resource

MEMACC Resource

VI_ATTR_WIN_ACCESS

viMapAddress/viMapAddressEx

viPoke8/viPoke16/viPoke32/viPoke64

WAS THIS ARTICLE HELPFUL?

Not Helpful