Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

I have recently purchased Measurement Studio STD and I am developing an

I am having a problem reading binary data

from my Agilent 8753E Network Analyzer. If I issue the commands "FORM4

OUTPFORF" and then read the data from the queue it works fine, as FORM4
tells
the instrument to reply with ASCII data. However if I issue commands
"FORM3:OUTPFORF" and read the data I get a string of weird characters
ex.(#A\f\x84\xc1T<\x00\xc1T@\x00\xc1T2\x00\xc1Td\x00\...). What I need to
do
is return the data from the command "FORM3:OUTPFORF" in a format that is
useable like an array of real numbers. Also, if I issue the same 2
commands in
MAX I get the same results. FORM4 results in an array of 2 data values
comma
delimited
ex.(
1.2256, 0.0000
1.2455, 0.0000
et
c...

Thanks in advance for all your help.
0 Kudos
Message 1 of 7
(3,899 Views)
It's returning the data correctly. You just are viewing the binary data as ASCII data, so it looks like garbage. You need to consult your instrument documentation to see how to parse the binary data into numeric information. It could be sending an array of float values and is expecting you to stream the data into a float array instead of a string.

Best Regards,
Chris Matthews
0 Kudos
Message 2 of 7
(3,899 Views)
You're right, that is the problem, the instrument should return a 4 byte header followed by a 2 value comma separated float array, each value being 8 bytes long. But how would I go about parsing the data into Visual Basic 6.0 with Measurement Studio using cwVisa?
0 Kudos
Message 3 of 7
(3,899 Views)
You need to setup a Parser Task under the Parsing tab of the Property pages for the cwVisa control. Are you sure the binary values are comma separated. That isn't typically true of binary data. Anyway if it is true your parsing would look task would look something like:

Task1
Pattern1
Token1
Token2
Token3 (Comma, ignore token)
Token4

See the Simple Parsing example for an example of how to use parsing.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 4 of 7
(3,899 Views)
Attached is a table that describes the different formats of outputting data from the analyzer I'm using. I can get form4 to work fine, but I would like to use form2 or form4. How would I go about setting up a Parser Task for that?

Thanks,
Michael Hilker
0 Kudos
Message 5 of 7
(3,899 Views)
Forgot to mention that I need to do this using Visa the GPIB object doesn't seem to work for me It says can't find GPIB.dll. Maybe because I'm using an Agilent HPIB card 82350.
0 Kudos
Message 6 of 7
(3,899 Views)
Anyone have any Ideas on this subject
0 Kudos
Message 7 of 7
(3,899 Views)