You are on page 1of 41

CX9000 – Comms & Hardware Setup

Beckhoff TwinCAT


Training Hardware - 1

Ethernet Port
Battery Compartment and DIP switches Ethernet Port

Power LED `s and Power For CPU and Terminals.

Beckhoff TwinCAT


Training Hardware - 1

Beckhoff TwinCAT


Training Hardware - 1

Ordering information



DVI, 2 x USB

no TwinCAT
x x x x -

x x x x x x x x -


CX9010-0000 CX9010-0001 CX9010-0002 CX9010-0100 CX9010-0101 CX9010-0102 CX9010-1000 CX9010-1001 CX9010-1002 CX9010-1100 CX9010-1101 CX9010-1102

x x x x x x -

x x x x x x

x x x x x x

x x x x

Beckhoff TwinCAT


Beckhoff TwinCAT 5 .Setting up CX9000 Open an empty system manager file.

Setting up CX9000 When you have opened the system manager. Which you can find on the right hand side. Click on the System configuration and then click on the Choose target button. Choose a target system Then click on the Search (Ethernet)… button. Beckhoff TwinCAT 6 .

Setting up CX9000 Click the broadcast search button. Add Route dialog Beckhoff TwinCAT 7 .

Add Route Dialog Beckhoff TwinCAT 8 . If you cannot find the CX this way make sure that your network settings are DHCP as well and that a cross over Ethernet cable is used.Setting up CX9000 At default the CX9000 is addressed via DHCP therefore under the address info make sure the Host name is selected and not the IP Address.

Therefore the last six digits of this CX`s Mac ID is 01DA-18. Add Route Dialog Beckhoff TwinCAT 9 . If you look at the CX`s MAC ID the last 6 digits are the last six digits of the CX. AS you can see the CX`s name is CX_01DA18.Setting up CX9000 Click on the desired CX and click Add route.

The Password is 1. Default Password is kept blank Logon Information For CX10** and other embedded PC`s and Industrial PC`s the default Username is administrator. Beckhoff TwinCAT 10 .Setting up CX9000 Default User name is Administrator.

This means Twincat and the system manager now has a route to connect to the device.Setting up CX9000 Once you have accepted the Username and Password you should get a “X” under the Connected. Add Route Dialog Beckhoff TwinCAT 11 .

You can then click “OK” Choose Target System Beckhoff TwinCAT 12 .Setting up CX9000 Look for the CX that you have just connected to and click on it. It will highlight like on the left.

Now Connected Beckhoff TwinCAT 13 . Also on the bottom right side is the status of Twincat on the CX and the CX connected in red.Setting up CX9000 As you can now see at the top of the System manager the name of the device connected is showing.

Click on this and then you will be able to give the CX an address of your choice.Setting up CX9000 Now you will have an extra tab called “CX Settings”. Change CX Address Beckhoff TwinCAT 14 .

17.0 Click apply. Default address for BC9000 couplers is 172. Change the Subnet mask to*Dip switch*) Change CX Address Beckhoff TwinCAT 15 .16.Setting up CX9000 Change the IP Address to 172.90.

Setting up CX9000 Reboot system System Manager Target system is rebooting. Click “OK” Beckhoff TwinCAT 16 .

Better to Disconnect your network cable when changing IP addresses. Internet Protocol Properties You will now be able to ping the CX using this range.Setting up CX9000 Change your Networks IP address. You can use any range from 1 – 255.17. I have addressed it 172.1 Click ok. Beckhoff TwinCAT 17 .16.

Since we have changed the address we must now link the CX again with the new Address.Setting up CX9000 Now back to the Choose Target System. Choose Target System Beckhoff TwinCAT 18 .

Click the IP Address option next to the Host Name and Add Route. Once again. The address has changed.Setting up CX9000 As you can see the connected “X” has gone again. The Username and Password is asked. Click ok and you will now see the system is connected again with the new IP range Add Route Dialog Beckhoff TwinCAT 19 .

Setting up CX9000 The system manager again says the CX is in Run Mode. CX Is Run Mode You CX Should look like this at the moment. Beckhoff TwinCAT 20 .

Setting up CX9000 Config mode allows you to monitor and scan the bus. Restarting system in Config Mode Beckhoff TwinCAT 21 . Now your CX is in config mode. Click the Blue button at the top of the system manager. And should look like this. Click the “OK” button.

Scanning Devices Beckhoff TwinCAT 22 . Click OK Disable items not needed.Setting up CX9000 Right click on I/O Devices and click “Scan Devices”.

