LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Where do I find documentation on the Programmers Toolbox for LabSin CVI?

I am using a series of List commands from the Programmers Toolbox. For each function I create and clear a List. Although my application uses the ListClear command, for each separate function, it appears as though the list does not get cleared from one call to the next.
0 Kudos
Message 1 of 3
(2,587 Views)
If your list is not being cleared, I would suspect there is a problem with the list handle you pass to ListClear(). You can put a breakpoint on the ListClear() function. When the program pauses at that point, point to the parameter you're passing to ListClear to see its value. Make sure you don't have a variable scope problem. Does the ListClear() function see the same value as was returned by the ListCreate function? Do you check that the value returned by ListCreate is >0? (0 = error creating list).
Look at ...\CVI\samples\toolbox\list.prj that shipped with CVI. It doesn't include ListClear, but it shows how to create and use Lists from the Programmers Toolbox. To see some more help, in your program, right-click on any List function (e.g. ListClear) and selec
t Recall Function Panel. In the Function Panel window, click on Help >> Function >> Class Help.
Message 2 of 3
(2,587 Views)
Thanks for the feedback. It turns out I was failing to close the list prior to opening another one. Simply placing a "ListDispose()" at the end of my functions corrected 95% of my issues.
0 Kudos
Message 3 of 3
(2,587 Views)