Cannot read data using Baseboard/Legacy Serial Read block in Simulink Real-Time (SLRT)

I am not able to receive data on the baseboard serial port of my Speedgoat machine using the following blocks from the Simulink Real-Time / RS232 / Mainboard library:
For 2020a and earlier, you can access the documentation for the relevant blocks by executing the following commands in MATLAB R2020a:
  • RS-232 Send/Receive:
    web(fullfile(docroot, 'xpc/io_ref/rs232sendreceive.html'))
  • RS-232 Send/Receive FIFO:
    web(fullfile(docroot, 'xpc/io_ref/rs232sendreceivefifo.html'))
For 2020b and later, use the following commands in MATLAB R2020b to access the documentation:
  • Legacy Serial Read:
    web(fullfile(docroot, 'slrealtime/io_ref/legacyserialread.html'))
  • Legacy Serial Port:
    web(fullfile(docroot, 'slrealtime/io_ref/legacyserialport.html'))
  • Legacy Serial Port F:
    web(fullfile(docroot, 'slrealtime/io_ref/legacyserialportf.html'))
When I use these blocks to read data off the baseboard serial COM port, I receive nothing but zeros.

 Accepted Answer

(1) Ensure that your block diagram contains a Legacy Serial Setup block that is properly configured, and ensure that the Serial Port selected in both of these block parameters match. To access the documentation, run the following command in MATLAB R2020b:
web(fullfile(docroot, 'slrealtime/io_ref/legacyserialsetup.html'))
Consider using the Legacy Serial Port block instead of the Legacy Serial Read block in isolation. Note that the Legacy Serial Port block is a subsystem that contains the Legacy Serial Read block and necessary Setup blocks.
(2) Try running one of the following Legacy Serial block examples on your target hardware:
Ensure that the correct COM port is selected in the Legacy Serial Port block parameters.
(3) If you are using a 3-wire connection (TX data, RX data, and ground) instead of a full 7-wire connection, then make sure the checkbox in the serial blocks for RTS/CTS is NOT on. See the following documentation for more information on the Enable RTS/CTS parameter:
(4) If this does not resolve the issue, please run the following command:
>> slrealtime.getSupportInfo
For more information about this command, execute the following command in MATLAB R2020b to access the documentation:
web(fullfile(docroot, 'slrealtime/api/slrealtime.getsupportinfo.html'))
Please contact MathWorks Technical Support and attach the output TXT file generated by the above command.
Please follow the below link to search for the required information regarding the current release:

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!