User manual
Transferring Data Using Communication Blocks
136
33002479 06 07/2008
CWRITE_REG
Block Function
Mode
Although a large number of CWRITE_REG function blocks can be programmed,
only sixteen write operations may be active at the same time. It makes no difference
whether these operations are performed using this function block or others (for
example, MBP_MSTR, MSTR, WRITE_REG). All function blocks use one data
transaction path and require multiple cycles to complete a job.
If several CWRITE_REG function blocks are used within an application, they must
at least differ in the values of their NO_REG or REG_WRITE parameters.
The entire routing information is contained in data structure WordArr5 of input
AddrFld. The type of function block connected to this input and thus the contents of
the data structure depend on the network used.
Please use:
z TCP/IP Ethernet: the function block TCP_IP_ADDR
SLAVEREG SLAVEREG is the start of the area in the addressed slave to which the source data
are written. The destination area always resides within the %MW word (4x register)
area. SLAVEREG expects the destination address as offset within that area. In 4x
registers, the leading 4 must be omitted. For example, 59 (contents of the variables
or value of the literal) = 40059.
The parameter can be specified as direct address, located variable, unlocated
variable, or literal.
Note: A TCP/IP communication between a Quantum PLC (NOE 771xx) and a
Momentum PLC (all TCP/IP CPUs and all TCP/IP I/O modules) is only possible,
when only one read or write job is carried out in every cycle. If several jobs are sent
per PLC cycle, the communication stops without generating an error message in
the status register of the function block.
Note: For experts: The WordArr5 data structure can also be used with constants.
Note: This function block puts a heavy load on the network. The network load must
therefore be carefully monitored. If the network load is too high, the program logic
should be reorganized to work with the WRITE_REG function block, which is a
variant of this function block that does not operate in continuous mode but is
command driven.