09-17-2019 03:21 AM
Hello,
I recently started using the USB-8506.
How do I turn on the property Intf.LIN.Term?
I can't find such variables or structures.
Komao
09-18-2019 08:15 AM
Hi komao
Check out the XNET Manual below. I believe you'll be interested in the following pages:
nxSetProperty: pg. 5-119
Interface:LIN:Termination: pg. 5-332
NI-XNET Hardware and Software Manual - National Instruments
http://www.ni.com/pdf/manuals/372840h.pdf
09-19-2019 12:31 AM - edited 09-19-2019 12:35 AM
Hi Jiwhan
NxPropSession_IntfLINTerm that you taught me was a hint.
I found the nxSetProperty () and nxGetPropertySize () APIs.
I made the following function.
|void setNxProperty(nxSessionRef_t sessionHandle, u32 propertyID, void* propertyValue) {
| nxStatus_t nxStatus = 0;
|
| //Queries the property size
| u32 propertySize = 0;
| nxStatus = nxGetPropertySize(sessionHandle, propertyID, &propertySize);
| if (nxStatus != nxSuccess) {
| DisplayErrorAndExit(nxStatus, "nxGetPropertySize");
| }
|
| //Set properties with that size
| nxStatus = nxSetProperty(sessionHandle, propertyID, propertySize, propertyValue);
| if (nxStatus != nxSuccess) {
| DisplayErrorAndExit(nxStatus, "nxSetProperty");
| }
|}
And I called it as below.
| u32 intfLINTerm = nxLINTerm_On;
| setNxProperty(nxSessionHandle, nxPropSession_IntfLINTerm, &intfLINTerm);
I think the data line will be pulled up if the settings are fine.
So I checked the voltage between pins 3-7 of D-SUB, but it was 0V.
Perhaps the setting has failed.
Compilation passes and there is no error display.
Is my verification method bad?
Although the explanation was delayed,
the development environment is VS2017.
Komao