module 2 - remote connectivity

30
12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228) Beckhoff Training Series Module 2: TwinCAT Remote Connectivity

Upload: nigo-villan

Post on 17-Jul-2016

48 views

Category:

Documents


7 download

DESCRIPTION

Module 2 - Remote Connectivity

TRANSCRIPT

Page 1: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

Beckhoff Training Series Module 2: TwinCAT Remote Connectivity

Page 2: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

2

©2007 Beckhoff Automation GmbH

This document is not to be replicated in part or in

whole, either electronically, by copy machine,

photographically, or by scanning without the written

consent of Beckhoff USA.

Beckhoff Automation LLC

12150 Nicollet Avenue South

Burnsville, MN 55337

877 894-6228

[email protected]

Version: 07102007

Page 3: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

3

Table of Contents Introduction ......................................................................................................... 5

Beckhoff Embedded PC ..................................................................................... 6 Embedded PC Bus Coupler Nomenclature ................................................................................ 6 Bus Terminals ............................................................................................................................. 7

Networking Troubleshooting ............................................................................. 8 Physical Connections .................................................................................................................. 8 TCP/IP Connections .................................................................................................................... 9

Establishing a Route ........................................................................................ 13 Configuring PLC Control for the Remote System .......................................... 19 Accessing the Remote System’s Desktop ...................................................... 20

Connecting to couplers running XP ........................................................................................... 20 Connecting to couplers running CE .......................................................................................... 23

Documentation .................................................................................................. 26 Beckhoff Information System .................................................................................................... 26

Other resources ................................................................................................ 29 www.beckhoff.com .................................................................................................................... 29 PC Control ................................................................................................................................. 29 Main Catalog ............................................................................................................................. 29 Products & Solutions ................................................................................................................. 29

Glossary ............................................................................................................ 30

Page 4: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

4

Page 5: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

5

Introduction Remote connectivity is achieved with PCs and embedded processors. These systems generally run a version of Windows CE or an NT based Windows OS (NT, 2000, XP, XPe or Vista). The main element in play is a sub-system called a router. As the name implies, the router, routes messages to and from all the remote devices to a single controller and manages them all. Remote connectivity involves ADS or Automation Device Specification. This is an interface that enables communication between ADS compliant devices and systems over TCP/IP. The following diagram seems complicated and will be discussed in later modules but just realize that the TwinCAT system is your computer. Message router talks to and through the TCP/IP port to the remote system (ADS interface): NOTE: This manual assumes complete understanding of all the functionality discussed in Module 1: Introduction to TwinCAT; please refer to Module 1 for specific instruction. Call 877 TWIN-CAT to obtain a copy of Module 1 or for further assistance.

GUI

Router

Realtime Server

Page 6: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

6

Beckhoff Embedded PC For embedded systems, if the task requires a complex program and/or has extensive visualization then XPe would be the right choice. On the other hand, if the program is simple and/or has simple visualization or no visualization at all, then the lower-cost CE might be sufficient.

Embedded PC Bus Coupler Nomenclature

All Embedded PC Bus Couplers carry the CX designator followed by a model number which describes the processor: CXxxxx-xxxx: CX900x – Ethernet controller with Intel

® IXP420 XScale

® technology, 266 MHz processor.

CX9010 – Ethernet controller with Intel® IXP420 XScale

® technology, 533 MHz processor.

CX1000 – Basic controller with Pentium® MMX-compatible CPU, 266 MHz processor.

CX1010 – Basic controller with Pentium® MMX-compatible CPU, 500 MHz processor.

CX1020 – High-performance controller with Intel® Celeron

® M ULV CPU, 1 GHz processor.

CX1030 – High-performance controller with Pentium® M CPU, 1.8 GHz processor.

The last three digits after the hyphen on the 1010, 1020 and 1030 describe specifics about the module (be sure to always look at the module with the 5 LEDs): CX10x0-xpot: p (port options): 0 = CPU without DVI 1 = CPU with DVI o (OS options): 0 = without operating system 1 = operating system = Windows CE 2 = operating system = Windows XP Embedded t (TwinCAT options): 0 = without TwinCAT 1 = with TwinCAT PLC run-time 2 = with TwinCAT PLC/NC run-time Three of the digits after the hyphen of the 900x and 9010, describe specifics about the module plus the last digit before the hyphen of the 900x describes the memory options: CX900m-bp0t/CX9010-bp0t: m (memory): 0 = 16 MB flash/64 MB RAM 1 = 32 MB flash/128 MB RAM

