Programming considerationations, Writing to the 1560-mbp, Global data enabled - mstr type 5 – SMC Networks ProSoft 1560 User Manual

Page 15: 4programming considerations

Advertising
background image

15

Contents

4

Programming Considerations

Transferring data to/from the 1560-MBP is performed either
using the standard MSTR instruction, or using the Peer Cop
functionality available in some Schneider processors. (Note that
Peer Cop functionality is somewhat limited. See Appendix C.)
Specifically, the following functionality is supported:

MSTR Type 1 - Write data
MSTR Type 2 - Read data
MSTR Type 5 - Write Global Data
MSTR Type 6 - Get Global Data

The following sections will detail the programming requirements
for each of these commands, as well as discuss speed trade-
offs between the different commands. An application note
detailing the configuration of a Peer Cop solution is also
available in Appendix C.

4.1

Writing to the 1560-MBP

4.1.1 Global Data Enabled - MSTR Type 5

If Global Data Control Mode is enabled, the 1560-MBP will look
to the Host’s Global Data space for the Control and Reference
values. All other values must be written by the host using the
MSTR Type 1 instruction in the PLC.

The location of the Control and Reference values in the Global
Data is determined by the 1560-MBP Modbus Plus address.
The 1560-MBP uses the following algorithm to obtain the values:

If Modbus Plus Address < 17

Global Table Index = ( Modbus Plus Address - 1 ) * 2

else if Modbus Plus Address < 33

Global Table Index = ( Modbus Plus Address - 17 ) * 2

else if Modbus Plus Address < 49

Global Table Index = ( Modbus Plus Address - 33 ) * 2

else if Modbus Plus Address < 65

Global Table Index = ( Modbus Plus Address - 49 ) * 2

Note

The Global Data Table has a limit of 32 words,

therefore there can only be 16 1560-MBP

units with Global Control Enabled on one

Host processor. Care must be exercised that

all 16 Global Control Enabled 1560-MBP

devices are in the same block of addresses.

Chapter 4 — Programming Considerations

Advertising