AdvancedHMI Software

General Category => Support Questions => Topic started by: Gruber on April 16, 2014, 07:14:14 AM

Title: Output works Input not
Post by: Gruber 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
 
Title: Re: Output works Input not
Post by: Archie 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 (http://advancedhmi.com/forum/index.php?topic=159.0)
Title: Re: Output works Input not
Post by: Gruber on April 16, 2014, 01:27:09 PM
No the TwinCat is only on the CX not on the local PC.
Title: Re: Output works Input not
Post by: Archie 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.

Title: Re: Output works Input not
Post by: Gruber 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
Title: Re: Output works Input not
Post by: Archie on April 16, 2014, 06:41:40 PM
I see the Writes, but I do not see an ADS Read
Title: Re: Output works Input not
Post by: Gruber 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
Title: Re: Output works Input not
Post by: Archie on April 17, 2014, 07:25:03 AM
Add a BasicLabel to your form and put a valid variable name in the PLCAddressValue property
Title: Re: Output works Input not
Post by: Gruber on April 17, 2014, 09:52:39 AM
Sry i dont really know what you mean.
Can you write me an example?
Title: Re: Output works Input not
Post by: Gruber 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.
Title: Re: Output works Input not
Post by: Archie 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.
Title: Re: Output works Input not
Post by: Gruber 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...
Title: Re: Output works Input not
Post by: Archie 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
Title: Re: Output works Input not
Post by: Archie 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
Title: Re: Output works Input not
Post by: Gruber on April 18, 2014, 09:28:11 AM
Ok ist runing now .
Thanks for your help
Title: Re: Output works Input not
Post by: austero_nino on May 19, 2014, 02:49:48 AM
Hello,

I read your post and I think you have successfully connect twincat software and advancedhmi. Please can you help me how to connect this two software, I don't have any idea how this things works. I had read many threads/forums and video on youtube and all of it not works. I think its outdated. The version of my twincat is v2.11.2241 and AdvancedHMIBetav323.

Any of your help is very appreciated.

Thank you,

Niño
Title: Re: Output works Input not
Post by: Archie on May 19, 2014, 07:20:35 AM
I read your post and I think you have successfully connect twincat software and advancedhmi. Please can you help me how to connect this two software, I don't have any idea how this things works. I had read many threads/forums and video on youtube and all of it not works. I think its outdated. The version of my twincat is v2.11.2241 and AdvancedHMIBetav323.

Thank you,

Niño
First off, start with the latest version of AdvancedHMI, which is 3.61

What is your system configuration? Is the TwinCAT runtime on a CX controller, another PC, etc? Are you running AdvancedHMI on a different PC than you are using to program TwinCAT?