SMC Networks 1560 user manual Programming Considerations

Page 15

Chapter 4 — Programming Considerations

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.1Writing 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.

15

Image 15
Contents 1560 Table of Contents Please Read This Notice Step-by-Step Quick Start GuideRevisions Configuration via dip switches Slave Address Host Address Product SpecificationsModbus Plus Specifications General Specifications24 VDC Operating Temp To 50 C Storage Temp 40 to 85 C Supported Mstr Programming Commands Modbus Plus Port FunctionalityModbus Plus Communications Modbus Register Map Mstr Type 5 Write Global DataMBP Modbus Address Space Hardware Setup 1560-MBP Card Setup Connecting Power to the 1560-MBP CardDip Switch Configuration Switch SW Plus Function Description Details Fault onLoss ModbusSwitch SW 2 cont’d Contents Programming Considerations Writing to the 1560-MBP Global Data Enabled Mstr Type1560-MBP Global Data Success Enable 40400 ActiveAbort Error 40410 Modicon Programming Example MstrHost Issued Write Commands Mstr Type Reading from the 1560-MBP Global Data Mstr TypeModicon Programming Example Mstr Type 00010 Host Issued Read Commands Mstr TypeEnable 40500 Active 4051040050 4006000020 Modbus Name Values Description Address MBP Status Registers 40021 toBatch At this time Troubleshooting LED Troubleshooting TableLED Locations SCANport Mbpstat Diagnostics TxRxD+ Cable DiagramTechnical Support Contacts Technical SupportAppendix a MBP Modbus Register MapMBP Modbus Device Specific Hints Appendix BSetting up the Adaptor I/O Data Logic Control Word Bit Function DescriptionDrive Status Word Bit Function Description Overview Hardware ConfigurationAppendix C Single Drive Peer Cop Application ExampleConfiguration Extension Blocks Switch Position DescriptionPLC REF Drive Status Ladder Logic Programming RefOffset DescriptionPLC Ref PLC Name Description Timing Special Precautions and hintsHints Addressing70mm Appendix DMounting and SCANport Cabling Instructions Mounting InstructionsCable Requirements SCANport Datalink Operation Appendix ERepair and Warranty Service and RepairGeneral Warranty Policy Limitation of Liability Hardware Product Warranty DetailsContents