09-24-2008 06:43 AM
Hello,
I am trying to use the tktds1k2k drivers library to control a TDS 2022b from a C++ application.
Almost everything works great apart from this.
I am trying to give the option of delaying the trigger (or advancing it) as you can on the scope using the Horizontal Position knob, however I cant seem to find the attribute for it.
TKTDS1K2K_ATTR_ACQUISITION_START_TIME looks like the right thing but doesnt change the right value. Can anyone help?
Thanks
Dave
P.S I'm not looking for trigger holdoff, as thats a different thing entirely!
09-24-2008 07:39 AM
Hello,
Okay, I've solved the problem, it was actually my code! I needed to call tktds1k2k_InvalidateAllAttributes to reload them into cache from the scope, hence the value not seeming to update!
I have noticed one quirk though. The value returned is always the value on the scope screen minus 5 * the seconds per div so for example a position of 5 us with 1us/div timebase is reported as 0 us position
Can anyone explain to me why this is?
(for now im just going to correct the value in my software so that what the user enters is reflected on the scope screen)
Thanks,
Dave
09-24-2008 09:08 AM
Hello Dave,
When you run one of the example programs does the offset occur? If so, could you post the smallest portion of code that reproduces the problem?
Thanks,
NathanT
09-24-2008 09:14 AM
tktds1k2k_SetAttributeViReal64(currentSession, "", TKTDS1K2K_ATTR_ACQUISITION_START_TIME, triggerDelay);
triggerDelay being the horisontal position desired.
so for example with a timebase of 1us/div and triggerDelay = 5us the scope reads 0us on the screen for horizontal position.
I'm assuming that it is something which is meant to happen as its totally consistant and 5 * s/div is 5 divisions, i.e. enough divisions to push something off the scope screen, I would just like to understand why 😛
09-26-2008 08:38 AM
09-29-2008 03:26 PM
Hello Dave,
Please give the example a try and see if the problem occurs with it. Also, it is recommended to use the high level API IVI driver functions to configure the instrument because the related settings are packaged together.
Thanks,
NathanT