SMC Networks 1560 user manual 40050, 40060, 00020

Models: 1560

1 44
Download 44 pages 55.53 Kb
Page 21
Image 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

Page 21
Image 21
SMC Networks 1560 user manual 40050, 40060, 00020