(27.07.2022, 09:48)KoBra Wrote:(26.07.2022, 06:17)admin Wrote: Use this if the output data type is 2-byte floating point (float16).tnx for the help, works perfectly
Code:function PID2:setoutput()
local t, object, value
self.output = math.max(self.output, self.params.min)
self.output = math.min(self.output, self.params.max)
value = self.output
local t = type(self.params.output)
-- write to output if object is set
if t == 'string' or t == 'table' then
if t == 'string' then
self.params.output = { self.params.output }
end
for _, output in ipairs(self.params.output) do
grp.write(output, value, dt.float16)
end
end
end
it is not as accurate as i hoped. Is there and easy fix to get temperature in 0,1 degree output?