From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Visa Read Error -1073807298?

Hello,

 

As part of a larger power cycling program I need to monitor a serial port for a phrase to indicate the system has finished (SYSTEM_READY). For some reason the serial port "looses" 10-ish bytes of data. I think that it is because the port receives the extra data between reading the number of bytes on the port and the time it actually retrieves the data and flushes the buffer. To test this I tried to write another VI just to list out what the serial port is spewing out and see if it matches the log I received from TeraTerm. It works as expected until it tries to execute the VISA Read VI. Then I get the -1073807298 error with the text "VISA Read in Serial Console.vi". I found an article that seemed pertinent but I add the buffer I/O VI and nothing changed. I'm using LabVIEW 2011 (32-bit) on a Dell Optiplex 745. The serial port is integrated into the board, and the computer has an ICH8/ICH8R Family LPC Interface Controller. Does anyone have any suggestions?

 

Thanks,
Simon

 

Attachments:

BootLog.txt - this is what the output from the machine I am monitoring should look like

Serial Console.vi - the test VI that I am trying to write. Just ignore or delete the power on code.

 

 

Download All
0 Kudos
Message 1 of 6
(3,765 Views)

How fast is your serial data coming in?

I'd try throttling the read loop with a Wait ms function so that it isn't spinning out of control.

 

 

0 Kudos
Message 2 of 6
(3,750 Views)

The port is set at 9600 baud, so not that fast. I put in the wait vi's, but that didn't change the problem, still getting the error the first time the port is read. Any other ideas?

 

Thanks,

Simon

0 Kudos
Message 3 of 6
(3,706 Views)

Your text file is full of line feed characters, so I am presuming that the remote device is sending them.

 

Your VI configures the serial port to terminate reads (by default) on line feed characters. So: Get rid of the Bytes at Port nodes and set the byte count input on Read to a number larger than the length of the longest message the remote device will send. You can also get rid of the time delay. The VISA Read will wait until it gets a termination character or the number of characters specified at byte count, whichever comes first.

 

After a long time the Concatenate String will eventually generate memory overflow errors. But at 9600 baud it would likely take about a day of continuous operation to get to that point.

 

At 9600 baud you should be able to keep up with anything the remote device sends.

 

Are you sure the configuration is correct for the protocol used by the remote device?

 

Lynn

0 Kudos
Message 4 of 6
(3,700 Views)

Hi Lynn,

 

Yes, the machine is sending out the line feeds as well as some other formatting characters. I tried removing the waits and checking the ports for characters. The read error is still occurring.

 

Once I can get the serial port reading correctly the goal is to fold it back into the bigger power cycling program and scan the serial output for a specific string of characters (SYSTEM_READY) to indicate the machine we are testing has successfully booted. After that I will clear the concatenate string and start over.

 

I got the boot log text from a TeraTerm session that I logged, and I set the serial port settings in the program according to what I was using in TeraTerm.

 

Thanks for the reply.

 

Regards,

Simon

 

 

0 Kudos
Message 5 of 6
(3,694 Views)

Can you try a version without the Chroma code? Use just the serial port stuff alone to see if you can get it to run.

 

Also post the log file that your program generates (a small one!). If you can identify missing data in that file, it would be great.

 

Lynn

0 Kudos
Message 6 of 6
(3,686 Views)