b (bus options): 0 = E-bus interface for EtherCAT Terminals 1 = K-bus interface for Bus Terminals

p (port options): 0 = without DVI/USB 1 = with DVI/USB

t (TwinCAT options): 0 = without TwinCAT 1 = with TwinCAT PLC run-time 2 = with TwinCAT PLC/NC run-time

CX1010 with a CPU with DVI, but no

operating system and without

TwinCAT PLC runtime.

Page 7: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

7

CX 1020/1030 9000/9010 Notes The CX 1020/1030 includes a built-in network switch. Either of the two Ethernet (RJ54) ports can be used to connect to the coupler and can be used to daisy-chain couplers. When looking at Network Connections on the CX 1020/1030, there will be two Local Area Connections. Only the first relates to standard Ethernet and applies to BOTH jacks on the coupler. The second connection is for EtherCAT and will be discussed in a future module.

Bus Terminals Terminals come in a number of varieties as well depending on the needs of the system. Refer to Module 1: Introduction to TwinCAT for descriptions of Bus Terminals

Page 8: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

8

Networking Troubleshooting The majority of issues with remote connectivity manifest in the connection itself and not with the Beckhoff remote connectivity configuration tools. Though you are welcome to skip this section for now, stepping through it will help guarantee that the following sections will go smoother. In any case, refer to this section if problems arise in later sections. Furthermore, this information is relevant for everyday networking issues and can be of use whether Beckhoff software and hardware are involved or not. There are a number of things that can affect remote connectivity. Everything from physical connections to the handling of network traffic must be analyzed in the course of troubleshooting.

Physical Connections 80% of connectivity issues are related to the physical connections. It is the easiest to diagnose, easy as well to correct but usually the last to be investigated. Get in the habit of following these steps early in the troubleshooting and you are sure to save time in the long run: 1. Look for link and activity lights on both the controller (computer) and the Bus Coupler (CXxxxx unit). Even laptops and Ethernet adapters have link and activity lights these days.

2. If either device does not have a steady link light AND a blinking activity light, cycle power on that device.

3. If the computer is directly connected to the Coupler (no hub, switch, router or wall jacks are used) than a crossover cable must be used. Hold the ends of the cable up together. If the wire colors are the same in every position from left to right, than it is a standard “straight-through” cable. If the sequence is different, than it is more likely that it is a crossover cable (see image)

4. If a hub, switch, router or wall jacks are used to connect the computer to the device, than standard straight-through cables are required. 5. Keep in mind that although the 1020 and 1030 have a built-in switch, they also have cable sensing so either a crossover or straight-through cable can be used. Note: DO NOT rely on the color of the entire cable itself. Some companies use consistently colored cables for different purposes, but that doesn’t mean that the colors are standard, universal or even without exception in your company. 1. If a hub, switch or router is used, make sure that connection and activity lights on it are also on.

2. Cycle power on any networking device that is not responding correctly. Please consider who and what else might be connected to the device before cycling power.

3. If using wall jacks, ask your network administrator to verify that the jacks are “hot.” Be sure that the jack your computer is connected to and the jack the remote system is on are both checked.

Crossover Ethernet cable

Page 9: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

9

TCP/IP Connections

After ensuring the physical path is sound, the next step is to see if the devices can communicate on that path. Communication is achieved via the TCP/IP protocol. Follow these steps to troubleshoot the communication:

1. Ping the device from the computer used as a controller. Do not assume that connecting from one computer is the same as connecting with any computer. 2. Determine the network name of the Bus Coupler: Look at the label on the left side of the coupler and find the MAC-ID. The network name of the coupler is cx_ followed by the last six characters of the MAC-ID (minus the hyphens). If the MAC-ID is 00-01-05-00-27-7B than the last six characters are 00277B and the network name of the coupler is cx_00277b.

3. Bring up the Command Prompt. Click the Start button and select Run. Type cmd in the Open field and hit Enter. (Use command for older OSes.) Once cmd.exe launches, type:

