You are on page 1of 9

V1000_Control_FreeRW xxx

Modbus Communication to V1000 inverters: V1000_Control_FreeRW Prepare data for parameter backup/restore: V1000_ParameterRW Prepare data for normal run: V1000_Run

Basic functionReads from and writes to registers in V1000 inverters, for backup and restore of parameters and control at normal run. The control of Modbus to V1000 consists of 3 FBs. Functions - 1x V1000_Control_FreeRW to manage the Modbus protocol. - 1x V1000_Run for each inverter, for handling data during normal running - 1x V1000_ParameterRW for handling data for 1 inverter at the time during backup or restore. The use of many parameters in and out of FBs will take both extra UM and increase the cycle time considerable, so common areas are used, with a simple pointervalue: - At all FBs you point at the beginning of a common area of 132 words in the CIO area, in which data is exchanged (&3000 in the example points at CIO 3000 to 3131). This value has to be the same at all FBs. - At V1000_Run you also point at an area of 10 words in the CIO area to be used in your PLC program. Use the Excel document Adr for V1000_Control.xls to generate symbols for you. (&100 in the example points at CIO 100 to 109). - At V1000_ParameterRW you point at an area for saving parameters for the inverters. This area is placed in the DM area, and the size is 2 words for each register address. You have to put in the wanted register numbers in every second word, starting with the first address. (Address &10000 and &10 registers in the example points at D10000 to D10019 with userdefined registers in D10000, D10002, D10004 D10018). Symbols

Page 1 of 9

V1000_Control_FreeRW

Page 2 of 9

V1000_Control_FreeRW V1000_Control_FreeRW.cxf V1000_ParameterRW.cxf V1000_Run.cxf Shared resources: FB precautions Com port with Aux. flags and values IR0 and IR1 Every port can only be used to one command at the time. High as long as communication is wanted EN input condition Application Program for backup and restore of 10 parameters and enable of run commands in a V1000 inverter at CJ1M-CPU13 V3 build in RS232 port. example Inverter is node 24 File names Inverter settings: b1-01 = 2: Frequency Ref. Selection = serial com. b1-02 = 2: Run command selection = serial com. H5-01 = 18h: Node number H5-02 = 8: RS422/485 baud rate = 115200 bps H5-03 = 1: Even parity H5-04 = 0: Ramp to stop at com. error H5-05 = 1: Com fault detection Enabled H5-06 = 5: 5ms wait time from receive to send H5-07 = 0: RTS control OFF

Hardware connection: CJ1W-CIF11 at CJ1M-CPU13 V3 build in RS232 port Pin settings: 1 = ON 2 6 = OFF

Wire: PLC RDARDB+ SDASDB+

to to to to

V1000 SS+ RR+

V1000: = Terminator ON at last node (little switch above com. terminals)

Page 3 of 9

V1000_Control_FreeRW PLC settings:

*** FB for moving values between control/status area for one inverter to the Modbus area. In this case the Modbus area is CIO 3000 3131 and node 24 control/status area is CIO 100 109. Use one V1000_Run FB for each inverter.

EN has to be true as long as the inverter has to be controlled.

First of 132 word addresses in the CIO area. Same area for the control FB. First of 10 word addresses in the CIO area. Unik for each V1000_Run FB. These adr. are used in the program for control and status.

Page 4 of 9

V1000_Control_FreeRW The following symbols for the control/status area can be generated in Adr for
V1000_Control.xls MB_Motor07_StatusRunning MB_Motor07_StatusRevers MB_Motor07_StatusReady MB_Motor07_StatusFault MB_Motor07_CommandForward MB_Motor07_CommandRevers MB_Motor07_CommandFault MB_Motor07_CommandReset MB_Motor07_CommandInput3 MB_Motor07_CommandInput4 MB_Motor07_SpeedRef MB_Motor07_Command MB_Motor07_WriteAnyRegisterNo MB_Motor07_WriteAnyRegisterData MB_Motor07_ENTER MB_Motor07_ActualSpeed MB_Motor07_ActualCurrent MB_Motor07_Status MB_Motor07_ReadAnyRegisterNo MB_Motor07_ReadAnyRegisterData BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL UINT WORD WORD UINT WORD UINT UINT UINT WORD UINT 107.0 107.1 107.2 107.3 101.0 101.1 101.2 101.3 101.6 101.7 100 101 102 103 104 105 106 107 108 109 Read - 1 = Running inverter node 24 Read - 1 = Running revers inverter node 24 Read - 1 = Ready inverter node 24 Read - 1 = Fault inverter node 24 Write - 1 = Running forward inverter node 24 Write - 1 = Running revers inverter node 24 Write - 1 = Fault (EF0) inverter node 24 Write - 1 = Reset inverter node 24 Write - 1 = Set input 3 inverter node 24 Write - 1 = Set input 4 inverter node 24 Write - Frequency reference inverter node 24 Write - Command bits inverter node 24 Write - Register to write to inverter node 24 Write - Data to write into register inverter node 24 Write - Data is saved in inverter node 24 MAX 100.000 TIMES!! Read - Actual speed inverter node 24 Read - Actual current inverter node 24 Read - Status bits inverter node 24 Write - Register to read from in inverter node 24 Read - Data from register in inverter node 24

