|
@@ -134,8 +134,8 @@ namespace MECF.Framework.Common.Device.PowerSupplier
|
|
|
for (int i = 0; i < stepDatas.Count; i++)
|
|
|
{
|
|
|
PowerSupplierStepPeriodData data = stepDatas[i];
|
|
|
- command.Datas[0 + STEP_PERIOD_LENGTH * i] = (ushort)(Math.Round(data.Voltage * scale,0)/0x10000);
|
|
|
- command.Datas[1 + STEP_PERIOD_LENGTH * i] = (ushort)(Math.Round(data.Voltage * scale,0) %0x10000);
|
|
|
+ command.Datas[0 + STEP_PERIOD_LENGTH * i] = (ushort)(Math.Round(data.Voltage * 1000,0)/0x10000);
|
|
|
+ command.Datas[1 + STEP_PERIOD_LENGTH * i] = (ushort)(Math.Round(data.Voltage * 1000,0) %0x10000);
|
|
|
command.Datas[2 + STEP_PERIOD_LENGTH * i] = (ushort)(Math.Round(data.Current * scale, 0)/0x10000);
|
|
|
command.Datas[3 + STEP_PERIOD_LENGTH * i] = (ushort)(Math.Round(data.Current * scale, 0) % 0x10000);
|
|
|
command.Datas[4 + STEP_PERIOD_LENGTH * i] = 0;
|
|
@@ -181,7 +181,7 @@ namespace MECF.Framework.Common.Device.PowerSupplier
|
|
|
command.Channel = channel;
|
|
|
command.CommandCode = 0x10;
|
|
|
command.Address = (ushort)(CURRENT_SETTING_ADDRESS);
|
|
|
- command.RegisterCount = 4;//2N N-寄存器地址数据
|
|
|
+ command.RegisterCount = 2;//2N N-寄存器地址数据
|
|
|
ushort[] ushorts = new ushort[2];
|
|
|
ushorts[0] = (ushort)(currentValue / 0x10000);//高位
|
|
|
ushorts[1] = (ushort)(currentValue % 0x10000);//低位
|