ping cx_00277b (use the actual name of

your device) and hit the Enter key. Command.exe should respond similar to this: Record the IP number (in this case: 10.12.2.57) as you may need it later.

Page 10: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

10

4. If instead of the above, you see: Then something is blocking the communication.

5. Run through the Physical Connections troubleshooting again.

6. Also try connecting the computer directly to the Bus Coupler using a crossover cable or two standard straight-through cables and a hub or switch (not a router). If you already were using a single hub or switch to connect, try a different hub or switch then try different cables.

7. Try disabling the firewall: 7.a. Click the Start button, select Control Panel and double-click on Security center. 7.b. Make sure Firewall is set to Off and click the OK button. Try to ping the coupler again.

Page 11: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

11

8. Also verify that Automatic private IP address is set on both your PC and the CX coupler.

8.a. Click the Start button and select Control Panel.

8.b. Click on Network and Internet Connections 8.c. Click Network Connections. 8.d. Double click on Local Area Connection

Page 12: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

12

8.e. Click the Properties button 8.f. Scroll down and select Internet Protocol (TCP/IP) and click the Properties button. 8.g. Select the Alternate Configuration tab and make sure Automatic private IP address is set. 8.h. Click the OK button on this and the last screen.

Page 13: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

13

Establishing a Route The connection between a computer and a remote system which is running Windows or Windows embedded OS is called a Route. To achieve a communication link between the systems, a route must be established. With the different varieties of OSes only step 5 below depends on knowing which OS is being accessed. On a CX coupler, the OS may be listed on the label on the side, but as different OSes can be installed, it is best to refer to the Purchase Order or contact your Beckhoff representative if you have any questions. 1. Launch System Manager 1a. Enter Config mode 2. Select SYSTEM - Configuration 2a. Click on the Choose Target button 3. The Choose Target System window shows all available systems on all the available Ethernet networks. The first time this is opened, only the network adapter will be displayed and cannot be expanded. The IP address listed is the PC’s AMS address that was automatically assigned by TwinCAT. 3a. Click on the Search (Ethernet) button.

Page 14: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

14

4. In the Add Route Dialog window, click the Broadcast Search button to begin discovering all connected systems. 4.a. The discovered systems will be displayed. If the computer doing the searching is also on a LAN with other computers, every computer and CX coupler with TwinCAT installed and in Config or Run mode will be listed. 4.b. Select the remote system, even if it is the only one listed. 4.c. Click the Add Route Button. 5. In the Login Information window that comes up, enter the username and password for the remote system. If it hasn’t been changed, the default is a username of Administrator. 5.a. If the CX is running CE then by default the password field should be left blank. 5.b. If the CX is running XPe then by default the password will be 1 (numeral one). 5.c. If the remote system is a PC then both the User name and Password have to be a local administrator on that computer. 5.d. Click the OK button.

If the remote system is not getting discovered, it may be on another subnet. Enter its IP address in the Enter Host Name / IP field and click the button. Your network administrator can also allow broadcast messaging on

port 48899 on all routers.

Page 15: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

15

6. The remote system should now have an “X” in the Connected column. This makes if easy to find connected systems when numerous systems are visible, such as when the systems are connected to a LAN. 6.a. Click the Close button. 7. The remote system should be listed in the Choose Target System window. Select the remote system and click the OK button to return to System Manager.

8. System Manager now displays extra tabs related to modifying the remote system. The remote system that is connected is identified in the lower right corner in red. 8.a. Click on the Version (Target) tab to view the version of the installed TwinCAT software on the remote system.

Page 16: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

16

If there is a communication problem, the lower right corner will report a time out. 9. If the lower right corner displays RTime, then it must be put in Config mode before continuing. 9.a. Enter Config mode by clicking the Set/Reset TwinCAT to Config Mode button (Shift+F4).

9.b. Click the OK button when asked to Restart TwinCAT System in Config Mode.

Page 17: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

17

10. Right click on I/O Devices and select Scan Devices. 10.a. Click OK when warned.

11. Deselect everything that is not the main remote system (On a CX coupler, this is the piece with the display). 11.a. Click the OK button. 11.b. Click the Yes button to Scan for boxes.

Page 18: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

