V5.3.6: Error in .Net : KM_IO.cs

Moderators: TomKerekes, dynomotion

Post Reply
dominfo
Posts: 14
Joined: Tue Sep 12, 2023 8:39 am

V5.3.6: Error in .Net : KM_IO.cs

Post by dominfo » Fri Nov 22, 2024 2:06 pm

Hello Tom

I identified a bug when setting a value to an analog output.
/// <summary>
/// Sets the output level of an analog output
/// </summary>
/// <param name="value">-2048...2047</param>
public void SetAnalogValue(int value)
{
if (_IOType != IO_TYPE.ANALOG_OUT)
{
throw new DMException(this, new Exception("Cannot set digital value on a non analog output point of IO"), "Problem setting IO");
}
else
{
_Controller.WriteLine(String.Format("DAC{0}=", _ID, value));
}
}

The command should be
_Controller.WriteLine(String.Format("DAC{0}={1}", _ID, value));
Regards
Frederic

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: V5.3.6: Error in .Net : KM_IO.cs

Post by TomKerekes » Fri Nov 22, 2024 6:12 pm

Thank you Frederic
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply