CCW9-L1-PV800 Lab
CCW9-L1-PV800 Lab
Workbench R9 Update
Connected Component Workbench Release 9
Contents
Connected Component Workbench Release 9 ........................................................................................... 4
Contents .......................................................................................................................................... 4
Working with a PV800 project to interface with the CompactLogix L18 Controller....................................... 4
Open up CCW then Import the PV800 archived project file. .......................................................................................... 4
Modifying the Existing CCW Project. ............................................................................................................................. 5
Validate and Download the Project to the PV800 .......................................................................................................... 9
Testing the Project with the PV800 terminal and the L18 controller............................................................................. 11
Lab 2: Using Socket Programming in Micro850 ........................................................................... 12
4 of 26
Before you begin
This lab will demonstrate the updated features of the Connected Component Workbench v9, demonstrating the RUN
MODE Change, M850 socket support, and interfacing the PanelView 800 to the L18 Logix controller.
Lab 2: Socket Programming Sample program and EWEB Socket Test application
Using Micro850 as a Server
Using Micro850 as a Client
NOTE: Please refer to the Ethernet Station Chart at your lab station for IP Address assignments
for your station.
The Ethernet ports on devices are set to DHCP mode and receive their addresses from the Stratix
5700 switch with port persistence.
5 of 26
Lab 1: CompactLogix-to-PV800 Communications
With the release of CCW version 9 and PV800 firmware version 3.011, a PanelView 800 can be configured as an
operator interface for an L1 CompactLogix controller. Lets see how it works.
We will once again leverage the DHCP Persistence feature of the Stratix 5700 switch in this lab. The PV800 is
connected to port Fa1/4 of the Stratix 5700 switch in your lab station. This port is configured to serve up an IP
address of 172.16.1xx.7 where xx is the station number (01-10). The CompactLogix controllers Ethernet ports must
also be configured to be on the same network subnet. Using the long green cable at your station (one of the cables
used to connect the devices in the DLR network from the previous lab), connect the L18 controller directly to port
Fa1/5 on the Stratix 5700 switch at your station. This port has been configured to serve up IP address of
172.16.1xx.8. Please disconnect all other green cables from the devices connected to the DLR network. This may
result in the EIP Mod led on the Stratix 5700 switch to blink red but that state should not have a negative impact on
this lab.
IMPORTANT
To ensure that the CompactLogix L18 controller gets the correct IP address from the Stratix 5700 switch, please
power cycle the L18 controller but temporarily removing the power connector from the front of the controller. Reinsert
the connector after the red OK led turns off.
6 of 26
Downloading the L18 CompactLogix Program
In this lab you will be starting and stopping a simple Timer in the CompactLogix L18 controller. The timer is
embedded in an Add-On Instruction. The program was written using Studio 5000 Logix Designer v28 software.
2. Download the program to your L18ERM-BB1B controller (using the Ethernet station chart at your lab
station) and put the controller into Run mode.
3. Go to the Controller Organizer folder to look at the logic in the MainRoutine then go to the Add-On
Instruction folder to view the contents of the AOI.
7 of 26
Working with a PV800 project to interface with the CompactLogix L18 Controller
In this section, you will import an existing PV800 application, make several changes, and then download it to the
PV800.
1. To open Connected Components Workbench (CCW) software, double click shortcut from the
desktop.
2. Go to File -> Import Project -> Lab Files -> CCW9-L1-PV800 folder, then select the file
PV_800_L18_Start.ccwarc.
3. Click Open.
4. Check the Output folder at the bottom of CCW for a success message.
4 of 26
Modifying the Existing CCW Project.
5 of 26
2. Under Controller Settings, a valid path to the L18 controller must be entered. Delete the 0 under the
Address column then add the path information, 172.16.1xx.8,1,0. Note that there cannot be any spaces
in the middle of the path information.
3. Once the Path information has been added to the project, go to the Project Organizer and double click
Screens -> 1 Screen_1.
6 of 26
The 1 - Screen_1 should look similar to below prior to making some edits.
4. Next, we will add a new object to our screen. The object has already been created for you. Navigate to
View -> User-defined Object Library and select and drag the Stop_Reset_Timer object onto 1
Screen_1.
7 of 26
5. Position the new object under the Start Timer button. Your screen should look similar to below.
6. Next, we need to add a new tag to the CCW project. Under PV800_APP1* under the Project Organizer,
click Tags. Add a new tag called Reset as shown below.
7. Navigate back to 1 Screen_1, right click on the new object and select Properties. Under
Connections, click on Write Tag then click on the drop down arrow button. Select the newly created
tag, Reset, from the list.
8 of 26
Validate and Download the Project to the PV800
1. To validate and download the project to the PV800 terminal, click on PV800_App1*, then click Validate.
If there are no issues with the project then the following pop-up box should appear.
If errors persist then troubleshoot them prior to attempting to download.
2. If the project has no errors, click on the Save icon to save your project
3. Once there are no errors, its time to download the project to the PV800.
9 of 26
4. An RSLinx Classic RSWho window should pop-up. Select the PV800 terminal at IP address
172.16.1xx.7 under the ETHIP-1 driver then click OK.
6. If there is an existing file with the same file name, the following window will appear. Click Yes to
proceed.
7. To run the application, at the HMI menu, select File Manager, then Run.
10 of 26
Testing the Project with the PV800 terminal and the L18 controller.
The Timer in the AOI in the Logix controller may be started by pressing the Start Timer button on the HMI
display. To set a new preset value for the timer, press the gray box labeled Set Timer Preset, then enter a value
of 1 - 20 followed by the Enter key. This will determine the number of seconds the timer will run before being
done. There is a default value of 10 seconds.
At any time, the Stop/Reset button may be pressed. The Start button will need to be pressed again to restart the
timer. Note that the accumulate value of the time will be reset to 0 when the Stop/Reset button may is pressed.
This value may be viewed in the blue box, Timer Accumulated Value.
When the timer is done, a round indicator will show up on the display in blue with a flashing text, Timer Done.
Also, go back to the Logix Designer and see how pressing the buttons on the display affects the project.
11 of 26
Lab 2: Using Socket Programming in Micro850
In this section, you will import a project Socket_Example_Programs_r9.ccwarc for your lab session. An application
EWEB Sockets Test will be used to simulate the Server and Client, which is the communication between the
Micro850 and computer.
Before we start, lets examine the connection flow of the TCP Server/Client and the instruction and UDFB to be used
in the program.
In the diagram, the blue boxes represent the TCP connection flow between the Server and the Client; and the yellow
boxes represent the native instruction in Micro800, and the green boxes will represent the UDFB data.
In the TCP_Server program, the flow of the program will be as followed:
The Server will create a socket instance, and wait for a client to send a
request to get connected (OPEN SOCKET)
When the server received the request, the server ACCEPT the
connection, the data exchange will be able to start.
12 of 26
In the TCP_Client Program, the flow of the program will be as followed:
After the socket instance is created, client send a request to the Server to
get connected. (OPEN SOCKET), and wait for the connection to be
establish.
To monitor the status of the socket, the native instruction used is SOCKET_INFO, the UDFB
RA_TCP_SOCKET_OTHERINFO provides more information, and the RA_TCP_ERROR_DESC will provide the
description error occurred.
In the lab, we will be using the EWEB Sockets Test Application, which can act as a Server or Client.
13 of 26
Import the Micro850 Socket Project
In this section, we will be using the Micro850, 2080-LC50-24QBB FRN 9.011(or later.)
1. From the Desktop or Windows Start menu, launch Connected Components Workbench.
3. From the DesktopLab Files folder, select the Socket_Example_Programs_r9.ccwarc, and click Open.
14 of 26
Using Micro850 as TCP Server
With reference to the connection flow shown in Page 33, we need to identify the following to create a Socket instance
to listen to Clients connection request.
The TCP Port used for the socket connection. In the TCP_Server program, its used variable LocalTCPPort
NOTE: Please refer to the Ethernet Station Chart at your lab station for IP Address assignments for
your station.
1. To download the program to the Micro850 controller, right-click on the Micro850* heading in the Project
Organizer and select Download.
2. Select the controller from the Connection Browser window, and click OK.
15 of 26
3. The following window will appear, select Download to continue.
When completed, the Output window will show the following status.
5. Start the EWEB Socket Test Application, from All ProgramsEWEB Sockets Test.
16 of 26
6. Next, click on Ping, to test the connection between the Micro850 and computer. Make sure the Ping Successful
status appears as shown.
7. Next double click on the TCP_Server program at the Project Organizer. Right-click on the ServerEnable contact
on the first rung of the program.
8. Select Variable Monitoring, and check the Logical Value box for the ServerEnable bit.
17 of 26
9. Then, right-click on the ServerEnable variable and select Add to Spy List.
At the RA_TCP_SOCKET_INFO_1.TCPState, Listen indicates the Server is waiting for the Client to connect.
11. Right-click on the RA_TCP_SOCKET_INFO_1.TCPState and select Add to Spy List.
12. Close the Variable Monitoring window and open the Spy List from DeviceSpy ListsSpy List Name[1].
18 of 26
13. At the Spy List, you can monitor the two variables added.
14. As the Micro850 Server is waiting for a client connection, at the EWEB Socket Test, click on TCP Client.
15. On the Variable Monitor, the RA_TCP_SOCKET_INFO_1.TCPState variable has changed from Listen to
Established. Now the Client can send data to Micro 850.
16. Enter 1234567890 at the Data to Send field, and click on Send.
19 of 26
17. The Micro850 program is in Run mode, so the data received will be sent out to the Client. Therefore the EWEB
Sockets Test Application received the same data.
The reading of data and writing of data is done using the SOCKET_READ and SOCKET_WRITE.
18. Next, click on Close at the EWEB Sockets Test Application to close the connection.
20. On the falling edge of the ServerEnable bit, the SOCKET_CLOSE instruction closes the connection.
21. You have completed the TCP Server Lab. (Stay Connected, with the EWEB Socket Test Application running.)
20 of 26
Using Micro850 as TCP Client
With reference to the connection flow shown on Page 24, we need to identify the following to create a Socket
instance to connect to a Server.
The TCP Port used for the socket connection in the Server. In the TCP_Client program, the variable
DestTCPPort is used to define the Servers TCP Port.
NOTE: Please refer to the Ethernet Station Chart at your lab station for IP Address assignments
for your station.
21 of 26
2. At the DestIPAddress, enter the IP Address of the Server at the Logical Value. (For Example: 192.168.1.254)
3. At the EWEB Socket Test Application, click on TCP Server. (Now the application is acting as a Server.)
4. The Event Log of EWEB Socket Test Application will show that the Listen Connection Started.
6. Select Variable Monitoring, and check box the Logical Value of the ClientEnable Bit.
22 of 26
7. As soon as the connection is accepted, the data Hello World! will be sent to the Server.
8. You can modify the string at the WriteString[1], which will change the initial message to the server.
9. Now enter the 0123456789 at the Data to Send field of the Server,
23 of 26