Parameter RS232 use for win real-time target
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everybody,
i'm trying to read out a sensirion fluid flow sensor. its connected via rs-232 serial port (com1). The Aim is to read the sensor out in "real-time"- the max-frequency is 200 Hz. so i've got three question:
1. am i right if the baudrate is 19200 and the information is given in 8 bits plus 1 stop bit and i need 6 bytes so the system has to transmit 54bits in these 5ms? (and 19200*0.005=96 are max?)
2.it worked without delay only once...now i have normaly a delay of ~6s, witch is the whole standard-buffer (512bytes filled in 6s- 200Hz,4Bytes per measurement, so i thought it must be kind of a FIFO-system. but tthe buffer was reduced to just the 6 bytes i need to work with all the time
3. are the paramters for real-time target -blocks. i cant get the normal serial-blocks running in the real-time target. i tryed to use the real-time-blocks but couldnt find the right parameters. (Baud Rate 19200 Data Bits 8 Stop Bits 1 Parity none Protocol none Echo the sensor generates an echo)
i would be very lucky if somebody could help me! thanks
greetings Hansjörg
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 28 Feb. 2011
You missed the 1 start bit. With 1 stop bit and 1 start bit and 8 bits per byte, a total of 10 bits per byte is sent, which would be 60 bits for 6 bytes. That would be 1920 bytes per second at most, which would have time for up to 320 Hz.
With regard to the delay in reading: be sure to turn the terminator character off so that the read routines do not wait for a timeout when they do not get the terminator.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Target Computer Setup finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!