Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB, VB, jpg file transfer

Hello all,

I have a problem with the picture file transfer via GPIB using the NI commands in VB 2008:

 

Background:

I'm trying in integrating a screenshot function of an R&S ZVB 8 (Network Analyzer) into my own tool (coded in VB 2008). The screenshot will be created on the instrument in a format of my choice (EMF | WMF | EWMF | BMP | JPG | PNG). Then I only have to copy the file over to my PC via GPIB.

It is definitely possible since R&S is doing it with its RSCommander v. 1.4.16.

 

Problem:

After I have copied the file over to my PC using "Device.ReadToFile(file)" function NI4882 library I can not open it. It has the right size and also if I compare my file with the original via Notepad they look the same but none of my picture programs is able to open it.

What is missing to get the file back into its original state?

 

Thanks in advance

Nils

0 Kudos
Message 1 of 3
(3,981 Views)

Hi,

 

This has been sort of discussed before for other R&S instruments where GPIBShot can be used via Labview...

 

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Help-How-can-a-transfer-a-screen-shot-to-my-c...

 

 

Most of my work has been with Agilent equipment but looking at some drivers for a R&S spectrum analyser there is a hardcopy folder of VIs which you could maybe look into for your instrument.

 

Cheers

0 Kudos
Message 2 of 3
(3,895 Views)

Hi,

I already figured it out... when transferring files via GPIB it will be done via a long string, but the string always starts with the information how long the transmission will be which will destroy the file structure for everything beside text files. Hence before storing it in a file you have to cut off this first characters.

Done.

 

 

 

 

0 Kudos
Message 3 of 3
(3,885 Views)