07-25-2018 07:15 AM
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.
07-25-2018 07:21 AM
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?
07-25-2018 07:51 AM
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
07-25-2018 08:12 AM
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
07-25-2018 08:15 AM
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.
07-25-2018 08:21 AM
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:
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"…
07-25-2018 09:33 AM
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
07-25-2018 10:45 AM
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:
Bob Schor
07-25-2018 10:47 AM
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.
07-26-2018 05:53 AM
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