Read and write service on local segment. Schneider Electric PL7 Micro/Junior/Pro - Communication applications, volume 2
Advertentie
Advertentie
Modbus Plus programming
Read and write service on local segment
Introduction A TSX Micro or Premium PLC can exchange data with stations connected to the local Modbus Plus network.
Data exchanges The functions READ_VAR and WRITE_VAR are used to access remote stations on the same local segment, bits, internal words or input and output words in read / write mode.
These exchanges are explicit exchanges managed by the application.
The addressing from a TSX Premium station will be for example: l in read mode l
READ_VAR (ADR#0.1.10, '%MW', 10, 20, %MW10:20, %MW100:4) in write mode
WRITE_VAR (ADR#0.1.10, '%MW', 10, 20, %MW10:20, %MW100:4)
The following table describes the different parameters of the function:
Parameter
ADR#0.1.10
'%MW'
10
20
%MW10:20
%MW100:4
Description
Address of destination device for the message: l l l processor slot: 0 or 1
PCMCIA channel: 1 destination station number: 10
Type of object to be read or written, for example: internal words
Address of first word to be read or written
Number of words to be read or written
For reading: content of response
For writing: value of words to be written
Activity bit, exchange report, length
204
TLX DS COM PL7 xxE
Modbus Plus programming
Correspondence of object type
The tables describe the correspondence of object types between the TSX Premium and TSX Quantum PLCs.
The TSX Premium PLC is the sender of the request and the TSX Quantum PLC replies:
Type of PL7 object Responding Quantum object READ_VAR or WRITE_VAR function
'%MW'
'%M'
'%IW'
'%I' internal words internal bits input words input bits
4x... memory area
0x... memory area
3x... memory area
1x... memory area
The TSX Quantum PLC is the sender via an MSTR function block and the TSX
Premium PLC replies:
MSTR function block
READ
WRITE
Responding Premium object
%MW
%MW
Example
1
The TSX Premium PLC application writes 10 internal words in the TSX Quantum
PLC at address 2 and reads 5 input words in the TSX Quantum PLC at address 5:
2 5
Quantum
WRITE_VAR(ADR#0.1.2, ‘%MW’, 10, 5, %MW100:5, %MW200:4)
READ_VAR(ADR#0.1.5, ‘%IW’, 5, 8, %MW100:5, %MW200:4)
The internal words to be written in station 2 are at address 10.
The internal words to be read in station 5 are at address 5.
Quantum
TLX DS COM PL7 xxE
205
Downloaden
Advertentie