Setting up CX9000 Click “Yes” to scan for all boxes. Free run is used when you want to force outputs when in config mode. Your Scan tree should look similar to this Beckhoff TwinCAT 23 . Click “Yes” do create corresponding device for the Ethercat PRofibus Master. Scanning of IO Do not activate free run.

Save Your File Beckhoff TwinCAT 24 .Setting up CX9000 Save your System manager file and give it a name you think is suitable to your application.

Setting up CX9000 Now your system manager should look like this. System Manager Beckhoff TwinCAT 25 .

Setting up CX9000 Open a new Twincat file. For the CX 9000 IL=Instruction List range CX (ARM) LD=Ladder must be selected. For CX10**. Twincat Beckhoff TwinCAT 26 . For BC coupler ST=aStructured over Text ethernet select BC via CFC=Continuous AMS. BC via serial Function select BC Chart serial. FBD=Function Industrial PC`s Block Diagram and your local SFC=Sequential system select the Function PC or CX Chart (x86).

Twincat Programming Beckhoff TwinCAT 27 . Below that is your Resources tab (Global variables. Visualization tab Data Types tab and Program tab. Task configuration etc). Function Blocks and Functions. On the left are your programs.Setting up CX9000 I have started my programming using Structured Text.

1 Variable Name: Has Memory Allocation %I = Input %Q = Output %M = Memory Variable Type Simple Declaration Beckhoff TwinCAT 28 .Variable Declaration .

M TIME D STRING 29 Beckhoff TwinCAT .2 X I BYTE B 1.0 INT BOOL Variable Name AT % Q 20 : REAL W .Variable Declaration .

Variable Declaration .3 •Select Correct Variable for job •Declare Correctly •Use Correctly Beckhoff TwinCAT 30 .

Setting up CX9000 Go to your Resources tab below and open your Global variables. Add these variables. Twincat Programming – Global Variables Beckhoff TwinCAT 31 .

Setting up CX9000 Choose the run time system that is your CX. This will now connect the Twincat program to the CX so that when you download. the program will be downloaded into the CX. If you look at your bottom left hand corner you will see a target and if the system is Running. Twincat Programming – Choose a Run Time System Beckhoff TwinCAT 32 . This does not mean that the system is in Run mode however.

This is important and remember where you have saved it as the system manager reads a *. Beckhoff TwinCAT 33 .tpy file in the folder where the plc program has been saved.Save Save your program in a specific location.Setting up CX9000 Twincat Programming .

tpy file created in the directory where you moved the program. Click on PLC – Configuration. You will have to search for the new *.tpy file which is saved in the directory that you saved your program. If you move your program and rebuild it this file will not be updated. Beckhoff TwinCAT 34 Connecting Twincat Program to System manager . Right click and Click on “Append PLC Project…” Search for you File *.Setting up CX9000 Go back to the system manager.

As you can see the program can be rescanned.Setting up CX9000 Now the program is connected. This is for when extra variables have been added to your program. Program Connected To System Manager Beckhoff TwinCAT 35 . You can set this to automatic by clicking “Options” and tick “Check PLC project changes”.

If this does not happen then either. The program that you rebuilt is not linked correctly to the system manager. The name or directory that the system manager is looking for is not correct The option to check PLC changes is not ticked. Beckhoff TwinCAT 36 Rebuild Twincat Program .Setting up CX9000 Every time you Rebuild your Twincat program this message will now come up in your system manager.

Linking IO From Program to System Manager Now you will be seeing an arrow next to the Input.Setting up CX9000 Click on the Linked to… button. Link all the IO that you have by clicking on it and then clicking the “OK” button. This indicates that this input is being used by an I/O. Beckhoff TwinCAT 37 .

Check Configuration. Then begin by clicking on Generate mappings.Now to Accept everything we have done and to download the hardware configuration to the CX. Beckhoff TwinCAT 38 . Activate Configuration and Set/Reset to Run Mode. Generate Mappings Check Configuration Activate Configuration Set To Run Mode Setting up CX9000 Disable all the items we don’t need at this moment by clicking on the object not needed and then clicking the disabled checkbox.

Push F5 Key or go to online tab and click “Run”. Twincat Download Run mode has not been activated yet.Setting up CX9000 Now to downlaod the program for the first time. Beckhoff TwinCAT 39 .

Program Downloaded.Setting up CX9000 Now you can continue testing whatever you need. Beckhoff TwinCAT 40 . So to make the CX start with your program on startup every time make sure you create a Boot project. However every time the CX shuts down the CX will start with a blank memory.

Setting up CX9000 ALL DONE Done Beckhoff TwinCAT 41 .