03-20-2019 11:34 AM
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....?
Solved! Go to Solution.
03-25-2019 04:30 AM
Hello, I have a similar problem with this module, does anyone have an idea ?
04-25-2019 02:16 AM
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...
04-25-2019 02:38 AM
You probably want to repost this to the hardware forum board to get some response as this is the TestStand board!
04-29-2019 07:44 AM
Starting the input_session manually(nsStart) at the beginning solved the problem...hope this will be usefull for other!