LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"HP34970A Conf Resistance.vi" causes error message -113

I'm using Labview 6.1 to read voltage, frequency, resistance and temperature readings from an HP34970A (with 34902A 16-channel multiplexer).

Every time the "HP34970A Conf Resistance.vi" is completed it causes the HP34970A to display error -113: "Undefined header. A command was received that is not valid for this instrument. You may have misspelled the command or it may not be a valid command. If you are using the shortened form of this command, remember that it may contain up to four letters. Or you may have inserted an extra colon where one is not required.".
The only thing the vi is supposed to do, is to enable the offset compensation, which it is doing (I tested that with a separate program).

Although t
here is no help file with the NI drivers for the instrument and I'm new to Labview, I would like to know if someone found a workaround for this. It is kind of annoying because the error message is accompanied with a beep of the instrument every 3s.

Thanks.
0 Kudos
Message 1 of 10
(3,898 Views)
I don't have a 34970 handy to test with, but we might be able to scrounge one up. In the meantime, here are some thoughts.

First, are you using the latest version of the driver from http://ni.com/idnet? I noticed it was last updated in April 2004. Nothing in the README, though, mentions a fix to Conf Resistance.

Second, you might try debugging this with "NI Spy". (Start->All Programs->National Instruments->NI Spy) You can ask it to capture the VISA commands that LabVIEW uses, so you can see the actual commands that are sent over GPIB (or serial or any other bus VISA supports). I suspect the VI is somehow not putting together the right syntax for the command. NI Spy will show you exactly what the VI is sending to the instrument, and then it'll hopef
ully be obvious what the problem is.

Post your findings back here, and maybe we can figure it out.

Brian
0 Kudos
Message 2 of 10
(3,898 Views)
Thanks for your fast response.

I'm using the latest version of the drivers (I installed everything in the begining of Mai).

I wrote a small vi for NI Spy, just a simple 4 wire resistor measurement with "Conf Resistance.vi" at the beginning.

Unfortunately it is my first time working with LabVIEW and the VISA language, and the syntax looks correct for me. ( But I still get the -113 error.)

Here the processed commands (1 loop):

1. viGetAttribute (0x0015B920,0x3FFF018F,VI_FALSE)
Process ID: 0x0000033C Thread ID: 0x0000041C
Start Time: 14:52:09.127 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

2. viGetAttribute (0x0015B920,0x3FFF018F,VI_FALSE)
Process ID: 0x0000033C Thread ID: 0x0000041C
Start Time: 14:52:09.127 Call Duration: 00:00:00.010
Status: 0 (VI_SUCCESS)

3. viGetAttribute (0x0015B920,0x3FFF018F,VI_FALSE)
Process ID: 0x0000033C Thread ID: 0x0000041C
Start Time: 14:52:09.157 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

4. viGetAttribute (0x0015B920,0x3FFF018F,VI_FALSE)
Process ID: 0x0000033C Thread ID: 0x0000041C
Start Time: 14:52:09.157 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

5. viOpen (0x0015B920,"COM1",0 (0x0),0 (0x0),0x0017CC30)
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.469 Call Duration: 00:00:00.010
Status: 0 (VI_SUCCESS)

6. viGetAttribute (0x0017CC30,0x3FFF0171,4 (0x4))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.479 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

7. viGetAttribute (0x0017CC30,0x3FFF0171,4 (0x4))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.479 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

8. viSetAttribute (0x0017CC30,0x3FFF001A,10000 (0x2710))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.479 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

9. viSetAttribute (0x0017CC30,0x3FFF0021,57600 (0xE100))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.479 Call Duration: 00:00:00.010
Status: 0 (VI_SUCCESS)

10. viSetAttribute (0x0017CC30,0x3FFF0025,1 (0x1))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.489 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

11. viWrite (0x0017CC30,"*RST.",5 (0x5),5 (0x5))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.489 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

12. viWrite (0x0017CC30,"SYST:PRES.",10 (0xA),10 (0xA))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.489 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

13. viWrite (0x0017CC30,"*IDN?.",6 (0x6),6 (0x6))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.489 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

