Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

ncSetAttribute, USB-8473

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??

 

0 Kudos
Message 1 of 5
(7,113 Views)

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.

0 Kudos
Message 2 of 5
(7,098 Views)

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. 

0 Kudos
Message 3 of 5
(7,093 Views)

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,

O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 4 of 5
(7,091 Views)

Hi anAlias,

 

I'm glad your issue is solved and thank you for your input.

 

Sammy Z.

0 Kudos
Message 5 of 5
(7,068 Views)