LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabStyle Meter control in CVI6

If I pass a double value to SetCtrlVal() for a numeric slide Meter (lab-style) with Data Type double, it gives a run-time error saying "Invalid argument type: found 'double' expected 'int'"!!
0 Kudos
Message 1 of 3
(3,040 Views)
I have never found this error in my projects.

In my experience, every time I have met strange behaviour like that you mentioned I was having control ID problems (I was really addressing a control different from which I intended to), so being in you I'd check carefully the value passed as panel handle and control ID to be sure to address the correct control.

Hope this helps
Roberto


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 3
(3,040 Views)
I agree with Roberto. If tracking down the control id proves problematic, I'd suggest the following:

GetCtrlAtttribute (panel, control, ATTT_CTRL_STYLE,&style);

That will tell if the control you're using is even a meter, or if it's something else.

Luis
NI
0 Kudos
Message 3 of 3
(3,040 Views)