viPoke8/viPoke16/viPoke32/viPoke64
Purpose
Writes an 8-bit, 16-bit, 32-bit, or 64-bit value to the specified address.
C Syntax
void viPoke8(ViSession vi, ViAddr addr, ViUInt8 val8)
void viPoke16(ViSession vi, ViAddr addr, ViUInt16 val16)
void viPoke32(ViSession vi, ViAddr addr, ViUInt32 val32)
void viPoke64(ViSession vi, ViAddr addr, ViUInt64 val64)
Visual Basic Syntax
viPoke8(ByVal vi&, ByVal addr&, ByVal val8 as Byte)
viPoke16(ByVal vi&, ByVal addr&, ByVal val16%)
viPoke32(ByVal vi&, ByVal addr&, ByVal val32&)
Resource Classes
FireWire INSTR, GPIB-VXI INSTR, GPIB-VXI MEMACC, PXI INSTR, PXI MEMACC, VXI INSTR, VXI MEMACC
Parameters
Name | Direction | Description |
---|---|---|
vi |
IN |
Unique logical identifier to a session. |
addr |
IN |
Destination address to store the value. |
val8, val16, val32, or val64 |
IN |
Value to be stored (8 bits for viPoke8(), 16 bits for viPoke16(), 32 bits for viPoke32(), 64 bits for viPoke64()). |
Return Values
None
Description
The viPokeXX() operations store the content of an 8-bit, 16-bit, 32-bit value, or 64-bit value, respectively, to the address pointed to by addr. The address must be a valid memory address in the current process mapped by a previous viMapAddress() call.
To specify the full 48-bit offset for these methods on a FireWire INSTR session, a call to viSetAttribute using VI_ATTR_FIREWIRE_WIN_UPPER_OFFSET is needed prior to calling these methods. Subsequent calls to viSetAttribute are needed only if the upper 16 bits of the FireWire offset change.
Note If you use NI Spy to debug these operations, enable the Force peek/poke calls to appear in NI Spy option in Measurement & Automation Explorer (Windows), visaconf (Linux), or NI-VISA Configuration (Mac OS X). If you do not enable this option, NI Spy might not log these operations. |
Related Topics