NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
NormPgh
Posts: 6
0 Kudos
Accepted Solution

front panel pause button

Hi. 

 

  I am attempting to perform synchronous, continous Analog conversion from 2 PXI-6259 cards, as well as capture the state of several digital at the same time.  I have managed to get everything configured and working properly, however I run into an issue if the user presses the 'pause button' on the front panel. 

 

  From what I can tell, the data acquisitions continue to run in the background (I am using a DAQmx task, and stop was never called).  For my analog inputs, this does not pose a problem.  However, the digital inputs always generate an 'Error 200010 - Onboard device memory overflow. Because of system and/or bus-bandwidth limitations, the driver could not read data from the device fast enough to keep up with the device throughput."

 

Is there a way to register for a UI event that is generated when the user presses the 'pause' button, so that I may stop the data acquisitoin before the error occurs?

 

Thanks in advance,

  - Rich

 

 

Active Participant
SnowMule
Posts: 915
0 Kudos

Re: front panel pause button

[ Edited ]

Sounds more like a process problem than a programming problem. 

 

What's the intent of clicking the "Pause" button; is it to view data or is there some motion/acquisition elements that need to be paused?  If this is just a problem during development, use other methods such as breakpoints or indicators to get the information you want.

 

Data's going to be collected/buffered based on the task definition until stop is called, or as you found out, the buffer overflows.

Trusted Enthusiast
nathand
Posts: 3,879
0 Kudos

Re: front panel pause button

Breakpoints are going to have the same problem.

 

You can't register for events on parts of the debugging environment; that would make the debugging not work properly.

Member
NormPgh
Posts: 6
0 Kudos

Re: front panel pause button

It may very well be a process problem.  Let me explain our process a little.

 

We have several applications, all of which function in a similiar manner.  They essentially just acquire data, analyze it, and display the results on a waveform graph that scrolls continuously.  There is an 'on-demand' feature to save the information displayed, but under normal conditions, once the data is displayed, it is discarded.  The display typically shows about 3 seconds worth of data, but there are controls to vary it from 1 to 10 seconds.

 

Often, we will want to pause the acquisition, and use the graphing controls to 'zoom in' on a particular section of the graph.  Once we've examined the pheonomon, we will then resume the application, and go back to the normal scrolling display.

 

Up to this point, we were able to get by with 16 analog inputs and 4 digital inputs within our primary application.  So we could use the DAQmx assistant to manage the acquisitions.  We had sepereate DAQmx assistant instances for analog/digital inputs.  And this use case of pausing the application was fine.

 

However, we found the need to add an additional I/O card into the system, and the PXI-6259 driver does not support a multi-device channel configuration within a single DAQmx assistant instance.  So I shifted to the approach of building my own DAQmx task. 

 

I've attached a test application that uses my acquisition VI's (the signals have been renamed).  The intent was to build one point of maintenance that can be updated when the physical connectoins are changed, rather than having to update each applicatoin individually.   The subset shown relates to the acquisitoin needs of only one applicatoin.

 

Thanks in advance,

  - Rich

 

 

 

 

Member
NormPgh
Posts: 6
0 Kudos

Re: front panel pause button

Ah.  One other thing.....   I'm using Labview 2011, version 11.0 (64-bit).

 

Thanks again.

Active Participant
SnowMule
Posts: 915
0 Kudos

Re: front panel pause button

Running 2010 here so I can't view your VIs...

 

...If you've got acquisition in a while-loop, wrap the acquisition VIs in a case structure and a control called "run/stop" to the selector.  Selector=true, acq continues as normal.  Selector=false, acquisition pauses (or the data is just thrown out and data present when selector was toggled stays on-screen). 

 

Or do something that just pops the data into another VI that just displays the data.  Acquisition can continue in the background while you're looking at the freeze-frame data.

Member
NormPgh
Posts: 6
0 Kudos

Re: front panel pause button

I thought about adding my own 'pause' buttton/control, but my users have become acustomed to hitting the pause button on the front panel, and it will be difficult to get them to change.  I guess the error would remind them :-)

 

Thanks for the help.  The option of using different VI's to acquire/display the data is interesting.  I'll have to think about how I might employ it.

  - Rich

 

 

P.S.  If there is anyone else out there running 64-bit version of LV 2011, please have a look at my VI's.  If the DAQmx assistant doesn't generate errors, there has to be a way for me to handle it within my VI's also.  Thanks.

 

 

Knight of NI
Knight of NI
Ben
Posts: 16,150
0 Kudos

Re: front panel pause button

64 vs 32 bit is not the issue.

 

WHen you start a continous DAQ task, it continues until you stop it. The data has to go somewhere and when there is no place to put it (like the buffer previously used gets filled up becuase not taks is reading from the buffer) you get an error.

 

The simplest solution was stated above about using a "pause" button in your code that control if the acquired data gets plotted.

 

Ben

 

(from Library PA)

Ben Rayner
Who is now transitioning to John Galt.. just building Rayner's Ridge
Rayner's Ridge is under construction
Trusted Enthusiast
nathand
Posts: 3,879
0 Kudos

Re: front panel pause button


NormPgh wrote:

I thought about adding my own 'pause' buttton/control, but my users have become acustomed to hitting the pause button on the front panel, and it will be difficult to get them to change.  I guess the error would remind them :-)


Well, that's easy to fix - change the window appearance properties so the toolbar isn't visible while the code is running, and there won't be a pause button for your users to click.

 

Several of our applications have a feature a bit like this.  My coworker implemented it in a very simple way: he put the chart indicator inside a case structure.  Connect a boolean "pause" control to the case structure, and that's it.  The data acquisition runs constantly but only updates the graph when the pause button is false.  Would this approach work for you?

Member
NormPgh
Posts: 6
0 Kudos

Re: front panel pause button

This approach should work just fine, assuming I can figure out how to remove the toolbar when the code is running. It will actually make things a bit nicer, should I find a need to perform some sort of active control while the user is examining the old data.

 

Out of curiosity, would it also be reasobale to use an event handler to stop the acquisition when the user presses my new 'pause' control, and start the acquisition again when they resume? 

 

Either way, this should be pretty straightforward to implement.  Thanks to everyone for the help.

  - Rich