LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do my LabView program hang on my PC?

Hello Everybody,

 

I have an DAQ wich measured every second 4 values on 4 Channels... and it actually works well.

After a while (ca. 3/4 h) the program starts to hang on my PC and crashes.

Next, i try to restart my programm - but there comes an error message >>Resetting VI: ... << but the reset start to hang to.

 

Now I'm totaly clueless why and I would lik eto know, whats wrong. Maybe someone can help me.

 

P.S.: I also varied the baudrate, parity, bits... but it doesnt helps.

 

Thanks,

Marc

Fehlermeldung.pngTaskTree.pngFrontPanel.png

0 Kudos
Message 1 of 23
(3,492 Views)

Marc,

 

you shouldn't open and close repeatedly interfaces you require throughout. Open the File and the VISA connection once before the loop and close them after leaving the loop.

 

Norbert

 

EDIT: Also note that in the past power saving settings of PC had weird issues with USB and Serial interfaces. Maybe you want to check those.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 23
(3,486 Views)

Hello,

 

I dont know exactly what you mean.

Couldt you show me what you mean with the aid of the .vi at the attachment?

 

Cheers,

Marc

0 Kudos
Message 3 of 23
(3,476 Views)

P.S.: even without the upper part (everything after the READ BUFFER) which i deleted for a test, the programm starts to hang...

         so i assume, the problem is in the visa settings

0 Kudos
Message 4 of 23
(3,472 Views)
It was mentioned several days ago that you should not open and close the VISA session repeatedly in the loop. Dragging the VISA Configure Serial Port and the Close to outside the loop is a basic operation.
0 Kudos
Message 5 of 23
(3,445 Views)

Just to reiterate: You should not repeatedly open and close you serial port.  Initialize it once before your loop and close it once after your loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 23
(3,415 Views)

I tried implement your advice, but after that the programm doesnt work at all.

 

Unbenannt.png

0 Kudos
Message 7 of 23
(3,410 Views)

What does your Read Buffer look like?  Are you sure you are properly connected to your instrument?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 23
(3,398 Views)

What does "doesn't work at all" exactly mean? Does the error in your screenshot occur in iteration '0'?

I assume that you don't fetch all reply characters which creates an buffering issue. That means: With your Open/Close approach, you simply discarded the buffers. That enabled you to make errors by reading too few characters without even noticing.

Another option might be that your VISA write already runs into an error but as the error cluster is not wired, the VISA Read reads nothing and the Scan From String runs into an empty string.

 

In both situations, you have to improve error handling.

Also dont put outputs left of the loop (VISA Close).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 23
(3,391 Views)

The READ BUFFER is empty and the connection to the instrumen tis fine.

(I tested the connection with an older program version.)

 

The error massage does pop up after few seconds with the >>scan from string<<  symbol blinks.

0 Kudos
Message 10 of 23
(3,380 Views)