High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get an error when I try to configure a channel with the tktds7x4 driver?

I use the TDS754D scope. My complete function call is:
errStatus = tktds7x4_ConfigureChannel( ScopeHandle, "CH1", 5.0, 2.0, TKTDS7X4_VAL_DC, 1.0, VI_TRUE);
When I step through it, I see that I get an error on the driver line
viCheckParm(Ivi_SetAttributeReal64 (vi, channel, TKTDS7X4_ATTR_VERTICAL_RANGE, 0, range), 3, "Range");
I'm also getting an error with tktds7x4_ConfigureEdgeTriggerSource
I just downloaded and installed this driver, and it is the first time I have tried to use it. I'm running it in Microsoft Visual C++ 6.0, but it is a C program.
0 Kudos
Message 1 of 4
(5,303 Views)
Hi Raykat,
What error are you getting? Have you been able to get this to work at all with the example programs? Also have you verified that your GPIB link is functioning correctly? You can do this by using the "*IDN?" command if your device is 488.2 compatible.

Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 2 of 4
(5,303 Views)
I hadn't done too much debugging when I wrote the question. All I knew was that I got a timeout error when I used that call. Over the weekend I tracked it down to a problem in the function tktds7x4_InvalidateTriggerAttributes, and specifically, the line
checkErr( Ivi_GetAttributeViString (vi, VI_NULL, TKTDS7X4_ATTR_INSTR_COMM_TRIGGER_SOURCE, 0, BUFFER_SIZE, triggerSource));
My scope does not have the 2C option, so there is no communication trigger function. When the driver queries the communication trigger source, the scope apparently does not return anything because it does not understand. I added the lines

if (!strcmp(triggerSource, channelName))
{
checkErr (Ivi_InvalidateAttribute (vi, VI_NULL, TKTDS7X4_ATTR_TRIGGER_LEVEL));
}
checkErr(
Ivi_GetAttributeViInt32(vi, VI_NULL, TKTDS7X4_ATTR_INSTR_OPTIONS, 0, &options));
if (isOpt2C)
{

before that line of code (at line 7360), along with a closing brace before the label "Error:"
Also, at line 399, I added the following 3 lines:
{ "CH1" , "CH1" },
{ "CH2" , "CH2" },
{ "CH3" , "CH3" },
{ "CH4" , "CH4" },
even though the comment for triggerSourceStringTableEntries says that it is for non-channel sources only. I am not positive that it was necessary, but I think it was.
With those changes, the driver now works correctly for me. I have attached my updated driver source code. I am never happy to change a commercial driver, though. If someone were to re-download this driver and re-install it, all my changes would be lost, and the driver would no longer work.
0 Kudos
Message 3 of 4
(5,303 Views)
Hi Raykat,
Thanks for the post! I will look into and document this issue.
Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 4 of 4
(5,303 Views)