Arduino TCP/IP Send with vector of uint8
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I'm attempting to use the Support Package for Arduino Hardware to make an Ethernet shield equipped Arduino Due send data from multiple sensors over TCP/IP to a Simulink model running on the PC. I can run the example "arduinodue_tcpsend" which takes the output of a "Counter Limited" block with endpoints [0 255] and routes that to the input of the Arduino "TCP/IP Send" block.
Extending this example by using a "Mux" block to combine the outputs of two "Counter Limited" blocks and send the vector signal to the "TCP/IP Send" block produces the following error:
Error in port widths or dimensions. Output port 1 of 'arduinodue_tcpsend/TCP//IP Send/Data Type Conversion' is a one dimensional vector with 2 elements.
Error in port widths or dimensions. Input port 1 of 'arduinodue_tcpsend/TCP//IP Send/TCP Send' is a one dimensional vector with 1 elements.
Is there a simple workaround here? I noticed that the help documentation for the "Arduino Serial Transmit" block explicitly states that it "accepts vector or scalar uint8 data", but the documentation for the "Arduino TCP/IP Send" block says "accepts uint8 values". For my application, however, TCP/IP is highly preferable.
0 Commenti
Risposte (1)
Sreeram Mohan
il 7 Gen 2015
Hi John,
One workaround you could try though is you could use multiple TCP IP send blocks in the model with different port numbers and receive them on the host model and may be then combine them on the host using a mux or what ever and interpret the data as needed.
By default looks like upto 4 distinct ports are supported ! Hope this helps
Thanks,
Sreeram Mohan
0 Commenti
Vedere anche
Categorie
Scopri di più su Modeling in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!