xPC Target | ![]() ![]() |
Target Object Methods
The target object methods allow you to control a target application on the target PC from the host PC.
Target object methods are entered in the MATLAB window on the host PC. You can also control the target application from the target PC using target PC commands. See Target PC Commands.
The methods are listed in the following table.
Method |
Description |
xpc |
Creates a target object on the host PC (constructor). |
set |
Sets writable target object properties to the specified value. |
get |
Returns the value of readable properties from a target object. |
start |
Starts the execution of a target application on the target PC. |
stop |
Stops the execution of a target application on the target PC. |
load |
Downloads a target application from the host PC to the target PC. |
unload |
Unloads a target application from the target PC. If a target application is running, it is stopped and unloaded. |
addscope |
Creates a new scope with type 'host' or 'target' on the target PC. |
getscope |
Returns the properties of a previously created scope from the target PC. The scope properties can be assigned to a MATLAB variable to create a scope object. |
remscope |
Removes a scope from the target PC. This method does not remove the scope object, on the host PC, that represent the scope. |
getparamid |
Returns the property name or index of a parameter from the target object. |
getsignalid |
Returns the property name or index of a signal from the target object. |
getlog |
Uploads and returns one of the data logs from the target PC to the host PC. TimeLog, StateLog, OutputLog, TETLog |
reboot |
Reboot the target PC. If a target application is running, the target application is stopped, and then the target PC is rebooted. |
close |
Close the serial connection to the target PC so that the host PC can use the COMM port for another device. |
![]() | Target Object Properties | Target PC Commands | ![]() |