134
Epsilon EP-P Drive Reference Manual
www.controltechniques.com
Revision: A4
<Qty> = The number of slave values to be read.
<VarInstance> = The starting user variable instance number that the slave values will be written to. Decimal point of the user variable will
not be altered.
This a block transfer command that can load several holding or input registers into user variables.
The program will not proceed to the next instruction until either the data transfer is complete or an error has occurred.
All operands can be numbers or expressions.
Example:
' Read from slave 2 - 3 input registers (39980, 39981 and 39982)
' and stores the result in user variables var.var1, var.var2 and
' var.var3
Recover (2, 39980, 3, 1)
Example:
' Read from slave 1 - n(var.qty) registers starting at register
' var.from and store the results in n(var.qty) user variables
' starting at var instance var.to
var.from = 39980
var.qty = 3
var.to = 1
ReadVar (1, var.from, var.qty, var.to)
WriteBit
This instruction writes bit values (coil) to the slave from user bits.
WriteBit (<SlaveId>, <ModbusAddr>, <Qty>, <BitInstance>)
<SlaveID> = The instance number of a defined slave. See Network Modbus Master Slave tab.
<ModbusAddr> = The starting modbus address of the slave coil.
<Qty>= The number of coils to be written which equals the number of user bits
<BitInstance> = The starting user bit instance number that the coil values will be set to.
This is a block transfer command that can set several coil status bits from the User Bits.
The program will not proceed to the next instruction until either the data transfer is complete or an error has occurred.
All operands can be numbers or expressions.
Example:
' Write to slave 2 - 2 coils (23, and 24) the values set in
' in user bits bit.3, and bit.4
WriteBit (2, 23, 2, 3)
Example:
' Write to slave 1 - n(var.qty) coils starting at coil var.to
' the values stored in n(var.qty) user bits starting at
' bit instance var.from
var.to = 39980
var.qty = 3
var.from = 1
WriteBit (1, var.to, var.qty, var.from)
WriteVar
This instruction writes values (coils or holding registers) to the slave from user variables.
WriteVar (<SlaveId>, <ModbusAddr>, <Qty>, <VarInstance>)
<SlaveId> = The instance number of a defined slave. See Network Modbus Master Slave tab.
<ModbusAddr> = The starting modbus address of the slave holding register
Range
Description
00001 - 09999 one coil for each user bit
Range
Description
00001 - 09999
Each multiple of 16 coils are written from the lower 16 bits of user variable. <Qty> defines the
number of coils to write
40001 - 49999
16 bit writable slave data is loaded into the lower 16bits of a user variable
140001 - 149999
Two 16 bit writable slave registers are loaded into the lower 16bits of a user variable and the upper
16 bits of the user variable
400001 - 409999
Unidrive 32bit values: Two 16bit slave holding registers are written from the 32bit user variable with
word swap as specified by the slave configuration.
Summary of Contents for Epsilon EP-P
Page 2: ......
Page 124: ...110 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Page 200: ...186 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Page 218: ...204 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Page 238: ...224 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Page 244: ...230 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Page 247: ......