Hi,
I want to use the Math Interface Toolkit to allow my matlab code to access the Serial Port in Labview but I'm having trouble passing the read values back to Matlab. The Labview vi to write/read works fine on its own (data is written and read OK) and the data to be written is passed from Matlab to Labview successfully when using the mex function but I can't get the read data back into Matlab again. The mex file format is
ReadData=LVSerialPort(BytesToRead,DataBits,BaudRate,TimeOut,WriteData)
but ReadData only returns an empty array. I've already checked that ReadData is selected as a vi output. Should I be using a sequence structure to control when the read data is returned?
Thanks for any help
Emrys