02-15-2007 02:51 PM
Thanks,
Ian
02-16-2007 12:51 PM
02-16-2007 01:10 PM
The function GetTerminalNameWithDevPrefix is used in the sample source code that illustrates how to synchronize multiple devices (NI-DAQ\Examples\DAQmx ANSI C\Synchronization\Multi-Device\Continuous AI\ContinuousAI.c) as well as how to synchronize AI an DI (NI-DAQ\Examples\DAQmx ANSI C\Synchronization\Multi-Function\ContAI-Read Dig Chan\ContAI-ReadDigChan.c). I suspect this function can be found in a number of other samples.
Thanks,
Ian
02-19-2007 07:35 PM
Hello Ian,
It seems as if the code is actually meant to be doing that. The "strcat(strcat(strcpy(triggerName,device),"/"),terminalName);" function needs to be executed every time in the code. Please notice that the triggerName is actually used in this function. On the other hand if the IF CONDITION (if( productCategory!=DAQmx_Val_CSeriesModule && productCategory!=DAQmx_Val_SCXIModule )) is not met only then does the triggerName need to be appended with a "/". This is just checking to make sure that the triggerName is in the right format before it is used in the function right after it.
Best Regards,
Raajit L | Applications Engineer | National Instruments
02-19-2007 07:59 PM
Hello Raajit,
Thank you for the information. If I might make a small suggestion, the indentation in the sample code could be removed to avoid any possible misinterpretation. For example:
Thanks,
Ian
02-20-2007 02:44 PM
Hello Raajit,
There is one point I would like to understand before closing this posting.
The function GetTerminalNameWithDevPrefix uses a while loop:
while( i<=numDevices ) {
...
break;
}
Because of the 'break' , the statements within this 'while loop' only get executed once. So what is the purpose of having a 'while loop' ?
The effect of having a 'while loop' plus indenting the line containing the 'strcat( strcat... ) )' function call produces code that, from a visual point of view, is confusing and more than a little ambiguous as to intended functionality.
Just to be clear, would you please confirm to confirm that the 'while loop' can be safely removed and that the actual operation performed by this GetTerminalNameWithDevPrefix is actually suppose to be as follows:
static
int32 GetTerminalNameWithDevPrefix(TaskHandle taskHandle, const char terminalName[], char triggerName[])Error:
return error;
}
Best regards,
Ian
02-20-2007 07:21 PM
02-21-2007 09:16 AM
Hello Raajit,
Please refer to my message of 02-16-2007 01:10 PM.
Ian
02-22-2007 04:30 PM - edited 02-22-2007 04:30 PM
Message Edited by Raajit L on 02-22-2007 04:32 PM
02-22-2007 07:08 PM
Hello Raajit,
The work around solution you suggest is no different from what I suggested earlier. My question was is it sufficient or does it require the 'while loop'? If you do not know then do you have an idea of how long it might take for your R&D department to respond to report # CAR ID 45L7LTQZ?
Best regards,
Ian