LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA

Hi,
 
I am working with an old program that I have to cinfigure in some applications. The pont is that the program should read data from an instrument, a HP 34970A. I thought that I can use the "old" VI, that reads from the serial port of the computer, but I cant seem to get it work. I attach the Vi, and if someone have any idea of what is wrong, please tell me!
 
( I don't understand what the "DATA:POIN?" and the "DATA:REM?" means! Any ideas?)
 
Thanks!
0 Kudos
Message 1 of 9
(3,471 Views)


@Frida wrote:
Hi,
 
I am working with an old program that I have to cinfigure in some applications. The pont is that the program should read data from an instrument, a HP 34970A. I thought that I can use the "old" VI, that reads from the serial port of the computer, but I cant seem to get it work. I attach the Vi, and if someone have any idea of what is wrong, please tell me!
 
( I don't understand what the "DATA: POIN?" and the "DATA:REM?" means! Any ideas?)
 
Thanks!


Those statements are queries to the HP 34970A.

Have you downloaded the manual for this instrument?  If not, it would be a good idea to do so.

Message Edited by nyc on 04-12-2006 09:01 AM

0 Kudos
Message 2 of 9
(3,457 Views)

Hi Frida,

Here is what the User Manual says about the two commands:

DATA: POINTS?           command to determine the total number of readings stored in memeory (all channels) from the most recent scan.

DATA: REM?  or DATA: REMOVE? number

The command reads and clears the specified number of readings from memory.  This allows you to continue a scan without losing data stored in memory.  The specified number of readings are cleared from memory, starting with the oldest reading.

If you do not have the user manual, you can download a pdf copy at this link:

http://www.home.agilent.com/upload/cmc_upload/All/34970-90003_users.pdf

Unfortunately, I could not open you vi because I only have LV7.1, and you are using LV8.  However, the old vi's should still work.  Did you try to get the example working?  The one that came with the drivers?

Since you are using the serial port, is the port configured to communicate with the instrument?  port number, baud rate, etc..

JLV

 

Message Edited by JoeLabView on 04-12-2006 09:18 AM

Message 3 of 9
(3,455 Views)

Hi,

I have downloaded the manual for the instrument and also installed the drivers. As you said, there were some examples included. But I can't even get the examples to work. Some if them work fine in Labview, no error messages, but I get error messages on the instrument display (among those, "Syntax error"). And in some of them I get an error message in Labview (-1073807339) at the VISA Read or VISA Write. I have tried all the ports in the drop down list, but none of them seems to work better than others. I have set the baudrate to 9600 which has worked fine before with this instrument (as i said, I update an old program and I know the rate was 9600 in the old program).

Does anyone have any ideas, is there something wrong with the instrument, or is it my limited knowledge in labview that limits my performance here?

I am glad to get all the help i can get!

0 Kudos
Message 4 of 9
(3,435 Views)
Hi,
I can't open your example and I don't have your instrument but I suggest you first of all to use "NI Measurement & Automation" explorer (you must have it on your PC) to send command to your device (open it, select "device and interfaces", select COM1 or whatever it was, and on the toolbar select "Open VISA session" and choose "Basic I\O").
Regards
CLD - Labview Certified Developer
0 Kudos
Message 5 of 9
(3,427 Views)

Well said antea06,

Yes, you should be able to communicate to your instruments using MAX, even through your serial port.  It should list all available ports.

You can start by sending the quiery command " *IDN? "to your instrument.  It should respond with it's ID.

 

Here is an explanation of your error code:

"Warning -1073807339 occurred at an unidentified location

Possible reason(s):

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed."

 

 

Message 6 of 9
(3,409 Views)

Hi Frida,

Below are tid-bits borrowed from HP on equipment communication:

Below is open instrument for serial VISA:

 

 

Set serial VISA Attributes: 

 

Here is what the quiery command typically looks like in Labview. 

 

Message Edited by JoeLabView on 04-13-2006 08:40 AM

Message 7 of 9
(3,413 Views)

Oops..

I forgot to mention...  The example(s) posted below (my last post) were for another intrument..  But it captures the basic idea...

😉

Message 8 of 9
(3,400 Views)

Hello!

Our discussion forum is awesome. You post a question and pretty much right away you have several things you can try out in order to solve the problem. Please try to increase the timeout value as suggested and also see if you can achieve basic communication with VISA in MAX.

Regards,

Jimmie Adolph

Applications Engineer, National Instruments

 

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 9 of 9
(3,366 Views)