LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bluescreen after a few seconds-minutes while using following VI

HI Community,

 

I´m using following VI to visualizing data from 3 different Sensors.

I read the data from the Sensor with my Arduino and send them to LabVIEW via seriall communication.

LabVIEW recives 3 double values and plots them in one graph.

 

Everything works fine but after a undefined time (sometimes seconds/sometimes few minutes) I get an bluescreen an PC starts to reboot.

I tryed it without sensors to exclude failer from them but nothing helped.

 

Can anyone help me with this Problem.

 

Cheers Florian.

 

0 Kudos
Message 1 of 12
(2,933 Views)

could you backsave for labview 2016 please?

 

File -> Save for previous version

 

i assume your pc always behaves correctly when you are not using labview/your-VI?


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 12
(2,928 Views)

Hi,

 

Yes, I can use the PC whole day long without any shutdown as long as I´m not using LABVIEW.

 

Did all recent updates but did not helped ether.

 

I attached a Version 16 File

 

Cheers Flo

0 Kudos
Message 3 of 12
(2,917 Views)

in the beginning you have a VISA-open and a VISA-serial function.

it is my understanding, that you only need one of the two. use the latter.

but i don't think that is your problem, otherwise i suppose it would show errors/crash immediately.

 

what i noticed is you read only one byte per iteration,

do you have like a termination char defined in your manual?

could you read more than one byte per iteration?

 

with the VISA-serial function you define \n as your term-char and a timeout of 10sec

you could set the timeout to something smaller like 2seconds and try to grab more bytes (e.g. 512) per iteration. the read function will stop at the termination char, your loop will go into the next iteration, and if there is nothing more to read it will timeout.

which means it would be enough to only wire the error out to the loop's-conditional

 

but nothing i see in you VI let me believe it should crash windows.

as far as i know even if you exceed possible ram allocation for 32bit labview,

the VI/Labview should crash, but not windows.

 

sorry


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 4 of 12
(2,904 Views)

any chance to test your VI on another machine?

you could build an executable and test it on your machine and another one,

if only your machine crashes, then you know it has something to do with your setup.

 

i am not sure what happens if you have the wrong baudrates and such set.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 5 of 12
(2,902 Views)

Hi Flo,

 

why do you read the serial port one byte at a time?

You have configured the port to accept a TermChar, so you should request more bytes then expected to read full messages!

Can you run your VI changed like this:

check.png

and report the results?

(Maybe you need to add a small wait in the loop, but otherwise you tried to read a value each 10ms with your event structure.)

 

Other note:

When using a proper formatstring you don't even need to exchange points with commas: use "%.;%f"…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 12
(2,896 Views)

Hi Gerd,

 

I changed the VI like in your picture but Pc still shuts down.

(I need to read the data each 10ms, so can not use a wait.)

 

Not sure if some kind of data-overflow occures and kills the PC.

 

Cheers Florian

 

 

0 Kudos
Message 7 of 12
(2,873 Views)

Florian,

 

     I notice that you are acquiring some data and then plotting it in a Strip Chart (very large, by the way), all in a single loop that you may think runs at 10 msec.  Of course, it does not -- it merely waits for 10 msec when nothing else is happening, then runs once (taking however much time it takes, somewhat unknown, but clearly faster when the program starts and there is not much Chart to update).  Still, it is not clear to me why this code causes your system to BlueScreen, but maybe we can fix it, anyway.

 

     I'm going to guess that you want to acquire data from your VISA device at 100 Hz, or 10 msec period, and plot it without slowing down the data acquisition.  Here's what I recommend:

  • Don't use the Timeout Event as a Timer.  Use the Event Loop to handle the Start, Stop, and other Front Panel controls.  [I notice that you don't seem to use the Stop button ...]
  • Create a While Loop for the VISA Read.  Do you need to do a Write for every Read?  Do you know that your VISA system is fast enough to produce data at 100 Hz?
  • Put a 10-msec Wait inside the While Loop.  Do not "attach" it to anything -- let it "float".  The Principle of Data Flow will make this loop run no faster than 100 Hz (it might run slower if the other code takes too much time).
  • As soon as your data come into the loop, "export" them via a Queue or a Stream Channel Wire to a parallel While Loop that does nothing except Plot and Display Values.  This will allow the plotting to use the full 10 msec to update itself (this still might not be enough time -- you may need to have a smaller Chart, or plot fewer points). 
  • This notion of splitting a Task, particularly one that involves "Wait for Data" (VISA Read) + "Process Data" (Plot, or file I/O) and splitting it into two parallel, communicating tasks is called the Producer/Consumer Design Pattern.  You can find examples bundled with LabVIEW, and on the Web.  With a little bit of luck, Producer/Consumer will fix your problem.

Bob Schor

Message 8 of 12
(2,859 Views)

Nearly all bluescreens are cause by either defective hardware or a problem with hardware drivers.

 

Are you using a USB to serial adapter?  Those things are often quite low quality, especially the cheapest ones that sometimes have counterfeit chips in them.  If you're using one, can you switch to another model?

 

Can you try this on a different PC to see if ti's a problem with your OS/driver setup?

 

I feel fairly certain that this is a problem with your PC hardware, PC setup, or a directly connected (i.e. USB) peripheral of some kind.

Message 9 of 12
(2,856 Views)

Hi Kyle,

 

I do not use a serial adapter, I´m using the orginal arduino wire directly connected to my PC.
But I testet on different PC now and it works perfectly.

 

Cheers Flo

0 Kudos
Message 10 of 12
(2,826 Views)