| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
MATLAB command line
xpctargetspy
xpctargetspy(target_object)
xpctargetspy('target_object_name')target_object | Variable name to reference the target object. | |
target_object_name | Target object name as specified in the xPC Target Explorer. | |
This graphical user interface (GUI) allows you to upload displayed data from the target PC. By default, xpctargetspy opens a Real-Time xPC Target Spy window for the target object, tg. If you have multiple target PCs in your system, you can call the xpctargetspy function for a particular target object, target_object.
If you have one target PC, or if you designate a target PC as the default one in your system, use the syntax
xpctargetspy
If you have multiple target PCs in your system, use xpctarget.xpc to create the additional target object first.
target_object=xpctarget.xpc('mode', 'arg1', 'arg2')Then, use the following syntax.
xpctargetspy(target_object)
If you have a target PC object in the xPC Target Explorer, you can use the following syntax.
target_object=xpctarget.xpc('target_object_name')The behavior of this function depends on the value for the environment property TargetScope:
If TargetScope is enabled, a single graphics screen is uploaded. The screen is not continually updated because of a higher data volume when a target graphics card is in VGA mode. You must explicitly request an update. To manually update the host screen with another target screen, move the pointer into the Real-Time xPC Target Spy window and right-click to select Update xPC Target Spy.
If TargetScope is disabled, text output is transferred once every second to the host and displayed in the window.
To open the Real-Time xPC Target Spy window for a default target PC, tg, in the MATLAB window, type
xpctargetspy
To open the Real-Time xPC Target Spy window for a target PC, tg1, in the MATLAB window, type
xpctargetspy(tg1)
If you have multiple target PCs in your system, use xpctarget.xpc to create the additional target object, tg2, first.
tg2=xpctarget.xpc('RS232', 'COM1', '115200')Then, use the following syntax.
xpctargetspy(tg2)
![]() | xpctargetping | xpctest | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |