Try executing the GetControlValue before the Run Execution
e=actxserver('LabVIEW.Application');
vipath='c:\Documents and Settings\mwolfson.REDSHIFT\Desktop\testx.vi';
vi=invoke(e,'GetVIReference',vipath);
vi.SetControlValue('in',4)
vi.GetControlValue('out')
vi.Run
Seems that first need to point The Inputs and Outputs of the connector pane
and the run the VI from Matlab
and assign the vi.GetControlValue('out') to a variable
Ing. José Antonio Páez López
Functional Test Engineer & CLAD