*** FB for moving values between backup area for one inverter to the Modbus area. In this case the Modbus area is CIO 3000 3131 and node 24 backup area is D10000 10019. D10000 = register no. a D10001 = data a D10002 = register no. b D10003 = data b D10004 = register no. c D10005 = data c D10006 = register no. d D10007 = data d D10016 = register no. i D10017 = data j D10018 = register no. j D10019 = data j All register numbers has to be put in manually. The data can be put in manually or by reading from the V1000. If a register no. is 0, the FB will go to the next register.

Page 5 of 9

V1000_Control_FreeRW

EN has to be true as long as the inverter has to be controlled. First of 132 word addresses in the CIO area. Same area for the control FB. First word addresses in the DM area. Unique for each V1000 FB. Activate Read or Write to backup or restore parameters. Keep true until FB finished. The wanted no. of registers to backup/restore. The register being read/written right now. 0 = inactive

*** FB for controlling the Modbus communication to 1 32 V1000 inverters. In this case the Modbus area is CIO 3000 3131. For each of the 32 inverters, this area contains one register number to write to, and one register number to read from, and the belonging data. If a register no. is 0, the control goes to the next register. There can be 0 32 FB instances for Run and Parameters for moving data into the Modbus area, but only one control instance for Modbus com. First adr. for node 24 is 3000 + (24 x 4) = CIO 3096. CIO 3000 = Reserved for future use. CIO 3001 = Reserved for future use. CIO 3002 = Reserved for future use. CIO 3003 = Reserved for future use.

Page 6 of 9

V1000_Control_FreeRW CIO 3004 = Inverter node 01 Write register no. CIO 3005 = Inverter node 01 Write data value. CIO 3006 = Inverter node 01 Read register no. CIO 3007 = Inverter node 01 Read data value. CIO 3008 = Inverter node 02 Write register no. CIO 3009 = Inverter node 02 Write data value. CIO 3010 = Inverter node 02 Read register no. CIO 3011 = Inverter node 02 Read data value. .. .. CIO 3124 = Inverter node 31 Write register no. CIO 3125 = Inverter node 31 Write data value. CIO 3126 = Inverter node 31 Read register no. CIO 3127 = Inverter node 31 Read data value. CIO 3128 = Inverter node 32 Write register no. CIO 3129 = Inverter node 32 Write data value. CIO 3130 = Inverter node 32 Read register no. CIO 3131 = Inverter node 32 Read data value. EN has to be true as long as the inverters has to be controlled.

First of 132 word addresses in the CIO area.

&0 = RS232 port at CJ1

Cycle time for writing and reading once for each inverter.

Related manuals

OYMC TOEP C71060622-01-OY V1000 User Manual SIEP C710606 10A Programming manual

Page 7 of 9

V1000_Control_FreeRW

Variable Tables V1000_Control_FreeRW


Name
EN First DataArea Adress Port no.

Input Variables Variable name


EN FirstDataAreaAdress Port

Data type
BOOL UDINT UINT

Range Description
1 (ON): FB started. 0 (OFF): FB not started. First adr. to be used in the CIO area. Occupy 132 words. See manual W393 for available areas. 0 = Build in RS232 at CJ / CS series 1 = CP1 port 1 or CS SCB port 1 2 = CP1 port 2 or CS SCB port 2

0, 1, 2

Output Variables Name Variable name


ENO Cycle time ENO CycleTime

Data type
BOOL UINT

Range

Description
1 (ON): FB processed normally 0 (OFF): FB not processed Time to write one and read one register to all inverters. Unit is 0.1 mSec.

Variable Tables V1000_ParameterRW


Name
EN

Input Variables Variable name


EN

Data type
BOOL

Range

Description
1 (ON): FB started. 0 (OFF): FB not started. The node number of the V1000 H5-01 First adr. to be used in the CIO area. Occupy 132 words. Same as FirstDataAreaAdress at V1000_Control_FreeRW. See manual W393 for available areas. First adr. to be used in the DM area. Size in words is 2 x NoOfDataRegisters. High to activate a backup. Keep true until backup is finished. High to activate a restore. Keep true until restore is finished. The number of registers in the backup area.

Inverter node number InverterNodeNo UINT First DataArea FirstDataAreaAdressModbus_CIO UINT Adress for Modbus

1 - 32

First DataArea Adress for inverter Read parameters for backup from V1000 Write parameters in V1000 Number of data registers to be read/written

FirstDataAreaAdressV1000_DM Read Write NoOfDataRegisters

UINT BOOL BOOL UINT

Name
ENO Register number

Output Variables Variable name


ENO RegisterNo

Data type
BOOL WORD

Range

Description
1 (ON): FB processed normally 0 (OFF): FB not processed The register number being read/written right now. 0 = finished/inactive

Page 8 of 9

V1000_Control_FreeRW

Variable Tables V1000_Run


Name
EN

Input Variables Variable name


EN

Data type
BOOL

Range

Description
1 (ON): FB started. 0 (OFF): FB not started. The node number of the V1000 H5-01 First adr. to be used in the CIO area. Occupy 132 words. Same as FirstDataAreaAdress at V1000_Control_FreeRW. See manual W393 for available areas. First adr. to be used in the CIO area. Occupy 10 words. Use Adr for V1000_Control.xls to make symbols to be used in program. . See manual W393 for available areas.

Inverter node number InverterNodeNo UINT First DataArea FirstDataAreaAdressModbus_CIO UINT Adress for Modbus

1 - 32

First DataArea Adress for inverter

FirstDataAreaAdressV1000_CIO

UINT

Output Variables Name Variable name


ENO ENO

Data type
BOOL

Range

Description
1 (ON): FB processed normally 0 (OFF): FB not processed

Page 9 of 9

You might also like