04-29-2009 02:30 PM
I'm trying to use the ncSetAttribute to turn on the debugging modes of the USB-8473.
However, there is an apparent "chicken vs. egg" issue in the interface.
To use the ncSetAttribute, I need to stop the interface. The only way I know to stop the interface is to use ncCloseObject.
If I call ncCloseObject, then my ObjHandle is invalidated.
However, I need my ObjHandle to call ncSetAttribute.
If I call ncSetAttribute before calling ncOpenObject, then I don't have a valid ObjHandle to pass to ncSetAttribute.
How is this supposed to work??
04-30-2009 06:46 PM
Hi,
Please look at the following link on page 11-18.
http://www.ni.com/pdf/manuals/370289j.pdf
If you call ncSetAttribute before sending your packets you should be fine.
Are you using LabVIEW? What version?
Regards,
Sammy Z.
05-01-2009 08:56 AM
I forgot to post earlier. I figured it out. I need to call ncAction to stop the port after opening it with ncOpen.
I don't use labview.
It would be nice if NI did a better job with the C chapter of the manual. There are lots of errors in it. You end up looking at the labview chapter and trying to decide if the C code should really work like the labview code or if they are supposed to be different.
05-01-2009 09:04 AM
Hello anAlias,
Please feel free to let us know the errors you found and we will make sure they are corrected in future versions of the manual.
Thanks,
05-04-2009 10:25 PM
Hi anAlias,
I'm glad your issue is solved and thank you for your input.
Sammy Z.