| | |
| | | protected override void Start() |
| | | { |
| | | AllAxisOn(); |
| | | |
| | | base.Start(); |
| | | } |
| | | |
| | | protected override void Stop() |
| | |
| | | /// 按位设置数字 IO 输出状态 |
| | | /// </summary> |
| | | /// <param name="index">输出口,返回1-16</param> |
| | | /// <param name="value">false表示输出,true表示关闭</param> |
| | | /// <param name="value">false表示关,true表示开,板卡要设置取反</param> |
| | | public override void WriteOutput(short index, IOValue value) |
| | | { |
| | | short outNum = (short)(index % 100); |
| | | short outNum = (short)(index % 100 + 1); |
| | | if ((int)value <= 1) |
| | | { |
| | | GTSCardAPI.GT_SetDoBit((short)IConfig.CardNum, GTSCardAPI.MC_GPO, outNum, (short)value); |
| | |
| | | AxisMovingStatus axisMovingStatus = new AxisMovingStatus(); |
| | | axisMovingStatus.AxisIndex = axisConfig.AxisIndex; |
| | | axisMovingStatus.AxisName = axisConfig.AxisName; |
| | | axisMovingStatus.CurPosition = Convert.ToInt32(GetPosition(axisMovingStatus.AxisIndex)); |
| | | //axisMovingStatus.CurPosition = Convert.ToInt32(GetPosition(axisMovingStatus.AxisIndex)); |
| | | axisMovingStatus.Destination = Convert.ToInt32(GetPrfPosition(axisMovingStatus.AxisIndex)); |
| | | axisMovingStatus.CurVelocity = GetVelocity(axisMovingStatus.AxisIndex); |
| | | axisMovingStatus.PrfVelocity = GetPrfVelocity(axisMovingStatus.AxisIndex); |
| | | //axisMovingStatus.CurVelocity = GetVelocity(axisMovingStatus.AxisIndex); |
| | | //axisMovingStatus.PrfVelocity = GetPrfVelocity(axisMovingStatus.AxisIndex); |
| | | axisMovingStatus.AxisStatus = GetAxisStatus(axisMovingStatus.AxisIndex); |
| | | |
| | | axisMovingStatusesList.Add(axisMovingStatus); |
| | |
| | | GTSCardAPI.GT_GetDo((short)IConfig.CardNum, GTSCardAPI.MC_GPO, out outValue); |
| | | |
| | | //解析结果 |
| | | for (var index = 1; index <= 16; index++) |
| | | for (var index = 0; index < 16; index++) |
| | | { |
| | | IOItem inItem = new IOItem() |
| | | { |
| | |
| | | monitorSet.OpConfig = new OperationConfigBase(); |
| | | } |
| | | |
| | | //monitorSet.OpConfig.InputPara = monitorSet.InputDataIndex.ConvertAll(index => |
| | | //{ |
| | | // return tempNew[index].Value; |
| | | //}).ToList(); |
| | | monitorSet.OpConfig.InputPara = monitorSet.InputDataIndex.ConvertAll(index => |
| | | { |
| | | return tempNew[index].Value == IOValue.TRUE ? 1 : 0; |
| | | }).ToList(); |
| | | |
| | | ExcuteMonitorInvoke(DateTime.Now, monitorSet.InvokeDevice, this, monitorSet); |
| | | } |