Hello Lubin,
I want to send 3 data(6 bytes) within one time step(0.0005s) and set Baud rate = 115200(kb/s).
And the max is 5.75 Bytes/Step was read on UART Configuration block.
Obviously, the UART can't not send 3 data within one time step.
Thus,from your example, I use the Tx_Output block(not the Tx_matlab) to send my datas.
On the rs232gui, I press down the RAW button and clear the script.
But rs232gui received nothing after dsPic started.
And the R is also all zero in workspace.
Could you help me? Thx!
or is there anthor way to send more data within one time step?
Magic
send more data within one time step
send more data within one time step
- Attachments
-
- MC710_ID2.mdl
- (56.5 KiB) Downloaded 604 times
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: send more data within one time step
Hi Magic,
Thx for the Screen shoot.
I am not sure that model was very well doccumented. However, you may find on the page :
Anyway, to do it much more simple, replace the Triggered Log Data block by the Tx block it contains. (you don't really care about trigger here do you ?
You will then receive your data. But you are sending 7 bytes that is much that the max allowed by the UART as you mention. You should slow down the model time step to allow logging all datas. You may also just slow down few blocks (thus creating a multirate model).
Lubin
Thx for the Screen shoot.
I am not sure that model was very well doccumented. However, you may find on the page :
There was on the original model a block with sublocks that received data from the UART interface. This one is not present on your model. It is inside the TinyBld Reset block in the model : http://www.kerhuel.eu/wiki/images/8/86/ ... ta_Raw.pngOn the embedded simulink model, a mechanism allow to send data during a predefined time: The model embedded on the dsPIC send data only when the value variable60 is different from 0. This variable is changed through the UART using the same rs232gui graphical user interface with the send1 and send2 button. When receiving values [60 x], the embedded simulink model load the value x into the Simulink variable 'variable60'. The Simulink model decreases automatically this variable at a sampling rate of 1 second. This mechanism makes the user able to log data during a predefined time.
Anyway, to do it much more simple, replace the Triggered Log Data block by the Tx block it contains. (you don't really care about trigger here do you ?
You will then receive your data. But you are sending 7 bytes that is much that the max allowed by the UART as you mention. You should slow down the model time step to allow logging all datas. You may also just slow down few blocks (thus creating a multirate model).
Lubin
Who is online
Users browsing this forum: No registered users and 17 guests