Author Topic: Beckhoff Driver  (Read 21289 times)

Wazzy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Beckhoff Driver
« on: August 15, 2013, 08:32:36 AM »
Hi.

Was creating my own DLL's for Beckhoff systems and came across the advanced HMI a while back and saw that it was not available due to licensing, but would like to use your HMI on my systems.
I require however the Beckhoff driver. I'll be using industrial PC's with TwinCAT installed and I see this is a restriction. I tested it anyway and checked the ADS monitor however your HMI hangs. Is there anyway around this as this would assist me with a lot of my projects and client projects? Why the restriction as this library is exactly what i was working towards.
Also I just started looking at your samples about a hour ago and was wondering if I could use your DLL's in my own C#/VB.net project in the future. If there is a cost involved this is ok as I don't want my toolbox and application cluttered with items I'm not using.

Waz

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Beckhoff Driver
« Reply #1 on: August 15, 2013, 10:02:37 AM »
The TwinCAT driver for AdvancedHMI directly uses the TCP/IP stack based on the protocol specification published by Beckhoff. If TwinCAT is installed on the same machine, the AMS router will intercept and reroute the request, therefore never allowing them to get back to the AdvancedHMI driver. I made many attempts to get the documentation on how to interface directly with the AMS router, but the only response I have been able to get is that the information is proprietary. I believe this has it's roots in the CodeSys software because they are just as unwilling to give any documentation and prefer to sell their interface software.

So far the only way I have been able to do testing using the same machine is to have TwinCAT in a virtual machine. Sometimes this is even intermittent.

As for the DLLs, we do not allow them to be used outside of AdvancedHMI. This is mainly because they give AdvancedHMI it's signature look, unlike the majority of the HMI packages that use the standard Symbol Factory library.

There are plans to eventually make the drivers available for use outside of AdvancedHMI for a licensing cost, but as of now there are no plans for the graphical controls.

Wazzy

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Beckhoff Driver
« Reply #2 on: August 15, 2013, 01:55:03 PM »
Possibly a silly question, but why not use the ADS drivers already supplied if the person has TwinCAT currently installed and use your driver if no TwinCAT installed(Or just install TC CP).

I began making a driver with these dll's and have done a basic button however this was taking far to much time, but couldn't this be a solution for you?

On another note:
I will chat to some of the developers when I'm back in the office tomorrow to see if its possible to get some documentation on how to interface directly with the AMS router.

Waz

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Beckhoff Driver
« Reply #3 on: August 15, 2013, 06:09:04 PM »
The original reason for not using the DLL is that it is not based on .NET and I wanted to keep the software as much .NET as possible. Once I discovered the problem with a TCP/IP based driver, a driver based on the DLL was started. I went to Beckhoff and ask about the distribution of their DLL with AdvancedHMI and they said "no", you must have each user go to the website, download, and register. It would then take a few more steps to bring it into the software. It was decided that this process was too complicated and went against the goal of AdvancedHMI to make it as easy as possible to get started. At that point, I even removed the driver from the software because it required too much support because of its limitation.

By popular demand I decided to put in back in the software. So I am giving it another try.

KariM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Beckhoff Driver
« Reply #4 on: October 30, 2013, 11:48:41 AM »
Hi
I have advancedhmi v.3.5.9, and ihave seen the video in youtube about connet to TwinCat.
In video is different place to but variable than I have.
Any way when try to do anything I get an iformation:
"A first chance exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in MfgControl.AdvancedHMI.Drivers.dll
A first chance exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in AdvancedHMIDrivers.dll"
Same info 2 times, when I dont try connect variable. Six times, while trying  connection.
TwinCat is not any more in PC with HMI.
My pilot lamp tell:
No response from TwinCat
(Get symbol)
AMS and IP adresses are OK
Target is small Panel with WinCE5.
What i have done wrong?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Beckhoff Driver
« Reply #5 on: October 31, 2013, 06:19:02 PM »
My pilot lamp tell:
No response from TwinCat
(Get symbol)
AMS and IP adresses are OK
Target is small Panel with WinCE5.
What i have done wrong?
The video is a little outdated. You can no longer run the HMI on the same PC as TwinCAT.

When you say your target is a WinCE5 panel, do you mean for the HMI? If so, AdvancedHMI is not compatible with Windows CE.

