Matlab serial communication cannot be entered BreakInterruptFcn event

16 views (last 30 days)
Hello everyone, I encountered a problem when doing matlab serial communication. My lower computer sends a signal every 200m, but I set the BreakInterruptFcn function and failed to trigger the callback function. The matlab document explanation of BreakInterruptFcn is:You configure BreakInterruptFcn to execute an M-file callback function when a break-interrupt event occurs. A break-interrupt event is generated by the serial port when the received data is in an off (space) state longer than the transmission time for one byte.
Can anyone tell me the trigger conditions of BreakInterruptFcn or how to trigger BreakInterruptFcn?
The properties of my serial port object are:
get(ControlObj)
ByteOrder = littleEndian
BytesAvailable = 0
BytesAvailableFcn = [1x1 function_handle]
BytesAvailableFcnCount = 30
BytesAvailableFcnMode = byte
BytesToOutput = 0
ErrorFcn =
InputBufferSize = 1500
Name = Serial-COM3
ObjectVisibility = on
OutputBufferSize = 1500
OutputEmptyFcn = [1x1 function_handle]
RecordDetail = compact
RecordMode = overwrite
RecordName = record.txt
RecordStatus = off
Status = closed
Tag =
Timeout = 1
TimerFcn =
TimerPeriod = 1
TransferStatus = idle
Type = serial
UserData = []
ValuesReceived = 0
ValuesSent = 0
SERIAL specific properties:
BaudRate = 9600
BreakInterruptFcn = [1x1 function_handle]
DataBits = 8
DataTerminalReady = on
FlowControl = none
Parity = none
PinStatus = [1x1 struct]
PinStatusFcn =
Port = COM3
ReadAsyncMode = continuous
RequestToSend = on
StopBits = 1
Terminator = CR
Can anyone help me, thanks in advance!!!

Answers (1)

hui wang
hui wang on 3 Sep 2020
is connect with RS232

Categories

Find more on Manage Products in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!