10-04-2005 12:16 AM
When i set the WriteTermination property to Break the write functions doesn't work.
VC#.net code
Init code
mbSession = (SerialSession)ResourceManager.GetLocalManager().Open(resourceString);
mbSession.WriteTermination = SerialTerminationMethod.Break; // if i include this line, Write function doesn't work,
write function
mbSession.Write(writeBuf); // this function does't work if WriteTermination is set to SerialTerminationMethod.Break it immediatly send break signal
10-05-2005 11:09 AM
10-07-2005 08:38 AM
mbSession = (SerialSession)ResourceManager.GetLocalManager().Open(sr.ResourceName);
// mbSession.WriteTermination = SerialTerminationMethod.LastBit; //works
// mbSession.WriteTermination = SerialTerminationMethod.None; //works
// mbSession.WriteTermination = SerialTerminationMethod.None; // works
mbSession.WriteTermination = SerialTerminationMethod.Break;
//does not work none, term10-10-2005 06:36 PM
Hi Jan,
Is there possibly a problem with your instrument responding to this command? Can you use the other termination methods or is the Break needed. I know this is just a workaround for now, but I wanted to check anyway. What instrument and software are you using? With this information, I may be able to check known bugs in the software to see if this may be the problem. Are you using an NI-Serial device? If so, which one and what version of the NI-Serial drivers are you using? Let me know and I will look further into your issue.
Chris R.
10-11-2005 09:00 PM
Hello Chris
Break signal is defined in the LIN bus standard used in automotive applications
before each transfer a break signal has to be generated of at least 13 bits long. For testing our application according the LIN-bus i thus need to generate the break signal.
I didn't check yet, if manually generating the break signal by the brake state property works.
Regards, Jan
10-13-2005 07:10 PM
10-18-2005 03:23 AM
Hello Chris
I use VC#. Following code works. Do you have any function available to wait for fixed nr of milliseconds to replace the for loop.
mbSession.BreakState = LineState.Asserted;
for (i=0; i<200000;i++);mbSession.BreakState = LineState.Unasserted;
regards, Jan
10-18-2005 08:31 AM