Simulink Real-Time and non-Speedgoat Machine
92 views (last 30 days)
Hello dear MATLAB community
I would like to know if it is possible to use Simulink Real-Time with conventional PC as a target machine - e.g. without Speedgoat HW? I know that previous product - XPC Target was supporting this, but now I don't see any evidence, how to setup own target machine for Real-Time. Speedgoat Machine in standard case is also nothing else than single-board PC.
I know there is Desktop Real-time Toolbox exists, but would be interested in Simulink Real-Time, as latter supports fieldbusses, like EtherCAT, allowing easy I/O extension - and this is all I need from target PC connectivity.
Can somebody explain if it's possible or not?
Rodrigo Botelho on 1 Aug 2019
As far as I could find in the release notes, Simulink Real-Time removed the support for non Speedgoat targets on R2018a.
If working with older version is not an issue, the last time I saw something about custom target was on r2017b. Not sure about the blocks supported, though.
More Answers (3)
Ivo Houtzager on 23 Aug 2020
Edited: Ivo Houtzager on 15 Dec 2020
Answer for Simulink Real-Time version up to 2020a. The target PC must be able to run DOS. Thus motherboards with UEFI only firmware will not work. You need BIOS firmware or UEFI firmware with BIOS legacy support (to be enabled in boot settings screen). The target PC must also have a supported ethernet device, see the device list in Simulink Real-Time Explorer discussed in Step 5.
- Download FreeDOS Lite USB image from https://www.freedos.org/download/
- Create bootable USB with FreeDOS Lite image using the Rufus tool from https://rufus.ie
- In Matlab, open Simulink Real-Time Explorer using the matlab command "slrtexplr"
- In the target window, select properties of the Target PC session
- Setup ethernet device and network settings in "Host-to-Target communication" dropdown list
- Select "DOS loader" in "Boot configuration" dropdown list
- Click the create boot disk icon, and select a folder on the bootable USB stick. The folder should contain the files "autoexec.bat", "rttboot.com", and "xpckrnl.rtb".
- Boot the target PC with the bootable USB
- Install FreeDOS using instructions http://wiki.freedos.org/install/
- Keep the USB plugged in target PC and select from BIOS to boot the target computer in DOS mode (and not from USB flash drive)
- At the DOS prompt, save a copy of the target computer C:\autoexec.bat and C:\config.sys file to a backup file, such as C:\autoexec_prv.old and C:\config_prv.old
- Copy the files "autoexec.bat", "rttboot.com", and "xpckrnl.rtb" from the folder on the USB flash drive to the root folder of the target computer
- Delete the C:\config.sys file
- Unplug the USB flash drive, and restart target computer in DOS mode. Real-Time Simulink Target should automatically be started.
- Connect host PC to target PC ethernet device port with ethernet cable. The ethernet device of the PC must be configured with static IP adress in the same network as configured for the target PC. Thus if IP adress of target PC is configured to 192.168.6.6 in Step 5, then host PC can be set for example to static IP adress of 192.168.6.5.
- Click connect to TargetPC in Targets window of the Simulink Real-Time Explorer
- When connected you can build and upload models from Simulink
haiping guo on 15 Dec 2020
I purchased the simulink realtime library and found that I also had to buy speedGoat to use it!
liang song on 19 Sep 2019
You absolutely can use a normal computer such as a dell computer as the target machine with Matlab 2018b at least. But heard of that, it would not work if you want to connect the target to some other peripheral using IO like RS232, etc.