Meaning of error message
I have done a small test program there I'm using a MUX function. When I save the program i get no error message in my program block but when I look in the program explorer I have a red error icon. The error message says 'Overloaded function ambiguous'
The program complains over this function:
MUX(K:= LoadedGroups, IN0 := 0, IN1 := 1, IN2 := 2)
The dataype I'm using is DINT.
What is the meaning of this message? I can't just figured out.
Voted best answer
hello,
You cand find this error message in online help, It says
"Overloaded function ambiguous:
<NAME>.
This error occurs when two or more overloaded functions are
equally suitable. An example of this is the function call “min(5, 8)”.
In the example the min function for dint, uint, etc are equally
suitable. The error can be corrected by using one or more variables
or explicit type casts, for example “min(var, 8)” or “min(dint_to_int
(5), 8)."
i.e. in your code you might be using any variable or constant instead of values of unmatch data type, I guess..
Hope it helps to you.
Answers
Thank you Sumit for the answer,
The workaround for this issue is that at least one of the inputs needs to be a variabel. If you put constants of all the inputs you will have an error when you compile the program.
Add new comment