Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW crashes the PC in time when it reads Visa serial

Hi, I am new programming in LabVIEW and I need to do a program able to read some parameters from the devices, keep the data in a file, display it in a graph… etc.

 

From the example “advanced serial write and read” I was able to send the commands to the devices and read it. I also could  manage to save it in a file. The problem is that in time, one hour or so, the PC reboots alone for a problem in the LabVIEW program I have done. Could you please, have a look at it and tell me what could be the possible reason?? 

 

Any idea of how to improve the structure of the program will be welcome. I try to learn as fast as possible.

 

Thank you very much attention and patience.

 

0 Kudos
Message 1 of 3
(4,366 Views)

I suspect the Write To Spreadsheet File.vi.  What that VI does is open the file, write your data, and then close it.  It does this with every iteration of your loop.

 

You will be much better off opening the file before your loop, close it after, and write inside.  You will want to use the Array To Spreadsheet String function to format your data to write it.


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 2 of 3
(4,360 Views)

I will try what you say. But how can I join the "write to spreadSheet file" to the "open/create/replace file" and to the "close file" ? it seems that they cannot be joined directly.

0 Kudos
Message 3 of 3
(4,332 Views)