I have a couple of channels in a project that tell me there is an implicit value conversion occurring. What I'm confused about is exactly what it means and why its a warning?
In the Qcode below:-
HydOilLowNCorNO is a digital parameter that determines whether the input condition is NC or NO which translates to if a logic 1 is good or bad.
MaintBypassSensorHydOilLow is a digital parameter that determines whether we should action the sensor inputs or simply ignore them. iI's used here in this channel and in an almost duplicate of the channel that deals with digital input HydOilLevelVeryLow which is the last switched step on the tank level sensor and which triggers an immediate idle down, and timed shutdown of engine
The Qcode is:-
If HydOilLowNCorNO Then TempResult:=Not(HydOilLevelLow) else TempResult:=HydOilLevelLow
If MaintBypassSensorHydOilLow then TempResult:=0
The warning I get is that the bolded underline is an implicit value type conversion. What I struggle to understand is what is being converted? everything except the local variable TempResult is digital including the channel type IDC. There as far as I know is no way to declare a variable as specifically type digital and if I change line 1 to TempResult:=False then I get another implicit value type conversion warning for that line.
I know a warning isn't the end of the world but what do I need to do to get rid of the warning or produce better code? Is there a way to declare the local variable TempResult as type digital that Im simply not aware of?
Warnings in IQAN Design to me infer something is suboptimal but here I cant see what I should do to change that.
Customer support service by UserEcho