How am I receiving a "Attempted write to hardware FIFO that i'snt ..." on xPC Target?

2 views (last 30 days)
Hello my friends,
I'm trying to simulate a serial communication with a specific sensor.
The sensor sends two different messages with two different sample times.
Message 1: 10 bytes at 300 Hz. Message 2: 20 bytes at 120 Hz.
Futhermore, the sensor needs to READ and ANSWER some configuration commands before start sending the two messages above.
I used the Quatech ESC-100 blocks from Matlab 2009b to create three inputs. All three inputs will write to the same serial port. One input for message 1, another one for message 2 and the last one for the configuration messages.
While starting the simulation, the error appears: "Attempted write to hardware FIFO that i'snt .... . I could not read more. The message desappears at the edge of the monitor.
I did the same stuff but I removed the third input. Then, it works fine. Only the two messages with fixed sample times. The configuration messages were removed.
My guess is that the FIFO serial port can support only two tasks of writing.
Could someone elucidade this problem?
I using matlab 2009b with xPC Target and a Quatech ESC-100 serial board.
I thank you in advance for help!
Att. Alexandre.
  3 Comments
Alexandre
Alexandre on 28 Feb 2014
I'm sorry for the late answer. I did not receive the message that you respond.
1.
No, I am using the ESC-100 board. Without the F option.
2.
I am emulating a sensor that send 2 messages with different sample times through the same
serial channel. Beside these two messages, the sensor still need to answer some
configuration commands that do not have any frequency.
Imagining the ESC-100 blocks with 8 inputs and 8 outputs. I just changed the parameter
"Port" of the last three channels to the same channel. By doing this, I have 3 different
inputs at the ESC-100 block that points to the same channell but with different sample
times.
The mux option cannot be done because the messages have different sample times. The mux
block only works with inputs with the same sample time.
3.
I did another test only with the two messages (message1: 40bytes/300Hz and message2:
60bytes/120Hz). This is working FINE! However, the message 2 has now 68 bytes, with the same
120Hz sample time. When I run this simulation, the error returned: "Attempted write to
hardware fifo that isn't empty". The configuration message was removed for this case.
4.
I tried to increase to the maximum of 64 but it still did not work. Why this maximum is 64?
Well, I hope that these answers could help you to help me.
Best Regards, Thanks a lot in advance.
Att. Alexandre.
Suneesh
Suneesh on 28 Feb 2014
I am looking at the ESC-100 block. It has 8 ports and when you double click on it you set 'Port to modify' to 1 to set properties of the port 1 such as Baud rate etc. And you can do this for ports 2, 3 ... 8. I do not understand what you mean by "changed the parameter "Port" of the last three channels to the same channel". In fact, not quite sure what you mean by channels at all, in the RS232 sense. This might take the model to debug. Your best bet may be to send the example model to tech support.

Sign in to comment.

Answers (0)

Categories

Find more on Messages 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!