Author Topic: Output works Input not  (Read 4029 times)

Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Output works Input not
« on: April 16, 2014, 07:14:14 AM »
Hello together,
i am new here and also new in VB.
I tryed to get the advancedHMI runnig with Twincat 2.
After some Problems i got it runnig.
Now my Problem:
When i create a project

MomentaryButton with
PLCAddressClick .butten
PLCAddressVisible .light
My TwinCATComm1 has the ip from the PLC ,TargetAMSNetID and the Port.

When i start the Project the Click works and Change states in my PLC but the visible dont.
The same when i try the tutorial from the web with a Counter.
So it seems that i can send data to the PLC but not recieve any data from the plc.

My System ist the following.
Twincat 2 on a CX1020 with TwinCAT OPC UA Server.
My working System ist a local PC with Win7 VisualBasicStudioExpress2013 and AdvancedHMIBeta361

I hope someone can help me.
Thanks
 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Output works Input not
« Reply #1 on: April 16, 2014, 07:38:34 AM »
Does the PC that you are running AdvancedHMI on have TwinCAT installed? If so, that is the problem. The TwinCAT router captures the responses from the PLC and prevents them from getting to AdvancedHMI.

See a more detailed explanation here:

http://advancedhmi.com/forum/index.php?topic=159.0

Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Output works Input not
« Reply #2 on: April 16, 2014, 01:27:09 PM »
No the TwinCat is only on the CX not on the local PC.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Output works Input not
« Reply #3 on: April 16, 2014, 01:37:32 PM »
If the PC never had TwinCAT installed on it, then you will have to install Wireshark to capture the packets. You will need to look at the AMS packets and see what port they go to.


Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Output works Input not
« Reply #4 on: April 16, 2014, 02:00:58 PM »
Ok i run the Program now but i dont know what to do with These informations...

192.168.115.64 is the CX
192.168.115.80 is the local PC
forgotten to activate the ports

so here is the new Image
« Last Edit: April 16, 2014, 02:15:07 PM by Gruber »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Output works Input not
« Reply #5 on: April 16, 2014, 06:41:40 PM »
I see the Writes, but I do not see an ADS Read

Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Output works Input not
« Reply #6 on: April 17, 2014, 04:28:53 AM »
So i have no idea why there are only write packets and no read packets. Have i forgotten soemthing? Do you have an idea?

I take a jpg of my Debugging protocol
« Last Edit: April 17, 2014, 04:37:08 AM by Gruber »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Output works Input not
« Reply #7 on: April 17, 2014, 07:25:03 AM »
Add a BasicLabel to your form and put a valid variable name in the PLCAddressValue property

Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Output works Input not
« Reply #8 on: April 17, 2014, 09:52:39 AM »
Sry i dont really know what you mean.
Can you write me an example?

Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Output works Input not
« Reply #9 on: April 17, 2014, 10:25:07 AM »
Ok i found it.

I placed a Basic Label and in the PLCAdressValue i wrote ".day"

This is a word-variable (Global variable) where i save the Name of the current day.
Start Debugging and still the same.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Output works Input not
« Reply #10 on: April 17, 2014, 10:54:21 AM »
Now do a Wireshark capture with the BasicLabel. Start Wireshark before starting AdvancedHMI. There are some initial route configurations I need to see. Then you should see the read packets 2-3 tines per second.

Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Output works Input not
« Reply #11 on: April 18, 2014, 03:18:49 AM »
Ok ist done. But there are only packets when i start hmi after the start only when i press a button in the hmi.

see the protocol...

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Output works Input not
« Reply #12 on: April 18, 2014, 08:38:18 AM »
I think I found the problem. Open TwinCATComm.vb and go to line 418 and change it to this:

Code: [Select]
    Private Sub PollUpdate(ByVal sender As System.Object, ByVal e As System.EventArgs)
        'If m_DisableSubscriptions Then Exit Sub
        If True Or (sender Is GetType(System.Timers.Timer)) Then

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Output works Input not
« Reply #13 on: April 18, 2014, 08:40:02 AM »
I checked the latest unreleased version and this is what line 418 should be:
Code: [Select]
        If TypeOf (sender) Is System.Timers.Timer Then

Gruber

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Output works Input not
« Reply #14 on: April 18, 2014, 09:28:11 AM »
Ok ist runing now .
Thanks for your help