02-11-2011 01:18 PM
I have been unable to figure out the serial outputs from the Datex monitor. I believe I have the correct settings. Some data is coming out, but it is not as expected. I figure that someone out there has tackled this before.
02-11-2011 07:28 PM
Hi,
Could you please tell more? How you connect the Datex moniter? Which function are you using in LabVIEW?
ZJ Gu
02-12-2011 05:26 AM
I did a serial interface to that monitor a long time, about 2002 I think. From what I can remember it was not that hard. All you need is in the protocol description. I guess you have that? Then you post show links to manuals and include code. And also tell what you have done so far, and why and how you struggle. You will get much more back if you put in some effort then asking for help. Remember good questions draw good answers
02-14-2011 10:29 PM
Connected via standard RS-232/DB9 cable to a 4 channel RS-232 to USB. I can record from this from other devices without difficulty. I routinely record from pulse oximeters.
I'm getting some data that can be converted with string to byte array. But this is not the data I expect.
In the documentation from Datex, I can't really tell the timing (how many bytes it's sending, or if I should "end read on a termination character").
Additionally, there may be different configurations for sending serial data.
02-15-2011 02:55 AM
Unless you post more info it is hard to help you. In order to get any help post your work up to now. And a copy of the interface protocol.
02-18-2011 03:55 PM
Enclosed is the sub vi to simply try to get the text out. Also the pdf from Datex.
02-18-2011 06:58 PM
I updated the serial read vi according to some recommendations from tech support. Getting "timeout" error if I try to "end read on a termination character". May have the wrong one, coming from trying to decipher the manual.
I can read data in small groups like 30 bytes, which looks like:
ˇ≤õ l≤ííí…≤ ≤˚íííˇ≤õ˘≤õííí…≤
and can be converted to numbers using the byte array conversion.
I'm hoping that someone out there has dealt with Datex's data stream so I don't have to reinvent the wheel. Not that user friendly.
02-21-2011 06:22 AM
First of all. Be aware of the fact that the systems use different endiannass. Labview use big-endian format when handling and storing multi-byte data, even on the Windows (x86) platform. And your Datex monitor use little-endian format. http://en.wikipedia.org/wiki/Endianness. Also using a termination char opproach is not recommended. Since the all data from the monitor, and to the monitor, is transferred using flag-delimited frames. Each data frame starts and ends with a flag character. The value of the start and end flags is always 0x7E (section 2.2). Also how do request a data frame? What do you send to to the monitor in order to get data. In this case I think the correct thing is to request a data frame. Then read the D-O header in order to find out how many bytes you you need to read in order to get the rest of the block. See section 3.3
02-21-2011 06:38 PM
Thanks for the help so far. I was hoping that someone might have done all the programming and have a vi that solved this, but I may have to work through this myself. (Disclaimer: while having used LabVIEW since version 2, I am a physician, not an engineer or programmer and have some major gaps in my knowledge.)
I agree that using a termination char is not the correct approach. I just started reading it 30 bytes at a time in a vi running at 1 Hz.
And it would seem that I may not have recording long enough to get a full data frame. I need to record a lot to make sure I get a full frame.
03-18-2011 12:06 AM
I finally found someone who has solved the Datex data acquisition problem. Quite a pain.