SMC Networks 1560 user manual 40050, 40060, 00020

Page 21

Chapter 4 — Programming Considerations

Modicon Programming Example - MSTR Type 2

enable -

 

- active

Contents of registers in the control block

 

40050

40050

= 2

Read Instruction

 

 

abort -

 

- error

40051

= 0

Error Code

 

40060

40052 = 13 Length of the read

 

 

40053

= 21 slave register to read (40021)

 

 

- success

40054

= 37 Node address to retrieve data from

 

 

 

MSTR

40055 = 1

Slave Input Path for routing

 

 

40060-40092 = data returned from the 1560-

 

00020

 

 

 

MBP

 

 

 

 

 

 

 

 

 

 

 

 

 

The MSTR instruction shown above reads the status registers (40021- 40033) from the 1560-MBP at Node Address 6, and stores the values in the processor starting at register 40060. Note that the instruction reserves 20 words for the data block, but we have chosen to only fill 13 when configuring the command.

Note that the Slave Input Path value must be entered in order for the command to execute successfully. Valid values are from 1 to 8. Any other values will cause the command to fail

21

Image 21
Contents 1560 Table of Contents Please Read This Notice Step-by-Step Quick Start GuideRevisions Modbus Plus Specifications Product SpecificationsGeneral Specifications Configuration via dip switches Slave Address Host Address24 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 Loss Function Description Details Fault onModbus PlusSwitch SW 2 cont’d Contents Programming Considerations Writing to the 1560-MBP Global Data Enabled Mstr Type1560-MBP Global Data Abort Error 40410 Enable 40400 ActiveModicon Programming Example Mstr SuccessHost Issued Write Commands Mstr Type Reading from the 1560-MBP Global Data Mstr TypeModicon Programming Example Mstr Type Enable 40500 Active Host Issued Read Commands Mstr Type40510 0001040050 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 Appendix C Hardware ConfigurationSingle Drive Peer Cop Application Example OverviewConfiguration Extension Blocks Switch Position DescriptionPLC REF Drive Status Ladder Logic Programming RefOffset DescriptionPLC Ref PLC Name Description Timing Special Precautions and hintsHints AddressingMounting and SCANport Cabling Instructions Appendix DMounting Instructions 70mmCable Requirements SCANport Datalink Operation Appendix ERepair and Warranty Service and RepairGeneral Warranty Policy Limitation of Liability Hardware Product Warranty DetailsContents