Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I deallocate counter buffers?

I'm using a buffered counter operation for encoder measurement. I don't see a way to deallocate the buffered memory in Labview. How is this done?

When using the AI VI's, the AI Clear VI deallocates the memory used by the AI buffer. There must be similar functionality for the counter buffers.

Thanks,

rgames
0 Kudos
Message 1 of 4
(3,446 Views)
Hi rgames,

If you have sub VIs that are using your buffered memory, you can make a call to the Request Deallocation VI under Advanced >> Data Manipulation of LabVIEW 7.0. In previous versions of LabVIEW, there was an option to deallocate memory as soon as possible under Tools >> Options >> Performance and Disk.

Hope this helps!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,446 Views)
Is it true that the CounterReset.VI deallocates the memory from the buffers used in buffered counter operations? It seems logical but I don't see any indication in the VI description that it does deallocate the memory. The AIClear.VI specifically says that it deallocates the buffers.

The reason I'm asking is that I'm getting strange behavior in a large VI ever since I've added the capability to do the buffered counter operations. It seems like the sort of random behavior that you might get if you forget to deallocate the buffers.

Thanks,

rgames
0 Kudos
Message 3 of 4
(3,446 Views)
Hi Rgames,

Good question. If you use Counter Control with a Reset control code, that will deallocate your memory. Also to note, if you are using LabVIEW 7.0, you may also want to look at possibly using DAQmx, which may fix the strange behavior. There are several examples that come shipped with LabVIEW that you can examine.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,446 Views)