Packet input block not resetting to zero until new data is sent manually through Terminal in RTWT Matlab 2009b. Please help.
조회 수: 1 (최근 30일)
이전 댓글 표시
I have created a simple model which has a packet input block which stores the received data into the workspace. I have the packet input block connected to COM7 , which is connected to COM1 through a null modem cable. I run the model at a sample time of 0.1 sec and send some random characters from the terminal (COM1). I receive the characters correctly but when I send only a single character once in the simulation time , the workspace shows the same character throughout the rest of the simulation time until and unless I send another character. What could be a possible solution to this , if I don't want this to happen ?
댓글 수: 0
채택된 답변
Jan Houska
2014년 6월 16일
What you see is the correct behavior. The value of the last received character stays on the block output until a new character is received. To detect where a new character has been received, please use the Data Ready output of the block. A value of one on this output port indicates that new data has been recieved, a value of zero indicates that no new data has been received. You can combine this signal with the output data to produce whatever result you need.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Target Computer Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!