10-21-2009 05:27 PM
I've got a problem with reading data in labview and also in MAX. MAX says the device is fine, and I can even communicate to update attributes correctly. I'm certan the data is being transmitted correctly because I'm able to retrieve the data with no problems in Matlab.
The device I'm using is a DLP-USB245M which is a USB device that creates a virtual serial interface.
Some code I'm using to test the device is attached. It always takes 10 seconds and times out. I would appreciate any pointers.
Solved! Go to Solution.
10-22-2009 09:11 AM
10-22-2009 10:54 AM
10-26-2009 11:49 AM
This is just code to grab 78 bytes of data to verify that I can even do that. This isn't a sub-vi. Is that why you were thinking I was flushing the buffer or am I doing something else wrong.
The only thing I need to do is assert the transmit enable, once I assert the transmit enable the device just continuously sends data. I assumed this was done by the read function, but I'm assuming this is my problem. All I have to do in matlab is this:
s = serial(COMport);
s.Terminator = 0;
s.InputBufferSize = 78*Nframes * 10;
fopen(s);
10-26-2009 12:13 PM - edited 10-26-2009 12:15 PM
10-26-2009 12:20 PM
The string ends with 0x00. I'm still not understanding where I am doing a flush. Could you point it out for me?
I've also tried to read data in MAX, with no luck there either. I can write to the device and update control with no problems.
10-26-2009 12:27 PM
10-26-2009 12:37 PM - edited 10-26-2009 12:39 PM
was1984 wrote:The string ends with 0x00.
my bad, a 10 is a linefeed, you have it set to 00.
What Dennis said!
Idea Exhange Idea: Make those functions look more different!
10-26-2009 12:39 PM
10-26-2009 12:50 PM
I don't know of any pin called TXE#. Could you attach the manual so someone can see what the actual pin is?
Does the instrument have a built-in USB>RS-232 converter or are you using something separate?