public void SetTripDO(int index, int errorCode, bool state) { string sTrip = string.Format(".gv.Daq.DOUT[{0}].trip.", index); TcComm.WriteInt(sTrip + "code", (short)errorCode, ETcRunTime.RT1); TcComm.WriteBool(sTrip + "state", state, ETcRunTime.RT1); }
public void SetScaleAO(int index, int type, double scale, double offset) { string sAO = string.Format(".gv.Daq.AOUT[{0}].", index); TcComm.WriteInt(sAO + "mode", (short)type, ETcRunTime.RT1); TcComm.WriteReal(sAO + "scale", (float)scale, ETcRunTime.RT1); TcComm.WriteReal(sAO + "offset", (float)offset, ETcRunTime.RT1); }
public void SetTripAO(int index, int errorCode, int maxCount, double min, double max) { string sTrip = string.Format(".gv.Daq.AOUT[{0}].trip.", index); TcComm.WriteInt(sTrip + "code", (short)errorCode, ETcRunTime.RT1); TcComm.WriteInt(sTrip + "maxCount", (short)maxCount, ETcRunTime.RT1); TcComm.WriteReal(sTrip + "minValue", (float)min, ETcRunTime.RT1); TcComm.WriteReal(sTrip + "maxValue", (float)max, ETcRunTime.RT1); }
// Set servo running profile // public void SetServoProfile(ETcServoAxis axis, PointF[] point) { for (int i = 0; i < point.Length; i++) { string sPointX = string.Format(".gv.Axis[{0}].profile.point[{1}].X", (int)axis, i); string sPointY = string.Format(".gv.Axis[{0}].profile.point[{1}].Y", (int)axis, i); TcComm.WriteReal(sPointX, point[i].X, ETcRunTime.RT1); TcComm.WriteReal(sPointY, point[i].Y, ETcRunTime.RT1); } string sLength = string.Format(".gv.Axis[{0}].profile.length", (int)axis); TcComm.WriteInt(sLength, (short)point.Length, ETcRunTime.RT1); }