18

12. The I/O should now be listed. At this point you are ready to switch to Module 1: Introduction to TwinCAT to learn how to configure, test and program the bus.

Page 19: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

19

Configuring PLC Control for the Remote System 1. In PLC Control, go under the Online menu and select Choose Run-Time System. 2. Click the next to the remote system. 2.a. Select the Run-Time port under the remote system. 2.b. Click the OK button.

Page 20: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

20

Accessing the Remote System’s Desktop Once the route is established, the rest of the configuration of a CX unit is accomplished using TwinCAT System Manager (see Module 1: Introduction to TwinCAT). This section is only for the rare occasion that the desktop of the remote system needs to be accessed.

Connecting to couplers running XP

Connection to a remote system running a version of Windows utilizes Windows’ built-in Remote Desktop program. To use Remote Desktop you must use a computer running Windows XP Professional with Service Pack 2 or Windows Server 2003 with Service Pack 2. 1. Launch Remote Desktop 1.a. Click on the Start button and select Programs or All Programs. 1.b. Go to Accessories then go to Communications and select Remote Desktop Connection. 2. Enter the name of the remote system (review the TCP/IP Connections section earlier in this manual to determine the name of the remote system). 3. Enter Administrator in the User name field. On a CX coupler, by default, the Password should be 1 (the numeral one). On a remote computer, the local administrator User name and Password must be used. 3.a. Click the OK button.

Page 21: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

21

4. The desktop will appear. Notice that the bar at the top lists the name of the remote system. 5. Transferring files to the remote system is the same as moving files between two PCs, even when connected to a CX coupler. One method is to mount the remote system: 5.a. Click the Minimize button on the top bar. 5.b. Click on the Start button of your PC and select Run. 5.c. Enter \\<remote system name>\c$ (e.g.\\cx_016520\c$).

Page 22: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

22

6. A window will open showing the files and folders on the remote system. 6.a. Move or copy files as you would normally on a PC; click-and-drag or copy (or cut) and paste. 7. To properly disconnect from the remote system, click the Start button on the remote system’s desktop and select Disconnect. 7.a. Click the Disconnect button to verify that you want to disconnect.

Page 23: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

23

Connecting to couplers running CE

Connection to a coupler running CE utilizes Microsoft’s CE Remote Display Control for Windows CE. The software is available for download from Beckhoff’s ftp site: ftp://ftp.beckhoff.com/Software/embPC-Control/CE/Tools/RemoteDisplay/CeRemDispHost.zip After the program is unzipped, you can save time by creating easy access to the program. Go to wherever the CERHOST.exe program was saved, and simply click-and-drag the icon to the Start button. Now it will be easy to find in the future – just click the Start button and CERHOST.exe will be near the top. Launch CERHOST.exe by double-clicking on the icon or selecting it under the Start menu if the alias is saved there. 1. Go under the File menu and select Connect.

2. Enter the name of the coupler in the Hostname field (review the TCP/IP Connections section earlier in this manual to determine the name of the coupler). Chances are the Password should be left blank. 2.a. Click the OK button.

3. When you connect, you will see the desktop of the coupler. 3.a. If instead you receive a connection error:

Go through the Network Troubleshooting section earlier in this manual.

Page 24: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

24

4. If you need to copy files to the coupler, you must first activate ftp on the coupler. 4.a. Click the Start button on the coupler’s desktop. 4.b. Select Settings then select Control Panel. 5. Double click on CX Configuration. 5.a. Click on the FTP tab 5.b. Select the Server active checkbox. 5.c. Click the OK button and click the Yes button to Reset the device. 5.d. Your screen will not show any change after clicking the Yes button, but the LEDs on the coupler will all flash, indicating that the coupler has been restarted. Wait until all the red LEDs are off and the ACT LED is flashing amber before continuing (takes about 30 seconds). 6. To copy files to the coupler, launch Microsoft Internet Explorer from the PC (another browser may produce unexpected results). 6.a. Put ftp:\\<the name of your coupler> (e.g. “ftp:\\cx_00277b) in the Address field and hit the Enter key on the keyboard. 6.b. Either drag the folder (or files) containing your project into the Explorer window or copy and paste them into the Explorer window.

Page 25: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

25

