LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best efficient way to check if some elements in the panel (Or Ring) are not empty?

I am trying to put a test that runs after clicking start test on the panel:

I ve already written a code that starts the test after clicking on the "Start test" button:

Is there any function that I can use to check if the elements in the panel are all full and not empty? Thanks a lot in advance.

 

 

 

if(event == EVENT_LEFT_CLICK)
	{
	switch(control)
	    {		
case P_MAIN_Start_test:	
 if ( P_MAIN_Operator != 0 && P_MAIN_ARTICLE != 0 && P_MAIN_ORDER != 0)
	{
iTimer_Handle = NewAsyncTimer (0.2, -1, 1, CALLBACK_MAIN_Start_test, 0);
        }
            }
         }

 

 

 

 

cvipanel.png

0 Kudos
Message 1 of 4
(1,216 Views)

You cannot operate this way: a contro ID (like e.g. P_MAIN_Operator) will never be 0!

You must retrieve the correct attribute (either the value or the index) for each control and check its validity accordingly. CVI offers a range checking facility and ValidatePanel () function that checks all controls in a panel that has Range Checking parameter in Notify mode, but it works only for numeric controls.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(1,205 Views)

And please try to not

open several discussions

on the same argument!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 4
(1,201 Views)

I wanted to edit the questions I added but I found out it is not possible. I just reported them to the moderator to delete them.

Thanks a lot for the help 🙂

0 Kudos
Message 4 of 4
(1,188 Views)