NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

USB8506/2

Solved!
Go to solution

Hello

For an application using C# and USB8506 component with the "nixnet.dll"

I have to send master request frame onto the lin bus and then read the slave response,

to make that i use the sequence bellow

-------------------------------------------------------------------------------------------------------------------------

nxCreateSession("database", "Cluster", "frame0,frame1", LIN0,nxMode_FrameOutStream, m_OutputSessionRef);
nxCreateSession("database", "Cluster", "frame0,frame1", LIN0,nxMode_FrameInStream, m_InputSessionRef);
nxWriteFrame(m_OutputSessionRef, l_OutputBuffer, 24, 0);
nxWriteState(m_OutputSessionRef, nxState_LINDiagnosticScheduleChange, sizeof(uint), nxLINDiagnosticSchedule_MasterReq);
nxWriteState(m_OutputSessionRef, nxState_LINDiagnosticScheduleChange, sizeof(uint), nxLINDiagnosticSchedule_SlaveResp);
nxReadFrame(m_InputSessionRef, l_InputBuffer, 24, 5.0, l_NumBytes);

nxWriteState(m_OutputSessionRef, nxState_LINDiagnosticScheduleChange, sizeof(uint),nxLINDiagnosticSchedule_NULL);
nxWriteState(m_InputSessionRef, nxState_LINDiagnosticScheduleChange, sizeof(uint), nxLINDiagnosticSchedule_NULL);

nxClear(m_OutputSessionRef);
nxClear(m_InputSessionRef);

-------------------------------------------------------------------------------------------------------------------------

 

When I start my application and "NI-MAX" together all is good

but if I stop "NI-MAX" I have no response (nxReadFrame end with error (Hex 0xBFF6300A)).

Where does this problem could come, do we have to use temporisation between the dll function....?

 

 

0 Kudos
Message 1 of 5
(3,036 Views)

Hello, I have a similar problem with this module, does anyone have an idea ?

0 Kudos
Message 2 of 5
(2,999 Views)

I try other test changing the USB8506 with a PCI8516 but I have the same problem,

I add "nxReadState(nxState_LINComm)" between each functions but no error are returned

Is there a mistake in my sequence...

0 Kudos
Message 3 of 5
(2,925 Views)

You probably want to repost this to the hardware forum board to get some response as this is the TestStand board!

Regards
Ray Farmer
0 Kudos
Message 4 of 5
(2,923 Views)
Solution
Accepted by topic author nite

Starting the input_session manually(nsStart) at the beginning solved the problem...hope this will be usefull for other!

0 Kudos
Message 5 of 5
(2,883 Views)