You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Command.S7F17.cs 1.1 KiB

2 年之前
123456789101112131415161718192021222324252627282930313233
  1. // ********************************************************************************
  2. // 文件名字: Command.S7F17
  3. // 文件描述: Command.S7F17
  4. // 开发人员: Michael
  5. // 创建时间: 2019/11/8 0:08
  6. //
  7. // 更新历史:
  8. // + 创建 Command.S7F17.cs 文件. by Michael @2019/11/8 0:08
  9. // ********************************************************************************
  10. using Glorysoft.SECS.EQP.Message;
  11. using Glorysoft.SECS.EQP.Utilities;
  12. using Glorysoft.SECSwell;
  13. namespace Glorysoft.SECS.EQP.Commands
  14. {
  15. public partial class Command
  16. {
  17. public static void S7F17Command(S7F17Item items, object tag = null)
  18. {
  19. if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
  20. {
  21. var trans = SimulatorInfo.Instance.Context.GetTransaction(7, 17, "S7F17");
  22. foreach (var item in items.PPIDs)
  23. {
  24. trans.Primary.Root.Add(SECSUtil.CreateSECSItem("PPID", eSECS_FORMAT.ASCII, item));
  25. }
  26. trans.Tag = tag;
  27. SimulatorInfo.Instance.Context.SendMessage(trans);
  28. }
  29. }
  30. }
  31. }