LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview crashes

Hi All

 

the atached VI sometimes crashes when I acquire data and somtimes not.

 

Could somebody tll me what I am doing wrong . My guess is something to do with mutliple loops.

 

Regards

 

B

0 Kudos
Message 1 of 4
(2,668 Views)

Hi,

 

There aren't multiple loops in your vi, there is just one while loop. My first recommendation is that you should use Stop button to stop the running, so you should create a stop button wired into the while loop condition terminal.

You attached your gpib.vi but SubVIs are missing. I wasn't able to try the vi in action. It follows that I have just recommendation for you.

 

You have three case structures in the loop and they can conflict with each other because they want to communicate with the same device at the same time. You should use either event structure (http://zone.ni.com/devzone/cda/tut/p/id/3331) to control your code or state machine (http://zone.ni.com/devzone/cda/tut/p/id/3024) to avoid conflicts and make sequences in your program.

 

Otherwise, what was your error code and error message when you program crashed?

 

I hope you can build you application well. If you have further questions, write again.

 

Regards,

Peter

 

 

Peter Vago
0 Kudos
Message 2 of 4
(2,639 Views)

Hi Peter

 

Thank very much for your reply. I don't get any error codes as such except that Labview just crashes suddenly.

 

The problem I think is that the Vi's within the case structures were sending muliple commands (i.e: dump data commands) to the instrmnt , and one of the VI's was on continuous read. All this probably caused the crash.

 

I will try and implement yor advie w.rt. the event programmin looks like the way to go.

 

Thanks again for the input

 

Cheers

 

Baz

0 Kudos
Message 3 of 4
(2,631 Views)

Hi Baz,

 

If you don't get error message just there is a freezing behaviour that seems to be like something is waiting for something else. So it can be about the GPIB communication. About GPIB communication you can find information here : http://zone.ni.com/devzone/cda/epd/p/id/3076. You can see in the document that the GPIB is based on command-response architecture.

 

I hope you can find the final solution.

 

Regards,

Peter

Peter Vago
0 Kudos
Message 4 of 4
(2,615 Views)