LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Control does not have a value

 

I am using the NI GetCtrlVal function in a program for interfacing with a wand sensor. This used to work fine when I used it on a 32-bit pc, but now I get the following error when I switched it over to a 64-bit pc: Control does not have a value.
Full error message:
NON-FATAL RUN-TIME ERROR:   "PALYON_FLOW_TEST.c", line 302, col 2, thread id 0x00000628:   Library function error (return value == -58 [0xffffffc6]). The control does not have a value
I am not sure what the issue is, but if it helps the only header file changes that were made were switching from using "Decl-32.h" and "windows.h" to just using "ni4882.h" in the code on the 64-bit machine. My program worked perfectly fine on the 32-bit machine.
Here is how we use two of the functions that the error points to (It says "control does not have a value" which is the third arg of GetCtrlVal):
SetCtrlAttribute (panel, PANEL_LED_CONNECT, ATTR_VISIBLE, 0);  //Make the LED invisible     
....
GetCtrlVal (panel, PANEL_LED_CONNECT, &LED_CONN); //Read the value of te LED

 

0 Kudos
Message 1 of 3
(3,852 Views)

paly_Andrew:

 

Are you sure nothing changed in your UIR or its .h file when you moved to the 64 bit machine?  Can you copy those files back to your 32 bit machine and rebuild your project?

 

Where you able to SetCtrlVal() on your LED?

 

Is your LED on a tab page?  Have you looked at Roberto's reply here?

http://forums.ni.com/t5/LabWindows-CVI/Panel-Handles-and-Callbacks/m-p/859257

 

I'm not running 64 bit, so I can't test it, but could you try the attached program on both your 64 bit and 32 bit machines?  Use the buttons to toggle and get the LED value with it visible and not visible.

 

0 Kudos
Message 2 of 3
(3,837 Views)

The uir actually was changed. Using the new version solved the problem. Silly mistake. Thanks for pointing this out!

0 Kudos
Message 3 of 3
(3,827 Views)