KariM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Beckhoff Driver
« Reply #6 on: November 03, 2013, 05:12:49 AM »
Hi
My PLC is the panel with WinCE5 and my HMI is normal WinXP computer.
Panel is so tiny, only 64MB ram-memory. No room for HMI.
KariM

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Beckhoff Driver
« Reply #7 on: November 03, 2013, 07:06:49 AM »
Do you have TwinCAT installed on the PC you are running the HMI from? Even if TwinCAT is installed and only used for programming, the AMS router will be active and intercepting the messages.

KariM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Beckhoff Driver
« Reply #8 on: November 04, 2013, 02:55:43 AM »
Hi
In PC with HMI is no TwinCat.
It has been installed, but not any more.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Beckhoff Driver
« Reply #9 on: November 04, 2013, 06:48:45 AM »
Even after uninstalling, the routing table entries will remain on the PC and the remote TwinCAT. You can use System Manager to delete the router entries pointing to the PC that you are running the HMI on or the tools on PC with TwinCAT running.

If TwinCAT receives a message, when it replies it will look up the PC name or IP in the AMS router table. If it finds the entry, it will try to send the reply to the remote router. Since AdvancedHMI doesn't use the router, it will never receive the message. Since the router was uninstalled, the message will be simply lost.

KariM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Beckhoff Driver
« Reply #10 on: November 15, 2013, 02:30:10 AM »
Hi
Now ihave PC with WinXP and newer TwinCat.
Situation same. No work.

New error:
"WriteData1. SendData Connection Failed-No connection could be made because the target machine actively refused it 192.168.0.243:48898"

Target is Beckhoff CP6607
PLC with WinCE 5.0 , TwinCat PLC HMI CE, TwinCAT NC PTP Runtime for Microsoft Windows CE, TwinCat PLC.

What is reason for malfunction?

Later try to connect to PC what include TwinCat PLC running.
"WriteData1. SendData Connection Failed-No response from target system. Make sure firewall off and Check username, password and computer name"
Computer name. Where it suppose write?
« Last Edit: November 15, 2013, 05:41:07 AM by KariM »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Beckhoff Driver
« Reply #11 on: November 15, 2013, 06:52:37 AM »
Open a command prompt window and ping the computer name you put in the ComputerName property. You should see a response. Does it return responses from the remote TwinCAT PC?

What is the name and IP address of the PC with AdvancedHMI?

Can you open RegEdit on your TwinCAT PC or have CERHOST to remote into the TwinCAT PC? Check the registry as shown in the picture to make sure the PC you are running AdvancedHMI on is not listed. If so, delete the entry. Do the same on the PC you are running AdvancedHMI.

If the PC once had TwinCAT or even a PC with the same IP address had TwinCAT, then the the computer running TwinCAT will remember it and force the messages through the AMS router and they never get to the AdvancedHMI driver.

You can also run a WireShark packet capture to see this. The reponse packet will return to a different port than the request went from.

KariM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Beckhoff Driver
« Reply #12 on: November 15, 2013, 07:24:25 AM »
Hi
Where is place to write ComputerName property??

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: Beckhoff Driver
« Reply #13 on: November 15, 2013, 07:34:28 AM »
Hi
Where is place to write ComputerName property??
My mistake. The property TargetIPAddress will accept the computer name and the code will resolve it to an IP address. One of those things that I have been doing so long that I don't even look at the property name anymore.

KariM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Beckhoff Driver
« Reply #14 on: November 15, 2013, 07:56:14 AM »
Hi
OK
Next thing.
In YouTube is only one place to put variable.
Here is several. Where it is suppose to write.
Is for text, numbers, and out(click) in visible, places for variable dependin of type of it?
Anyway I have error
No response from TwinCat Get SymbolInfo.

Sorry that no answering back.
I see Panel with Cerhost, and it response PING.
Both connections from HMI-PC, whitout TwinCat.

added 18.11.2013
Connecting to PC where is Twincat PLC-program.
Now I have next return:
SendData Connection Failed-Error setting up remote system, check TcClientEx for username, password, and computer name.
RemoteXP systems by default don't allow blank passwords.ADS Error 1796.
(reading/writing not permitted)
This is from TwinCat manual ADS return codes.
Username contains letters over A-Z. Is it OK?
Password is in A-Z, and computer name too.
« Last Edit: November 18, 2013, 10:49:20 AM by KariM »