AnsweredAssumed Answered

DSO-X 3014: Arbitrary WaveForms and IEEE 488.2 binary blocks

Question asked by flanguasco on Oct 30, 2011
Latest reply on Nov 5, 2011 by bret
Hi all:
I have a problem downloading my data to the Arbitrary WaveForm Generator with VB6.

If a prepare an array of integer values intData(0 To 8191) as Integer with -512 < intData(i) < 512 and, then, I use the following instructions:

    myScope.WriteString ":WGEN:ARBitrary:BYTeorder MSBFirst"
    myScope.WriteIEEEBlock ":WGEN:ARBitrary:DATA:DAC ", intData()

everything works fine and I have my waveform regularly generated and displayed.

If, instead, I use an array of single values sngData(0 To 8191) as Single with -1.0 < sngData(i) < 1.0  and, then, I use the instruction:

    myScope.WriteIEEEBlock ":WGEN:ARBitrary:DATA ", sngData()

I get the error "-222 Data out of range".

I did several attempts to solve/understand the problem:

- ...BYTeorder LSBFirst, no way.

- if I set all sngData(i) <= 0.0499 I don't get any error but the generator output is zero (open?).

- if I set all sngData(i) = 0.04999 the error "-222 Data out of range" comes out again.

- I tried to include a Binary Block Header

    BlockHeader$ = "#5" & 4 * 8192  ' -> "#532768"
    myScope.WriteIEEEBlock ":WGEN:ARBitrary:DATA " & BlockHeader$, sngData()

  but I get the error "-161 Invalid block data".

- the same error comes out if I use arrays of Double type (with or without the Block Header).

- ... others, but equally unsuccessful!

Obviously I am doing something wrong but... what?

I have also to say that I could "convince" the ":WGEN:ARBitrary:DATA " method to work fine for me in the code:

    myScope.WriteString ":WGEN:ARBitrary:BYTeorder LSBFirst"
    myScope.WriteString ":WGEN:ARBitrary:DATA ", strData

where strData (As String) is the concatenation:

    strData = Format$(sngData(0), "0.000E-00") & "," & ... ... ... & "," & Format$(sngData(8191), "0.000E-00")

but this downloading process is much slower and, on the other hand, I would like to learn how to use the IEEE 488.2 binary blocks.

Ciao and many thanks for the attention.