From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI tkds5000 LabWindows/CVI IVI driver works for TDS5104, not TDS5054B

Solved!
Go to solution

I'm trying to get the NI LabWindows/CVI IVI driver (tkds5000 version 1.212) working for the Tektronix TDS5054B oscilloscope.  Whenever I execute the following functions, I get the 0xBFFA0010 "Invalid value for parameter or property" warning:

 

IviScope_InitiateAcquisition

IviScope_GetAttributeViInt32 for IVISCOPE_ATTR_TRIGGER_SCOPE and IVISCOPE_ATTR_ACQ_TYPE

IviScope_ActualRecordLength

 

This is not an exhaustive list of functions that don't work, but just a few that I am currently seeing.  There are several functions that are working (see attached NI SPY file).

 

The weird thing is that everything works fine when I have a Tektronix TDS5104 oscilloscope connected (see attached NI SPY file).  The code also works when I have a TDS3054 oscilloscope connected and NI's tkds30xx IVI driver selected through MAX. 

 

Is it possible that the tkds5000 version 1.212 driver does not fully support the TDS5054B?  I looked through the tkds5000.c and tkds5000.h files but did not see any dependencies on the oscilloscope model for these functions.  Any ideas?

 

Thanks!

Dave

 

Download All
0 Kudos
Message 1 of 8
(4,523 Views)

Hello Dave,

       Please make sure that you are enabling the ID Query.  That will allow the driver to recognize the exact instrument model and treat it appropriately.  Please also go through the steps in the Instrument Driver Troubleshooting Guide and let us know if you are still having problems.

 

Cheers,

 

NathanT

Message 2 of 8
(4,488 Views)

Hi NathanT,

 

Thanks for helping me out with this.  I had ID Query enabled already.  Please see the attached test.txt file.  Upon calling IviScope_InitiateAcquisition, I get the non-fatal runtime error 0xBFFA0010 (Invalid value for parameter or property).  I went through the Instrument Driver Troubleshooting Guide you provided.  I believe I've covered steps 1 through 12 as everything is working fine for a TDS5104 oscilloscope, just not for the TDS5054B.  Here are the versions of software I have loaded:

 

CVI 8.5.0

CVI AddOns LabWindows/CVI Shared AddOns

CVI Run-Time 9.1.0.428

IVI Compliance Package 4.3

Measurement & Automation Explorer 4.6.1.49152

NI-VISA 4.6.2

NiVisaServer.exe 4.6.2.49153

Nivisaic.exe 4.6.2.49153

NI-VISA Runtime 4.6.2

 

Here are the results after calling IviScope_revision_query:

buffer1 = "Driver: tkds5000 1.212, Compiler: CVI 9.10, Components: IVIEngine 4.10, VISA-Spec 4.00"

buffer2 = "CF:91.1CT FV: 2.0.11"

 

The above code is just shows that IviScope_InitiateAcquisition errors out.  Many of the functions are working for the TDS5054B oscilloscope, just a few of them are not (my original post showed a few others with a NI-SPY result).

 

Is there anything I can try next?

 

Thanks very much!

0 Kudos
Message 3 of 8
(4,477 Views)

Hello Dave,

      Thanks for including more information.  This is an interesting problem.  Please post the .spy file of running the IVIScope example from "C:\Documents and Settings\All Users\Documents\National Instruments\CVI\samples\IVI\IviScope" with both instruments.

 

Thanks,

 

NathanT

Message 4 of 8
(4,431 Views)

Hi NathanT,

 

Thanks again for your help.  I'm even more confused than before, but hopeful.  The IVIScope example executed without errors for both instruments.  I went back and added the IVI function calls that were failing in my program into iviscopu.c (see attached iviscopu.c, lines 192-194) and they all executed without errors.  I then switched to my project and ran it.  As before, these IVI function calls work for TDS5104 but not TDS5054B.

 

I've attached the .spy files for both scopes when running the IVIScope example followed by my program.  In "TDS5054B Capture.spy", note lines 23-25 where it successfully executes the same functions that fail in my program (lines 59, 63, and 71).  At this point, I'm looking into the timing and ordering of the function calls, but I doubt that is going to solve the problem.  Any more ideas?

 

Thanks so much!

Dave

 

Download All
0 Kudos
Message 5 of 8
(4,404 Views)
Solution
Accepted by topic author dmoto20

Okay, so I figured it out.  The NI tkds5000 driver is working fine.  The problem is that the Tektronix TDS5054B scope does not "initialize" some of the attributes.  For instance, I was having a problem reading the value for the trigger slope attribute because an invalid value was returned.  If I set the trigger slope first, then read it, it works fine.

 

Its weird because most of the attributes are set to the proper value corresponding to what is displayed on the oscilloscope screen and panel, just not ALL of them.  Also, the other Tektronix oscilloscopes did not require a write before reading. 

 

Anyway, thanks very much NathanT.  I appreciate your help.  You saved me a bunch of time having to go back and add in a dedicated driver.

 

-Dave

Message 6 of 8
(4,398 Views)

Hello Dave,

     I am very happy to hear that you found out what was causing the problem and now know that you need to explicitly configure all of the settings on the TDS5054B that you want to use.

 

Cheers,

 

NathanT

Message 7 of 8
(4,344 Views)

I just wanted to update this in case anybody else runs into this issue.  Turns out that explicitly configuring all of the settings did not solve the problem.  I thought that was the case because when I did that the code started working.  In actuality, at some point during my debugging, "VERBOSE" was set ON.  I found out that when trying to read, for example, the acquisition mode, the TDS5104 was returning "SAMPLE" whereas the TDS5054B was returning "SAM".  The tkds5000 driver was expecting "SAMPLE", so it would error out when it received just "SAM".  Sending "VERBOSE ON" after initialization fixed the problems.

Message 8 of 8
(4,099 Views)