- Download the attached modified targetping.p file which attempts to connect to the target in a slightly different way
- Start MATLAB in administrator mode
- Type cd([xpcroot,'\xpc\+xpctarget\@xpc'])
- Rename the existing targetping.p to targetpingOLD.p as a backup
- Copy the downloaded targetping.p file to that directory
- Execute 'rehash toolbox'
- Try 'xpctargetping' several times, and there is a good chance it will succeed.
Why does 'slrtpingtarget' fail?
25 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 9 de Nov. de 2016
Editada: MathWorks Support Team
el 4 de Feb. de 2025
Why does the 'slrtpingtarget' command fail after I boot and connect to my target PC with Simulink Real-Time R2020a or earlier?
Respuesta aceptada
MathWorks Support Team
el 24 de En. de 2025
Editada: MathWorks Support Team
el 4 de Feb. de 2025
The command 'slrtpingtarget' (formerly 'xpctargetping') can fail for various reasons as it involves the full connection chain of the host PC, Ethernet cable, and the target PC. Malfunctioning of anything along this pipeline, at software or hardware levels, can lead to the failure of 'slrtpingtarget'.
Below are some common issues and countermeasures:
1. Hardware & Ethernet Card Configuration
Make sure to use a working Ethernet cable. Ensure that the Ethernet cards used are recognized on both the host PC and the target PC. There are instances when a target PC has more than one Ethernet card, and the Ethernet controller might choose the incorrect one. A timeout can occur if the setup is not correct, causing 'slrtpingtarget' to fail. For more details on issues with multiple Ethernet cards, please run the following command in the MATLAB R2020a command window to access the release-specific documentation:
>> web(fullfile(docroot, 'xpc/ug/are-multiple-ethernet-cards-in-the-target-computer-causing-communication-problems-during-download.html'))
2. Boot Kernel Mismatch
'slrtpingtarget' can fail if the target computer is running an outdated Simulink Real-Time boot kernel that is not synchronized with the Simulink Real-Time release and update installed on the development computer. Recreate the target boot kernel for each new release.
3. Invalid Target Settings
Ensure you are using valid target settings such as IP address, subnet mask, index, etc. To retrieve the target hardware information, please run the following command in the MATLAB R2020a command window to access the release-specific documentation:
>> web(fullfile(docroot, 'xpc/api/simulinkrealtime.targetsettings-properties.html'))
. Verify that the settings match between the target object and the actual target hardware.
4. Firewall Interference
Ensure that the matlab.exe process is added to the exception list of the host PC's firewall. For Windows Firewall, the instructions are captured in this article. If you use network boot, also add Simulink Real-Time related processes such as 'xpcbootpserver' and 'xpctftpserver' to the exception list of the host PC's firewall. Additionally, for troubleshooting network boot failures through a firewall, please run the following command in the MATLAB R2020a command window to access the release-specific documentation:
>> web(fullfile(docroot, 'xpc/ug/troubleshoot-network-boot-failure-through-firewall.html'))
5. Port Issue
In some older MATLAB releases, the 'xpctargetping' command might use a different port than the one set in the target settings. For example, if the target setting uses port 22222 for host-target communication, 'xpctargetping' might use 22223 for pinging. If the port used for 'xpctargetping' on the target is not functioning correctly, 'xpctargetping' will fail, leading to auto build and download failure since 'xpctargetping' needs to pass before the model is downloaded to the target PC. In this case, the following workaround may help:
Please follow the below link to search for the required information regarding the current release:
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Target Computer Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!