Getting Started With CX-Server Lite

Introduction
This information is intended only as a supplement to the original product user manuals. Therefore, use it to familiarise yourself with the product and not as a guide to the complete installation.
 
Product Information
CX-Server Lite is a set of ActiveX components that are used as a link between programs on your PC like Excel and Visual Basic, and Omron PLCs using FINS.
 

Changing the PLC

 

 

 

Create a new program in CX-Programmer. For the example call the PLC MiniPLC.

New project link file

 

  

Double-click New Project and create a link file to be connected to CX-Server Lite.

  

 

 

In Excel we link to this symbol file. In later versions make sure the "Developer" ribbon is enabled in File->Options. Make sure "Design Mode" is selected and select "Insert->ActiveX Controls->More Controls" (looks like spanner and screwdriver). From the "More Controls" dialog, select "OMRON CX Communications Control" and [OK].

In earlier versions add by pressing the ruler at the top left and add the CX-Server icon to the Excel sheet.

Right-click and select Properties Omron ... "Open" the file you just created. The Link is now made. Any changes you make in this common symbol file, will have consequences for the other program. Also note the control name "Comms1" which is to be used in the script.

New symbol

 

 

 

In CX-Programmer, create symbols as usual, but check the "Link" box, for the symbols that will be available in CX-Server Lite. These symbols must always be in the global symbol list.

Command button

 

 

 

In Excel you can now create a button to add a value from a DM. Note the ruler is chosen. This button can be compared with RUN and STOP in the PLC.
Double-click on the button to edit the macro.

Adding button

 

 

Enter the text as in the picture to the left. Cells (5.2) is Cell 5B. The value derived from DM0. You can also write your symbol name like "level" instead of "DM0"

Stop watch icon

 

 

If the cell to be updated regardless of the button, you can create a Timer object (stopwatch icon) from the toolbar. 

Adding stopwatch

 

 

Double-click the Timer to add you code to run regularly. 

Run the program again by clicking the ruler icon.

 

Defining Tags without using CX-Programmer

 If you do not have CX-Programmer you can define Tag in CX-Server Lite. Paste the CX-Server icon onto the worksheet. Right-click on the icon and select "Omron CX ... ...." 

The  "Properties" Property sheet appears, click 'New' to create your own. Replace *. CDM with a file name "CXServertest.cdm" and click save. Now select the "Edit Project".

Select the "Devices" and press "Add PLC". Add the name "TestCPU" and set up the necessary port parameters for the Pthe PLC you have connected to your PC.

 

 

 

 

 

The picture is after the PLC is defined. Next is Points or Tags. Select Points and press "Add Point".

Point editor

 

 

Select the "Physical" tab and select TestCPU. Type 000.00 and select Bit. Press OK. You have now created a tag called Bit that you can use in Excel.

Do the same again and set a Point called "Scantid" on the Data Location A264, (for CS1) with data type "Single Word Unsigned Binary". Use the arrow keys to navigate here.
 

 


 

 

Then close this file. Press OK and exit Property image. Ignore any error message.

 

  

Add a light and a 7-Segment display. Right-click and select Control Object ... .... Properties. Press Data Source and select the light and Scantid for display as menu Item. The rest will be completed. Press the ruler again to run.

Attached files display the finished solution.

 


Link:
http://www.myomron.com/index.php?action=kb&print=585



Comments  

Translate: