@ -44,6 +44,7 @@ public class ModelTrackControl : EGModule, IEGFramework
if (CurrentRotation != 0)
{
this.EGSendMessage(new RequestTargetControl(2000, 500, true), this.GetModule<ModelSerialTest>().EngineSerialPort, ProtocolType.SerialPort);
this.EGSendMessage(new RequestTargetResetPosition(), this.GetModule<ModelSerialTest>().EngineSerialPort, ProtocolType.SerialPort);
CurrentRotation = 0;
this.GetModule<ModelActionStatus>().SetRotation(CurrentRotation);
}
@ -29,3 +29,15 @@ public class RequestTargetControl : ModbusRTU_WriteMultiHoldingRegister, IEGFram
return resultValues;
public class RequestTargetResetPosition : ModbusRTU_WriteSingleHoldingRegister, IEGFramework
public RequestTargetResetPosition()
this.DeviceAddress = 0x01;
this.RegisterAddress = 0x700A;
this.Value = 0x01;
EG.Print("[TargetSend]" + this.ToProtocolByteData().ToStringByHex());