:WGEN<w> Commands 37
Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide 1437
:WGEN<w>:ARBitrary:DATA
(see page 1610)
Command Syntax
:WGEN<w>:ARBitrary:DATA {<binary> | <value>, <value> ...}
<w> ::= 1 to (# WaveGen outputs) in NR1 format
<binary> ::= floating point values between -1.0 to +1.0
in IEEE 488.2 binary block format
<value> ::= floating point values between -1.0 to +1.0
in comma-separated format
The :WGEN<w>:ARBitrary:DATA command downloads an arbitrary waveform in
floating-point values format.
See Also • ":WGEN<w>:ARBitrary:DATA:DAC" on page 1442
• ":SAVE:ARBitrary[:STARt]" on page 825
• ":RECall:ARBitrary[:STARt]" on page 812
Example Code
' Waveform generator arbitrary data commands example.
' -------------------------------------------------------------------
Option Explicit
Public myMgr As VisaComLib.ResourceManager
Public myScope As VisaComLib.FormattedIO488
Public varQueryResult As Variant
Public strQueryResult As String
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
dest As Any, _
source As Any, _
ByVal bytes As Long)
Sub Main()
On Error GoTo VisaComError
' Create the VISA COM I/O resource.
Set myMgr = New VisaComLib.ResourceManager
Set myScope = New VisaComLib.FormattedIO488
Set myScope.IO = _
myMgr.Open("TCPIP0::a-mx4154a-60014.cos.is.keysight.com::inst0::
INSTR")
myScope.IO.Clear ' Clear the interface.
' Turn on arbitrary waveform generator function.
myScope.WriteString ":WGEN1:OUTPut ON"
myScope.WriteString ":WGEN1:FUNCtion ARBitrary"
myScope.WriteString ":WGEN1:FUNCtion?"
strQueryResult = myScope.ReadString
Debug.Print "WaveGen1 function: " + strQueryResult