How Do I Create a Networked Process Using the Built-in Networking Features of Lookout 4.01?
Primary Software: Lookout
Primary Software Version: 4.0.1
Primary Software Fixed Version: N/A
Secondary Software:
Problem: The model Lookout uses is a client and server process. How can I create a sample process?
Solution: When creating a Lookout network process, you will want to create two process files: a Server Process and a Client Process.
The Server Process runs on a specific machine that generally has I/O hardware attached, such as Fieldpoint Distributed I/O modules, or a Programmable Logic Controler (PLC) that controls an industrial process. The Lookout server version will need both a Lookout license and one Concurrent Client License (part #778102-01) for each client that connects to the server at the same time.
The Client Process is designed so that it can be run on any machine that can communicate through the network to the Server Process. The Server Process and the Client Process are designed to work together, but they do NOT use the same process file!
Note: The Client Process should be written without any driver objects, so that it can be run on a client version of Lookout, which does not require a license. You only need one Concurrent Client License for each Client Process that accesses the Server Process at the same time. Thus, you could have 100 clients installed, but if only one would be talking to the server at a time, you would only require a single Concurrent Client License on the server. For more information about the different versions of Lookout see KB 1UE69ARM (linked below).
In the simplest case, the Server Process would consist of a single driver object, such as the Fieldpoint object. The Client Process would consist of expressions to display output from the Server Process and controls to send input values to the Server Process. The Simple_Server process consists of a single pot object that will be controlled from the Client Process, which can be running on the same machine or another machine networked to the server.
To Create the Simple_Server Process in Lookout:- Select File » New to bring up a Create Process dialog.
- Type Simple_Server for the process name, and click OK.
- You will now get a new control panel dialog. Click OK.
- Select Object » Create to select the object class. In the Control folder select Pot and click OK.
- You will now be asked which process to place the new object, click on Simple_Server and click OK.
- Click OK to accept the default pot parameters.
- A dialog will appear with the different pot display types. Select the vertical slider and press OK.
- Select File » Save and accept "Simple_Server.l4p" as the default name.
If you want the server to run on a different machine, then copy the Server Process to the server machine and load the process on the server machine. (Note that for testing purposes you can have the server running on the same machine as the client.)
To Create the Simple_Client Process in Lookout:- Select File » New to bring up a Create Process dialog.
- Type Simple_Client for the process name, click OK.
- You will now get a new control panel dialog, click OK.
Note: Before creating a Pot that will reference our server, we need to make the server visible on the client machine. Select Object » Object Explorer from the menu. Make sure you have "Universe" selected in the drop down list box. After that you will have a "Network" entry in the explorer available. Right-click on the Network and select Register Computer. A Network Browser should appear. Select the server computer and click OK. This will make the server visible. You can skip this step, if you are developing your client on the server machine.
- Select Object » Create to select the object class. In the Control folder select Pot and click OK.
- You will now be asked in which process to place the new object. Click on Simple_Client and click OK.
- Under the Position Source heading, click on the Remote radio button, and then right-click on the green URL field.
- The URL Editor will appear (see the attached image, below). Select "Absolute" in the Path Mode box.
Note: An Absolute path will contain the name of the server, which allows you to run the client on different machines, but still connects to the same server. If you change the server name, then you MUST change the clients to reflect the new server!
- If the Lookout server machine is running the Server Process, then you can click on the Network tab, then select the server machine, select the process, select the object, and select the item that you want to remotely control with your pot. You can double-click on the item to paste into the URL, or click on the paste button. The basic URL will have this form:
\\<machine name>\<Process name>\<Object name>.<member name>
For example:\\rickety21\Simple_Server\Pot1.value
- Click OK to accept the URL Edit, and click OK again to accept the pot parameters.
- A dialog will appear with the different pot display types. Select the vertical slider and press OK.
- Select File » Save and accept the "Simple_Client.l4p" as the default name.
Note: If you want to create a read-only display, then you can Insert » Expression, select Absolute path mode, then Browse under the Network tab to the server machine, process, object, and item. You can double-click on the item to paste into the expression or click on the paste button. Hit OK to create the expression. You will then get a dialog box to select the display type for the expression, click OK to accept the default.
You now have a server and client process! Changing the pot on the client will change the server pot and vice versa, the expression is unidirectional (it only displays the value of the pot on the server).
Attached below is a bitmap showing the URL Editor in the client.
Note: This example does not use Symbolic Links. Such a client design has one disadvantage. The name of the server that you are referencing from the pot and expression is hardcoded. Whenever you change the server location, you must open each object and modify the name for the new location. You can use a symbolic link to avoid this situation. The pot and expression will reference the symbolic link, rather than the computer directly. The link points to the server, it is the only place where the server name is hardcoded. Please refer to the Online Help for Lookout for more information about symbolic links.
Related Links: KnowledgeBase 1UE69ARM: What Is the Difference between Lookout Client, Server, and Runtime Copies?
Attachments:
Report Date: 03/22/2000
Last Updated: 03/05/2002
Document ID: 1VLDM2M6