7. To access the files uploaded to the coupler, reconnect (start of this section) and double click on My Device. 7.b. Double click on Hard Disk and the files (and folders) will be in the FTP folder.

Page 26: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

26

Documentation

A number of sources of information are available when learning about, using specific Beckhoff tools, Beckhoff products and services and company information. As a customer of Beckhoff, all of this information will be at your disposal.

Beckhoff Information System

By far, the most complete source of information is the Beckhoff Information System. It includes information about every Beckhoff product, its use and interoperability. When TwinCAT is installed from the CD, the complete Information System is automatically installed. If TwinCAT was installed from a download, a slimmed-down version may have been installed to save download time. The full version can also be downloaded from the Beckhoff site. Arguably, Information System’s greatest asset is in its help with troubleshooting. Information System includes explicit details of programming and hardware elements. This includes error codes plus their causes and potential remedies. To access Information System, click the Start button, then Programs (or All Programs) then BECKHOFF, then Information System and finally the language of your choice.

Page 27: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

27

There are three main ways to find information in the Information System: Contents shows a tree of topics that can be browsed.

Index takes a keyword and shows items specified as being related to that keyword.

Page 28: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

28

Search returns every page that contains the entered search term.

If you find something close to what you are looking for in a search, try clicking on the Contents tab to see where the selected page falls in the tree. You can then browse from there to pinpoint the information you require.

Page 29: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

29

Other resources

www.beckhoff.com This is the official website of Beckhoff Automation. At this site you will have access to company information, including news, training locations, contact information, products and services.

PC Control This printed, monthly magazine, published by Beckhoff offers stories about companies that are benefiting from the incorporation of Beckhoff products plus tips, new product announcements and general news. It can also be read online at www.pc-control.net.

Main Catalog This printed document contains all of Beckhoff’s products and services and also includes some company information. See the I/O section in this manual for a description of model numbering and color scheme.

Products & Solutions This CD set includes a CD with the entire website, Main Catalog, documentation, all of the publications of PC Control available at the time plus a second, installation CD of Beckhoff software products.

Page 30: Module 2 - Remote Connectivity

12150 Nicollet Avenue South / Burnsville, MN 55337 / 877 TWIN-CAT (877 894-6228)

30

Glossary ADS (Automation Device Specification), an interface that utilizes a Message Router to communicate between ADS devices over TCP/IP. AMS (Automation Message Specification) Bus Terminal (aka slice), the part of the box that handles I/O and sometimes added communication and specific electrical requirements. Crossover Cable (Ethernet), a cable used to connect two computer systems where no Hub, Switch or Router is used. DVI (Digital Visual Interface), the external monitor connector on some CX couplers. Ethernet, a networking hardware protocol identified with an eight contact (RJ-45) cable. Fieldbus, an industrial network system for real-time distributed control. GUI (Graphic User Interface), the visual part of a program or system. Hub, an Ethernet hub is a low-cost device for connecting multiple systems via Ethernet. Unlike a Switch, it is unmanaged (all messages are sent to all ports at once); collisions can slow or stop communication. I/O (Input/Output), communication between a computer and its users, its storage devices, other computers (via a network) or attached hardware. LAN (Local Area Network), a network connecting systems in a small geographical area (e.g. one or more buildings in a campus).

MAC (Media Access Control), an unique address assigned to every networking device. Message Router, a part of the TwinCAT ADS system that handles communication between the program and the network and between the network and the ADS compliant device. OS (Operating System), the software that runs a computer or is embedded in and runs Fieldbuses. Ping, a program used to verify that a networked system is reachable. PLC (Programmable Logic Controller), a small special-purpose computer used to automate machines. Realtime system, a computer system that is forced to respond to an input in an explicitly allotted time. Router, similar to a switch but is designed specifically to connect multiple networks. A router can be configured as to the types of messages and port addresses that will be forwarded. (See also, Message Router.) Switch, a network device for connecting multiple systems and/or multiple network segments. Unlike a Hub, messages are sent only to the specific port addressed. This can reduce or eliminate collisions and increase speed and security. TCP/IP (Transmission Control Protocol/Internet Protocol), a networking communication protocol used to send messages between systems. TwinCAT (The Windows Control and Automation Technology)