Author Topic: Setting up connection between TwinCat3 and AHMI  (Read 5146 times)

Shark13

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Setting up connection between TwinCat3 and AHMI
« Reply #15 on: August 23, 2022, 11:38:04 AM »
Let's see if this works.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Setting up connection between TwinCat3 and AHMI
« Reply #16 on: August 23, 2022, 12:17:38 PM »
I see Target Port 801 not found. I'm quite sure TC3 should be set to port 851 in the driver settings

Shark13

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Setting up connection between TwinCat3 and AHMI
« Reply #17 on: August 23, 2022, 12:42:13 PM »
I changed the port number to 851 on the AHMI side. You are right it should have been 851.
I still got the same Error code from before though unfortunately. ADS Error. Attached is capture after port 851 set correctly.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Setting up connection between TwinCat3 and AHMI
« Reply #18 on: August 23, 2022, 02:16:47 PM »
The ADS error is not longer there. I see a couple variables:

.TESTBUTTONSTOP
.TESTBUTTON
.TESTDISPLAY2

Packets 222 and 223 seem to show a successful write of 1 to the variable

I don't remember all the ADS addresses, so I am going to look further into it to decipher the packets.

Shark13

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Setting up connection between TwinCat3 and AHMI
« Reply #19 on: August 23, 2022, 02:19:49 PM »
I went back and looked at my variables. Changed them back to global variables.
I was able to get the variables to read and write with bools that way! Will test further and see if I can read and write other data types next!
Thanks for your help!  ;D 8)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Setting up connection between TwinCat3 and AHMI
« Reply #20 on: August 23, 2022, 03:52:27 PM »
I made a test setup and what I found was that I had to include the global variable file name. My variable name was:

GVL.TestButton

Shark13

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Setting up connection between TwinCat3 and AHMI
« Reply #21 on: August 26, 2022, 02:50:20 PM »
That is what I have found as well.
Thank you!