LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ag6000 driver problem with CVI/Labwindows

I am new to IVI drivers and am trying to control an Agilent DSO6032A with IVI driver ag6000. I use CVI/LabWindows 6 and I have updated NI visa 4.3 and IVI Compliance Package 3.2. I am able to initialize and configure channels functions but I am having problems with configure window timebase function (ag6000_ConfigureWindowTimebase). When I run my project, the function doesn't return any error, but it seems not  to be executed at all. I set different values in range field of the function, but nothing changes. Any help?
0 Kudos
Message 1 of 8
(4,467 Views)

Can you try running NI-Spy and attach the NI-Spy capture?

KB

0 Kudos
Message 2 of 8
(4,434 Views)
I run NI-spy and I have attached the capture file
0 Kudos
Message 3 of 8
(4,415 Views)
Hello gkots,
        Could you please enable all of the options under the View Selection Tab in NI Spy, so we can see the IVI calls and not just the VISA calls?  jjp posted a link to the KB that outlines how to do it.

Looking at the IVI Specific Driver, here is the code for the function:

ViStatus _VI_FUNC ag6000_ConfigureWindowTimebase (ViSession vi,
                                                  ViReal64 position,
                                                  ViReal64 range)
{
    ViStatus    error = VI_SUCCESS;

    checkErr( Ivi_LockSession (vi, VI_NULL));
       
    viCheckParm( Ivi_SetAttributeViReal64 (vi, VI_NULL, AG6000_ATTR_WIN_TIMEBASE_POSITION, 0, position), 2, "Position");
    viCheckParm( Ivi_SetAttributeViReal64 (vi, VI_NULL, AG6000_ATTR_WIN_TIMEBASE_RANGE, 0, range), 3, "Range");
   checkErr( ag6000_CheckStatus (vi));                                          

Error:
    Ivi_UnlockSession (vi, VI_NULL);
    return error;
}

From your NI Spy capture, it looks like the driver is sending configuration commands to set the position and range.  Another troubleshooting step would be to use the VISA Interactive Control to send each command and see how the instrument responds.

Cheers,

NathanT
0 Kudos
Message 4 of 8
(4,377 Views)
I used VISA Interactive Control and the instrument's response was correct! Also I noticed that if I use the function that sends strings to the intrument [ag6000_WriteInstrData (ag6000, ":TIM:RANG 1000e-3") ], the intrument's response is again correct. With this function, I solved my problem, but I can't understand why ConfigureWindowTimebase function doesn't work.
0 Kudos
Message 5 of 8
(4,308 Views)
Hello gkots,
    I am glad to hear that things are working now.  If you would like us to look into the possible problem with the ConfigureWindowsTimebase, please post a Spy Capture that has all of the options turned on and shows the function not working properly.

Thanks,

NathanT
0 Kudos
Message 6 of 8
(4,301 Views)
I am so sorry for my delayed reply...
I ran NI-spy again (all of the options turned on) and I have attached the capture file.

I think it is the same with the first one, but I am sure that I have all the options turned on.





 




Message Edited by gkots on 04-04-2008 08:24 AM
0 Kudos
Message 7 of 8
(4,199 Views)
Thank you gkots,
          Thanks for the excellent Spy Capture!  It looks like there is a difference between the command that you are sending and the command that the driver is sending.  You are sending ":TIM:RANG 1000e-3", while the driver is sending ":TIM:WIND:RANG 5.00000e-6".  The difference between using the WIND or not is what I think the different behavior stems from.   If the behavior that you would like is evoked by the ":TIM:RANG" command, I suggest that you try the ag6000_ConfigureTimebase which (according to the help):

"This function configures the attributes that control the time base. These attributes are the time base position, range, reference, scale and vernier."

Configuring the timebase of the window might only apply to the scope's display and not the data that is actually acquired.

If your schedule allows, please try the
ag6000_ConfigureTimebase and see if that provides the behavior that you are looking for.

Cheers,

NathanT

0 Kudos
Message 8 of 8
(4,167 Views)