10-04-2023 02:42 PM
I am connecting a Nonin pulse oximeter to Labview using a serial data to usb connection. The information from the Model 7500 is sent in an ASCII serial format at 9600 baud with 8 data bits, 1 start bit, and 2 stop bits. Each line is terminated by CR/LF. However when I try and read the serial data in Labview using visa read, I only get single random characters. I am not sure what I am doing wrong. I've set the stop bit to 2 and all other settings are correct in Labview. I thought there was something wrong with the the byte count and I set up a control on the front panel and I clicked through 1-100 to see if I could change what was coming through with no avail. It should only be about 20 bytes anyways. I know that labview can only read one termination character. I've tried changing the termination character to either CR or LF and that hasn't made a difference. Even though there are no carriage returns in the data I am reading. The serial output should be SPO2=XXX HR=XXX. I have also tried turning off the termination character in Serial Reads and that also doesn't work. Any advice would be appreciated.
10-05-2023 02:42 AM
Goodmorning
Does it work in a serial terminal?
It could be you have swapped send and receive connections and maybe you need to send a command before it starts.
Anyway you should activate the terminal read on a line feed, then the count can be 100 but will be stopped on the line feed.
And please connect the output directly to the string instead of typecasting.
10-16-2023 02:12 PM - edited 10-16-2023 02:13 PM
I have tried using it in NIMAX and I basically get the same results, a bunch of random characters. Is this what you mean? When I run this I get the same random characters and an error saying framing issues. Not sure how to get it to read properly. It shouldn't need a command before starting.
10-16-2023 03:13 PM
10-16-2023 03:34 PM
I was typecasting to add a line feed termination character.
This code shows error code -1073807253 immediately after hitting play button.
10-16-2023 03:54 PM
10-16-2023 05:44 PM
I’ve looked in the manual for the serial device and the settings are right. It does use carriage return and line feed as the termination character. Is that the reason it’s not reading properly?
10-17-2023 01:46 AM
10-25-2024 10:47 AM
Hello. I'm trying to read the output from a Nonin 7500, and I’m facing the same issue as Koa123. I haven’t worked much with LabVIEW and registered on this forum to share a potential solution to this problem. I’m attempting to do this in Python, using something as simple as:
import serial
ser = serial.Serial( port='COM3',
baudrate=9600,
bytesize=serial.EIGHTBITS,
stopbits=serial.STOPBITS_TWO,
timeout=1 )
print("Connected to", ser.port) # Read bytes until the newline and display them in a single line
try:
while True:
line = ser.read_until(b'\n') # Reads until a newline character (CR - 0x0D)
if line: # Convert the complete line to hexadecimal and ASCII in a single line
ascii_output = ''.join([chr(byte) if 32 <= byte <= 126 else '.' for byte in line])
print(f"{line} in ASCII: {ascii_output}")
except KeyboardInterrupt:
print("Program interrupted")
finally:
ser.close()
Output:
Conectado a COM3
b'\x00V\x04X3a\x03c\x0c\x03\x0b+a\x032c\x03y=' en ASCII .V.X3a.c...+a.2c.y=
b'V\x04X3a\x03c\x0c\x03\x0b+a\x032c\x03y=' en ASCII V.X3a.c...+a.2c.y=
b'V\x04X3a\x03c\x0c\x03\x0b+a\x032c\x03y=' en ASCII V.X3a.c...+a.2c.y=
b'V\x04X3a\x03c\x0c\x03\x0b+a\x032c\x03y=' en ASCII V.X3a.c...+a.2c.y=
b'V\x04X3a\x03c\x0c\x03\x0b+a\x032\x0c\x03y=' en ASCII V.X3a.c...+a.2..y=
b'V\x04X3a\x03c\x0c\x03\x0b+a\x032c\x03y=' en ASCII V.X3a.c...+a.2c.y=
Programa interrumpido
The output is always the same (change with real measures, of course) and actually looks consistent with the type of message expected. I believe that the symbol "V" might represent "S", "X" might be "O," "3" might be "2," and "a" might be "=". But I haven’t been able to figure out much beyond that.
Any solutions? Thanks from Madrid.
10-25-2024 11:51 AM
Hey, my problem was fixed by buying the serial output cable from Nonin. Apparently, you cannot just buy any RS-232 cable and connect it to it.