LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem adjusting vertical offset for Tektronix 1k 2k series oscilloscope

Hello all,
 
I downloaded the instrument driver for our Tektronix TDS1012 from the National Instruments website. Everything works great, except that I cannot adjust the vertical offset of a channel. When I want to adjust the vertical offset, using the tktds1k2k_ConfigureChannel or tktds1k2k_SetAttributeViReal64 function, nothing happens. The offset just remains unchanged. Also, when I want to read back this paramter, using the tktds1k2k_GetAttributeViReal64 function, the value always returns zero, no matter what the actual offset is...
 
Is there anyone who has seen this problem before and/or knows a solution or a workaround?
0 Kudos
Message 1 of 4
(3,794 Views)
Hello,

I think I have seen the same problem :
The driver does not use any more the VERTICAL_OFFSET attribute (wich is a standard attribute of the scope class) but the VERTICAL_POSITION attribute (wich is not a standard attribute).
The standard function tktds1k2k_ConfigureChannel uses the VERTICAL_OFFSET attribute.
The function accepts only one value for the vertical offset, which is 0 (zero). I think the function will return a parameter error if you set the vertical offset to another value.

Workaround = Set the value of the VERTICAL_POSITION attribute :

  • Use the ConfigureChannel function as usually, but set the vertical offset to 0.
  • Set the vertical position to the right value :
tktds1k2k_SetAttributeViReal64(hndl, channelName, TKTDS1K2K_ATTR_VERTICAL_POSITION, IVI_VAL_DIRECT_USER_CALL, 10 / ChannelRange * ChannelOffset);
Hope this help
Bruno

Message 2 of 4
(3,785 Views)
Thanks a lot Bruno, I'll try this tomorrow..
0 Kudos
Message 3 of 4
(3,777 Views)
This works great! Sorry for the late reply, but you deserve your stars, Bruno Smiley Very Happy
0 Kudos
Message 4 of 4
(3,726 Views)