Pass-Through Function Chapter 29 Pass-through Function... 2 29.1 Ethernet Mode... 3 29.1.1 How to install virtual serial port driver... 3 29.1.2 How to Change the Virtual Serial Port... 4 29.1.3 How to Use Ethernet Mode... 5 29.2 COM Port Mode... 7 29.2.1 Settings of COM Port Mode... 7 29.2.2 HMI Work Mode... 9 29.3 Using System Registers to Enable Pass-Through... 10 1
Chapter 29 Pass-through Function The Pass-through function allows the PC applications to control PLC via HMI. In this case the HMI is a converter. The Pass-through function provides two modes: [Ethernet] and [COM port]. Click [Pass-through] button in Project Manager to open the setting dialog. 2
29.1 Ethernet Mode 29.1.1 How to install virtual serial port driver Before using [Ethernet] mode, please check if Weintek virtual serial port driver is installed as shown below: Open Project Manager to check if the driver is installed. If it shows [Please install weintek virtual serial port driver], please click [Install]. If the dialog below shows up during installation, please click [Continue Anyway]. 3
When finished, the [Virtual COM Port (PC <-> PLC)] field displays the virtual COM port used. In this example the virtual comport used is COM 4. This driver is not supported under Windows 7 64 Bit operation system. 29.1.2 How to Change the Virtual Serial Port Open [Device Manager] to check the installed [Virtual Serial Port]. To change the number of virtual serial port, please click [Virtual Serial Port] to open [Port Settings]» [Advanced] as follows: 4
29.1.3 How to Use Ethernet Mode After installing virtual serial port driver, please follow the steps below to use Ethernet mode of pass-through function. Step 1 Set the IP address of the HMI connected with PLC. Step 2 Set the communication port and the serial port that connects HMI with PLC. Step 3 Click [Apply], to update the settings. Step 4 When running PC application, set COM port to the used virtual serial port. For example, in Mitsubishi application, if the virtual serial port is COM 3, please set [PC side I/F Serial setting]» [COM port] to COM 3, as follows: 5
When finished, to execute PLC application on PC, HMI will be switched automatically to Pass-through mode. The PLC is controlled via the virtual serial port by PC as shown below. Pass-through mode will be turned off if the application ends. When select Ethernet under Pass-through mode, the communication between HMI and PLC can continue without stop, but not all drivers support this. System register [LW-9903: pass-through control (0 : normal, 1 : pause, 2 : stop communications between HMI and PLC when executing pass-through)] controls the communication status under Ethernet Pass-through mode. 6
29.2 COM Port Mode [Source COM Port] The port connects HMI with PC. [Destination COM Port] The port connects HMI with PLC. To use [COM port] mode of Pass-through, please set the properties of Source COM Port and Destination COM Port correctly. 29.2.1 Settings of COM Port Mode There are two ways to enable [COM port] mode of Pass-through function. (1) Project Manager. (2) Use system registers. LW-9901: pass-through source COM port (1 ~ 3: COM 1 ~ COM 3) LW-9902: pass-through destination COM port (1 ~ 3: COM 1 ~ COM 3) Start Pass-through Com Port Function in Project Manager Click [Pass-through] button in Utility Manager / Project Manager to set the communication parameters as shown below: 7
[HMI IP] Assign HMI IP address. [Get HMI Communication Parameters] Read the settings of Source and Destination COM port. Click [Get HMI Communication Parameters] to update the communication parameters. [Source COM Port] [Destination COM Port] The communication parameters of Source and Destination COM Port are displayed. The settings will be used when [Start Pass-through] is clicked. [Baud rate], [Data bits], [Parity], and [Stop bits] of Source and Destination COM Port should be set to the same. [Source COM Port] connects PC, so select RS-232 mode in most situations; [Destination COM Port] connects PLC, so the setting depends on the PLC type, RS-232, RS-485 2W, or RS-485 4W. 8
When finish using pass-through (COM port) function, click [Stop Pass-through] to stop it. HMI will then restart to communicate with PLC. 29.2.2 HMI Work Mode There are three work modes of HMI: Mode Description Unknown Before reading the settings of HMI, the work mode is Unknown. Normal After reading the settings of HMI, if the work mode is Normal the HMI does not accept any data form the Source COM Port. Pass-through If the work mode is Pass-through, the PC connected via Source COM Port can control the PLC connected via Destination COM Port. 9
29.3 Using System Registers to Enable Pass-Through Another way to enable Pass-through is to use the system registers. When the values of LW-9901 (Source COM Port) and LW-9902 (Destination COM Port) match the conditions below, HMI will start Pass-through automatically: a. The values of LW-9901 and LW-9902 must be 1 ~ 3 (1 ~ 3: COM 1 ~ COM 3). b. The values of LW-9901 and LW-9902 must be different. To change the communication parameters, just change the value in the related registers and set ON [LB-9030: update COM 1 communication parameters], [LB-9031: update COM 2 communication parameters] and [LB-9032: update COM 3 communication parameters]. HMI will be forced to update the settings. Address Description LB-9030 LB-9031 LB-9032 update COM 1 communication parameters (set ON) update COM 2 communication parameters (set ON) update COM 3 communication parameters (set ON) LW-9550 (16bit) : COM 1 mode(0:rs232,1:rs485 2W,2:RS485 4W) LW-9551 LW-9552 LW-9553 LW-9554 (16bit) : COM 1 baud rate(7:1200,8:2400,0:4800,1:9600,2:19200,3: 38400,4:57600,..) (16bit) : COM 1 databits (7 : 7 bits, 8 : 8 bits) (16bit) : COM 1 parity (0:none, 1:even, 2:odd, 3:mark, 4:space) (16bit) : COM 1 stop bits (1 : 1 bit, 2 : 2 bits) LW-9555 (16bit) : COM 2 mode(0:rs232,1:rs485 2W,2:RS485 4W) LW-9556 LW-9557 LW-9558 LW-9559 (16bit) : COM 2 baud rate(7:1200,8:2400,0:4800,1:9600,2:19200,3: 38400,4:57600,..) (16bit) : COM 2 databits (7 : 7 bits, 8 : 8 bits) (16bit) : COM 2 parity (0:none, 1:even, 2:odd, 3:mark, 4:space) (16bit) : COM 2 stop bits (1 : 1 bit, 2 : 2 bits) LW-9560 (16bit) : COM 3 mode(0:rs232,1:rs485 2W) LW-9561 (16bit) : COM 3 baud rate(7:1200,8:2400,0:4800,1:9600,2:19200,3: 38400,4:57600,..) 10
LW-9562 LW-9563 LW-9564 (16bit) : COM 3 databits (7 : 7 bits, 8 : 8 bits) (16bit) : COM 3 parity (0:none, 1:even, 2:odd, 3:mark, 4:space) (16bit) : COM 3 stop bits (1 : 1 bit, 2 : 2 bits) To stop Pass-through, change the values of LW-9901 and LW-9902 to 0. 11