Introduction
This guide provides the basic overview of steps required to connect a CJ1 PLC to Citect® using serial communications and FinsGateway (FGW) drivers. FinsGateway is an OMRON product that is a middleware software. It has been superseded by Sysmac Gateway.
Hardware used in this process
CJ1M-CPU22 with built in RS-232C port connected to computer.
Software used is CX-Programmer, Citect® version 6 and FinsGateway 2003 although earlier versions of software behave the same.
Some basic knowledge of Citect® and Cx-Programmer are assumed for the scope of this document.
CX-Programmer PLC serial port setup
- Start Cx-Programmer and go online to the PLC using either the RS-232 or peripheral ports
- Once online, change the PLC mode to program mode and select Settings and then Options and
Transfer from PLC. Change Host Link Port settings to the baud rate and protocol you would like to
communicate with Citect – eg. Toolbus and 115,200 baud and then transfer these settings to the PLC
(Hint: in the options menu). Note that with CJ/CS we support baud rates up to 115,200 using either
Toolbus or Hostlink – both of which should work with Citect®. - Check also that PLC DIP switches for the port you are using are set to use communications parameters set
in the PLC setup eg. Make sure DIP switch 5 is OFF for RS-232 port connection. - If your comms settings have changed, you will lose your connection to the PLC. Test by selecting auto-online
again and make sure that your changes have worked before going offline again.
Configuring FINSGATEWAY (FGW)
- To setup the connection between PLC and computer using Cx-Programmer and Citect, you need to install
FinsGateway. This program is provided on the Citect Scada Complementary Software CD. It is possible not
to use FinsGateway and instead use Cx-Programmer with the serial driver and Citect with the Omfins driver
– the disadvantage of this is that Cx-P and Citect cannot both run at the same time unless FinsGateway is
used - To start FinsGateway, select Start, Programs, FinsGateway and then Service Manager. The service
manager program will load into the taskbar (yellow icon which looks like a PLC). Select this icon with
your right mouse button and select FinsGateway Settings - Under the Services folder, select SerialUnit and Start to start this service. Note than you can configure
Finsgateway to start automatically and at log in – in practice this is required but unlike some other
software – you are given the option.
- Select the Networks and Units folder and then under Units – select the COM port you are using and
then Properties.
Enter your settings similar to the following - NOTE: The Host Link and CompoWay/F unit number 0, which cannot be used in FinsGateway is preset to be
node address 240. - To test that FinsGateway is working, you can use the Fins Communication Test program to query the various
nodes. You will find this within FGW – in the Network menu or by identifying the icon.
We need to type in the network number, node number and unit number of the PLC or computer. Eg. N.n.u.
The PLC is 0.240.0 and the computer 0.31.0. Note that the unit number is always 0 as 0 is reserved for
accessing a CPU unit. - Now that FinsGateway is configured and before we start blaming Citect, we should test FGW in Cx-
Programmer first – by changing our PLC communications to FinsGateway. - You should now be connected to the PLC using FinsGateway rather than the normal Toolbus or
Sysmac Way (Hostlink) connections.
Citect Configuration
- Start Citect Exporer and then select the File menu and start a new project – similar to the following
- Select the Communications folder from the project list and then Express I/O Device Setup. First select Next
to start the wizard, then Next to create a new I/O server, then Next again to create a new I/O device, then
select External I/O Device and Next. Open the Drivers tab and select Omron then CS1 Series PLCs then
Serial (Sysmac Way protocol) as shown below. -
Enter the address as 0 and then select Next, Next then select your COM port and then Next again. Keep
selecting Next until the wizard is finished/complete. - Now need to setup each of the Citect project items as follows
- Boards Form
- Board Type = FINS
- Address = 0
- I/O Port - Leave blank
- Special Options - Leave blank
- Ports Form
- Port Number - Enter a unique number
- Baud Rate - Leave blank
- Data Bits - Leave blank
- Stop Bits- Leave blank
- Parity - Leave blank
- Special Options - Leave blank
- I/O Devices Form
- I/O Device Name - Enter a unique name (different to other IO device names with the same port name). This value could be blank if only one IO device exists.
- I/O Device Protocol - Enter FINS for C/CV-Series PLCs. Enter FINS3 for CS1-Series PLCs.
- I/O Device Address - The station address for a Omron CS Series PC is specified as follows: w/n/u where
- w is the FINS network address (1-127) If you are using a simple network ie. PC talking to PLC directly
then the network number will be =0 If you are using multiple layer of networked PLC's then the network
address will start at 1 from the top layer then 2 etc. - n is the FINS node number (1-126) . For serial comms, this should be set to 240.
- u is the Bus unit number of the CPU in the PLC. The PLC CPU Bus unit number is normally = 0
- w is the FINS network address (1-127) If you are using a simple network ie. PC talking to PLC directly
- Boards Form
- NOTE: The address is for the CPU unit NOT the Serial / CLK / ETN / SLK unit. You should have settings similar to the following
- Select Tags from the project list and then Variable Tags. Create example tags as follows
- Select Graphics from the project list and create a new page. Use normal setting. Select symbol set and then enter a couple of buttons as follows:
-
Save the Citect Graphics page and then compile and run the project. Using Cx-Programmer or a simple PLC
program, if you turn ON the input 2960.00, you should see the input lamp come ON. IF you turn ON the
output 2961.00, you will see the output lamp turn ON.