14. viRead (0x0017CC30,"HEWLETT-PACKARD,34970...",50 (0x32),32 (0x20))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.489 Call Duration: 00:00:00.370
Status: 0 (VI_SUCCESS)

15. viWrite (0x0017CC30,"*RST.",5 (0x5),5 (0x5))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.859 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

16. viWrite (0x0017CC30,"SYST:PRES.",10 (0xA),10 (0xA))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:17.859 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

17. viWrite (0x0017CC30,"FUNC "RES", (@);:SEN...",122 (0x7A),122 (0x7A))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:18.781 Call Duration: 00:00:00.020
Status: 0 (VI_SUCCESS)

18. viWrite (0x0017CC30,"MEAS:FRES? AUTO, (@101).",24 (0x18),24 (0x18))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:19.742 Call Duration: 00:00:00.010
Status: 0 (VI_SUCCESS)

19. viSetAttribute (0x0017CC30,0x3FFF001A,320000 (0x4E200))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:19.752 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)

20. viRead (0x0017CC30,"+1.08185990E+02..",500 (0x1F4),17 (0x11))
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:19.752 Call Duration: 00:00:00.130
Status: 0 (VI_SUCCESS)

21. viClose (0x0017CC30)
Process ID: 0x0000033C Thread ID: 0x0000042C
Start Time: 14:52:21.214 Call Duration: 00:00:00.000
Status: 0 (VI_SUCCESS)


Thanks,

Dirk
0 Kudos
Message 3 of 10
(3,898 Views)
Thanks for doing the experiment.

Step 17 appears to be the interesting one. Can you double-click on that NI-Spy entry and show all 122 bytes that were sent to the instrument? They're truncated in the output above.

Thanks.

Brian
0 Kudos
Message 4 of 10
(3,898 Views)
I'm not sure which of the entries shows the bytes that were sended, so i'll past all information shown there.

Input
vi 0x0017CC30
&buf 0x7FAB8E08
cnt 122(0x7A)
&retCnt 0x0269FEF4

Output
*retCnt 122(0x7A)

I hoped this information contains the sended bytes.

Thanks.

Dirk
0 Kudos
Message 5 of 10
(3,898 Views)
There should be a "buffer" tab that shows all the data that's being sent to the instrument.

Brian
0 Kudos
Message 6 of 10
(3,898 Views)
Buffer Contents (Abbreviated)
00000000: 46 55 4E 43 20 22 52 45 FUNC "RE
00000008: 53 22 2C 20 20 28 40 29 S", (@)
00000010: 3B 3A 53 45 4E 53 3A 52 ;:SENS:R
00000018: 45 53 3A 4F 43 4F 4D 20 ES:OCOM
-----------------------------------------------------
0000005A: 2C 20 20 28 40 29 3B 3A , (@);:
00000062: 53 45 4E 53 3A 52 45 53 SENS:RES
0000006A: 3A 52 41 4E 47 20 4D 41 :RANG MA
00000072: 58 2C 20 20 28 40 29 0A X, (@).

Dirk
0 Kudos
Message 7 of 10
(3,898 Views)
It's a bummer that NI Spy truncates the data like this. In this little section of output, it is maybe a little bit strange that there's an extra space before the "(@)". If you felt up to it, you could try finding out where that space is in the VI and try removing it.

We'll try to scrounge up a 34970 and test this ourselves. (Or maybe someone else out there can beat me to it!)

Brian
0 Kudos
Message 8 of 10
(3,898 Views)
I can try to get one today or tomorrow to check out the driver but one thing I notice is that the channel list is empty. After each of the @ signs, I thought the syntax required a channel (i.e. @102) or channel list (i.e. @102,103).
0 Kudos
Message 9 of 10
(3,898 Views)
I found the mistake. The syntax requires a channel and I simply forgot to connect the scan list to the vi.

Although it gave me different data for a measurement on the same channel (supposed to be with and without offset compensation turned on), so I belived that it worked. I'll do the test again to see what he was actually measuring.

Thanks a lot for your help.

Dirk
0 Kudos
Message 10 of 10
(3,898 Views)