终端一体化运控平台
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.

2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using BPASmartClient.AGV.Feedback;
  2. using BPASmartClient.Helper;
  3. using BPASmartClient.Http;
  4. using BPASmartClient.HubHelper;
  5. using Newtonsoft.Json;
  6. using BPASmartClient.S7Net;
  7. namespace TestDemo
  8. {
  9. public partial class Form1 : Form
  10. {
  11. int count = 0;
  12. public Form1()
  13. {
  14. InitializeComponent();
  15. SiemensHelper siemensHelper = new SiemensHelper();
  16. siemensHelper.Connect(S7.Net.CpuType.S71200, "192.168.101.11");
  17. var res = siemensHelper.ReadClass<ReadClass>(1);
  18. siemensHelper.WriteClass(new ReadClass() { temp1 = "", temp2 = "" }, 1);
  19. ActionManage.GetInstance.Register(new Action(() =>
  20. {
  21. label1.Text = (count++).ToString();
  22. }), "ֵ");
  23. ActionManage.GetInstance.Register(new Action(() =>
  24. {
  25. Console.WriteLine("ʼִ");
  26. Thread.Sleep(20000);
  27. Console.WriteLine("ִ");
  28. }), "");
  29. }
  30. private void button1_Click(object sender, EventArgs e)
  31. {
  32. AGVToUpSystem aGVToUpSystem = new AGVToUpSystem();
  33. //string value = JsonConvert.SerializeObject(aGVToUpSystem);
  34. //string url = $"http://192.168.1.40:8089/apicallback/quicktron/robotjob/report?sign={value}";
  35. string url = "http://192.168.1.40:8089/apicallback/quicktron/robotjob/report";
  36. var res = APIHelper.GetInstance.HttpRequest(url, "", aGVToUpSystem, RequestType.POST);
  37. }
  38. private void button2_Click(object sender, EventArgs e)
  39. {
  40. Upstreamrequest aGVToUpSystem = new Upstreamrequest() { agvCode = "123" };
  41. // string value = JsonConvert.SerializeObject(aGVToUpSystem);
  42. // string url = $"http://192.168.1.40:8089/apicallback/quicktron/robotjob/upstreamrequest?sign={value}";
  43. string url = $"http://192.168.1.40:8089/apicallback/quicktron/robotjob/upstreamrequest";
  44. var res = APIHelper.GetInstance.HttpRequest(url, "", aGVToUpSystem, RequestType.POST);
  45. }
  46. private void button3_Click(object sender, EventArgs e)
  47. {
  48. ActionManage.GetInstance.Send("ֵ");
  49. }
  50. private void button4_Click(object sender, EventArgs e)
  51. {
  52. Task.Run(new Action(() =>
  53. {
  54. ActionManage.GetInstance.Send("");
  55. }));
  56. }
  57. }
  58. }