Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Data capture works on one PC but does not in another PC

Hi

 

I am using viScanf to get data from an oscilloscope. It works in one PC (64 bit windows 7) but does not if I run the same program from another PC (32 bit XP). This is part of the code I use.

 

 

// Get first char and validate
 status = viSetAttribute(vi,VI_ATTR_RD_BUF_OPER_MODE, VI_FLUSH_DISABLE);
 status = viScanf(vi, "%c", &c);                                                                             this viScanf() ok.
 if (status < VI_SUCCESS) goto error;
 assert(c == '#');
 // Get width of element field.
 status = viScanf(vi, "%c", &c);                                                                              
 if (status < VI_SUCCESS) goto error;                                                   ERROR : The specified operation or request timed out
 assert(c >= '0' && c <= '9');

 

I have added the necessary libraries and headers from the PCs internal folders. The settings of the project are all same. What could be the problem?

0 Kudos
Message 1 of 7
(3,528 Views)

Winash,

 

Can you communicate with the Oscope using Test Panels in MAX on the Xp machine?

 

Regards,

 

Kyle Mozdzyn

Applications Engineering

National Instruments

Regards,

Kyle M.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 7
(3,515 Views)

Hi Kyle,

 

The XP machine has TekVisa applications installed in it and I tried one such application called Openchoice Talker Listener. I can communicate with the scope using this application and *IDN?, hor:reco?,  WFMOutpre:YOFF?, WFMOutpre:YMULT?. All these commands get me the correct values. 

 

I even used CURVE? function for which I get this #42000ýöïèäãàÝÙ×ÖÖØÖØÛÝáäéíñõúþ

 

But when I try viScanf function it gets timed out and reports an error. 

 

Can you please help?

 

Thanks

Ashwin

0 Kudos
Message 3 of 7
(3,507 Views)

Winash,

 

What make/model of Oscope is it?

 

And is there any reason you have to use TekVisa instead of the NI-VISA drivers and measurement and automation explorer?

 

Regards,

 

Kyle Mozdzyn

Applications Engineering

National Instruments

Regards,

Kyle M.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 7
(3,500 Views)

Hi Kyle,

 

The oscilloscope is DPO 7104 from Tektronix. 

 

This is my lab PC which already has the Tek visa drivers and applications installed. I do not think I can change that. But the other machine from which program works has NI visa drivers.

 

I find that only the second viScanf functions generates an error. The first viScanf getting the character # works fine. Could there be any problem due to bufffer and flushing?

Thanks 

0 Kudos
Message 5 of 7
(3,498 Views)

Winash,

 

The issue sounds like its coming from the techtronics drivers, so tektronix may be the best people to contact regarding this. Youre using their drivers to communicate with their hardware, so we wont be able to provide much in the way of troubleshooting for this issue. You may be having an issue with the viScanf not clearing the task, but as for how to do that in their software, I don't know.  

 

Regards,

 

Kyle Mozdzyn

Applications Engineering

National Instruments

Regards,

Kyle M.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 7
(3,490 Views)

Ok. Thanks.

 

Ashwin

0 Kudos
Message 7 of 7
(3,487 Views)