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.