I am new to this Labwindows CVI. I have encounter this error below when in ring ctrl GetCtrlVal.
FATAL RUN-TIME ERROR: Invalid argument type: found 'pointer to unsigned char', expected 'pointer to int'.
The error is saying that it is expecting unsigned char, but then, my value type is actually in int?
In GetCtrlVal description provided by labwindows, it does not specify if GetCtrlVal for ring control have any data type that they need to follow(?)
1. Cast the value to char
Can you guys explain to me , of why is this happening ?
Similar error,but different type.
Other than that, I had also encounter, a fatal runtime error, still a RingCtrl and GetCtrlVal.
This time, my value is in unsigned char. And the error prompt is , they are expecting an int not unsigned char.
Casting value from unsigned to int.
I'm solving the error but without understanding why is this happening 😞
Can you guys help explaining this to me ? 😥
Solved! Go to Solution.
if you are in the 'Edit Ring' popup of the UI editor, click on the button 'Label/Value Pairs...', this will open another popup panel, where the first entry is a ring control 'Data Type'. Here you can specify the data type, int, double, ... of your control values.
For the first fatal error, it turns out the datatype is actually in unsigned char type.
Thank you Wolfgang!
p/s: the first fatal error statement is found 'pointer to int', expected 'pointer to unsigned char'. I mistakenly written as found 'pointer to unsigned char', expected 'pointer to int'