The ability to retrieve file information from multiple targets using xpctarget.fs and xpctarget.ftp has been added in xPC Target 2.5 (R14SP1).
If you are using xPC Target 2.4 (R14), you need to programmatically set the communication properties of xPC Setup using the SETXPCENV function, switching the communication properties between one target PC and the other target PC prior to using the fs and ftp objects. Use the following code as a guide:
tgpc1=tg.xpc('TcpIp','212.212.212.200','22222')
tgpc2=tg.xpc('TcpIp','212.212.212.201','22222')
setxpcenv('TcpIpTargetAddress','212.212.212.200','TcpIpTargetPort','22222')
updatexpcenv
ftpobj=xpctarget.ftp
ftpobj.dir
setxpcenv('TcpIpTargetAddress','212.212.212.201','TcpIpTargetPort','22222')
updatexpcenv
ftpobj=xpctarget.ftp
ftpobj.dir
Best Answer