Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

protocol lin: how to program via serial the synchro break field

hello
i have to program using labview the LIN protocol
there is no difficulty to program the master fields because each one excepted the first one contains 8 data bits
but i have a problem programming the synchronisation break field (the first one): it has more than 8 data bits and i dont know how to remove the first stop bit
can anyone help?
thnks in advance.
al
 
0 Kudos
Message 1 of 7
(3,513 Views)
What hardware are you using to implement the LIN protocol?
0 Kudos
Message 2 of 7
(3,503 Views)
there is no special hardware:
labview generates the protocol via the serial port.
after that i have a box that transforms the signal from -5 +5V to 0-12V that's all
my issue is only soft and i don't know how to remove the stop bit for the first field.
regards
 
0 Kudos
Message 3 of 7
(3,498 Views)

Hi,

It's not clear how your data looks like, but from what you are writing I think you can use a fixed (mark or space) parity to solve your problem to read/write more then 8 bits with a fixed 9th bit.

I use this to monitor a interface which uses 9 bit data 'bytes'

0 Kudos
Message 4 of 7
(3,495 Views)
Try changing your baud rate. To get the 13 dominate bits that you need for LIN, you can shrink your baud rate proportionally. For example, if your baud rate is 19200, your standard bit time is ~52us/bit. A normal transfer w/ data byte value of '\0', will have 9 bit times of the dominant value (start bit + 8 data bits), which is ~470us of total dominant time. You need to have 13 bit times, which would be ~677us of dominant time. If you do the inverse math, which means, which baud rate do I need so that a normal 9-bit times would use 677us of dominant time, you would find out that a baud rate of ~13,292 would be sufficient. You can validate this with a scope to determine if your times are long enough.

Simplified math to increase the baud rate the time (what normally takes 13 bit times, you want to do in 9 bit times):

baudrate           9
-------------   * ---------
                         13

Does this make sense?


0 Kudos
Message 5 of 7
(3,484 Views)
ok i check and keep you aware thnk you
 
 
0 Kudos
Message 6 of 7
(3,479 Views)

Hello,

The simplest solution is the VISA Serial Break VI with 2 ms duarion, that is enough for all devices that use baud rate from 9600.

 

0 Kudos
Message 7 of 7
(2,910 Views)