Convert Allen-Bradley-32768 to 65535 16 bit Number for SLC500

Convert Allen-Bradley
-32768 to 65535 16 bit Number
for SLC500
Application note
A201501, English
Version 1.0.0
2 • General
Copyright ã 2002 by WAGO Kontakttechnik GmbH
All rights reserved.
WAGO Kontakttechnik GmbH
Hansastraße 27
D-32423 Minden
Phone: +49 (0) 571/8 87 – 0
Fax:
+49 (0) 571/8 87 – 1 69
E-Mail: info@wago.com
Web:
http://www.wago.com
Technical Support
Phone: +49 (0) 571/8 87 – 5 55
Fax:
+49 (0) 571/8 87 – 85 55
E-Mail: support@wago.com
Every conceivable measure has been taken to ensure the correctness and completeness of this documentation. However, as errors can never be fully excluded we would appreciate any information or ideas at any time.
We wish to point out that the software and hardware terms as well as the
trademarks of companies used and/or mentioned in the present manual are
generally trademark or patent protected.
Application note
A201501
Table of Contents
•3
TABLE OF CONTENTS
1 Important comments.................................................................................. 4
1.1 Legal principles............................................................................................ 4
1.1.1
Copyright .......................................................................................... 4
1.1.2
Personnel qualification ..................................................................... 4
1.1.3
Intended use ...................................................................................... 4
1.2 Range of validity.......................................................................................... 5
2
Description.................................................................................................. 6
3 Reference Material..................................................................................... 7
3.1 DeviceNet Configuration ............................................................................. 7
3.2 SLC500 PLC Logic.................................................................................... 17
3.3 Overview.................................................................................................... 18
Application note
A201501
4•
Important comments
1
Important comments
To ensure fast installation and start-up of the units described in this manual,
we strongly recommend that the following information and explanation is
carefully read and adhered to.
1.1 Legal principles
1.1.1
Copyright
This manual is copyrighted, together with all figures and illustrations contained therein. Any use of this manual which infringes the copyright provisions
stipulated herein, is not permitted. Reproduction, translation and electronic
and photo-technical archiving and amendments require the written consent of
WAGO Kontakttechnik GmbH. Non-observance will entail the right of claims
for damages.
1.1.2
Personnel qualification
The use of the product detailed in this manual is exclusively geared to specialists having qualifications in PLC programming, electrical specialists or
persons instructed by electrical specialists who are also familiar with the valid
standards. WAGO Kontakttechnik GmbH declines all liability resulting from
improper action and damage to WAGO products and third party products due
to non-observance of the information contained in this manual.
1.1.3
Intended use
For each individual application, the components supplied are to work with a
dedicated hardware and software configuration. Modifications are only admitted within the framework of the possibilities documented in the manuals. All
other changes to the hardware and/or software and the non-conforming use of
the components entail the exclusion of liability on part of WAGO Kontakttechnik GmbH.
Please direct any requirements pertaining to a modified and/or new hardware
or software configuration directly to WAGO Kontakttechnik GmbH.
Application note
A201501
Important comments
•5
1.2 Range of validity
This application note is based on the stated hardware and software of the specific manufacturer as well as the correspondent documentation. This application note is therefore only valid for the described installation.
New hardware and software versions may need to be handled differently.
Please note the detailed description in the specific manuals.
Application note
A201501
6•
Description
2
Description
There are 2 parts to this solution. First part is configuring the Devicenet side
correctly and the second part is configuring the SLC500 logic. This will make
the 750-631 Encoder module Data useable for the full range of 0-65535.
Software used for this App Note:
RSNetworx for Devicenet configruation
RSLogicx for SLC500 programming
For other details about WAGO I/O please refer to the WAGO Users Manuals.
The Users Manuals can be downloaded from the web site www.wago.com
Application note
A201501
Reference Material
3
Reference Material
3.1 DeviceNet Configuration
Part 1: Configure Device Net using RS Networx
The 1747-SDN scanner has to be configured for the 750-631 module.
RX = 6 Bytes
TX = 6 Bytes
Output Register Map
D0 = Control Byte
D1 = Set Counter –Byte 1
D2 = Set Counter – Byte 0
D3 = Not Used – Need to add to configuration
D4 = Not Used – Need to add to configuration
D5 = Not Used – Need to add to configuration
Input Register Map
D0 = Status Byte
D1 = Counter Byte 1 (Most Significant Byte/ High Byte)
D2 = Counter Byte 0 (Least Significant Byte/LowByte)
D3 = Not Used –Need to add to configuration
D4 = Latch Value Byte 1
D5 = Latch value byte 0
Application note
A201501
•7
8•
Reference Material
The 1747-SDN can be configured using Discrete for single bit level and M
File for Memory register.
Fig. 1:
Scan List
Select Scan List
Configure the RX and TX
Configure RX = 6 Bytes
Configure TX = 6 Bytes
Application note
A201501
Reference Material
Fig. 2:
Input Configuration Discrete
Select Input and Click on Advanced
Application note
A201501
•9
10 •
Reference Material
Fig. 3:
Advanced Input Configuration Discrete
Message Select Polled
Memory Select Discrete
Word = 1
Bit Length = 8
Click on Apply Mapping
Click on close
This will make the Status byte of the module Discrete inputs.
The Discrete Map should look like the above Input Configuration discrete
Display.
Application note
A201501
Reference Material
Fig. 4:
Advanced Input Configuration M File
Message Select Polled
Memory Select M File
Word = 1
Bit Length = 40
Click on Apply Mapping
Click on close
Application note
A201501
• 11
12 •
Reference Material
Fig.5:
Input Configuration M File
Click on Memory and change window to M File
40 Bits are configured as displayed above Input Configuration M File.
This will place the encoder data into 1 16 bit memory register M1:1.0
Application note
A201501
Reference Material
Fig.6:
Output Configuration Discrete
Select Output and Click on Advanced
Application note
A201501
• 13
14 •
Reference Material
Fig. 7:
Advanced Output Configuration Discrete
Message Select Polled
Memory Select Discrete
Word = 1
Bit Length = 8
Click on Apply Mapping
Click on close
This will make the Control byte of the module Discrete outputs
The Discrete Map should look like the above Output Configuration discrete
Display.
Application note
A201501
Reference Material
Fig. 8:
Advanced Output Configuration M File
Message Select Polled
Memory Select M File
Word = 1
Bit Length = 40
Click on Apply Mapping
Click on close
Application note
A201501
• 15
16 •
Reference Material
Fig. 9:
Output Configuration M File
Click on Memory and change window to M File
40 Bits are configured as displayed above Output Configuration M File.
This will place the Set counter data into 1 16 bit memory register M0:1.0
Application note
A201501
Reference Material
3.2 SLC500 PLC Logic
Use the COP command to copy the data from the M File to the N7:0
Use the above Logic to convert the data to the full 16 Bit Number (65535)
Application note
A201501
• 17
18 •
Reference Material
3.3 Overview
Device Net:
SEE Top of Document for Register Byte format D0-D5 Input / Output.
The Status Byte and Control Byte are configured in the Devicenet
scanner to be placed into the Discrete I/O. This makes it east to
view the Status and Control byte.
The rest of the 40Bits are located into M1 and M0 files. This will locate Byte 1 and
Byte 0 into 1 word data register 16bits long so it makes programming easy on the
SLC500 side.
In this example I:1.0 is the status byte in the discrete inputs
M1:1.0 holds Byte1 & Byte0 which the Encoder position data Register
SLC500:
COP command is used to transfer the M1:1.0 data (Encoder Position) to N7:0.
Use the COP command because it does not affect the Math Flags. Do not use
the MOV command because it does affect the Math Flags.
MVM The MVM will mask the N7:0 Sign Flag and the result is placed into
N7:1
ADD This command will add the result of N7:1 to 32768.0 when the sign flag
is set to continue the full 16bit value from 32768 to 65535 with the result in
Register F8:0.
MOV When the sign flag is not set (0-32767) the value is moved from N7:1 to
Register F8:0
Register F8:0 is the data register that will contain the encoder data 0-65535
Application note
A201501
Reference Material
Application note
A201501
• 19
WAGO Kontakttechnik GmbH
Postfach 2880 • D-32385 Minden
Hansastraße 27 • D-32423 Minden
Phone:
05 71/8 87 – 0
Telefax: 05 71/8 87 – 1 69
E-Mail:
info@wago.com
WAGO Corporation USA
N120W19129 Freistadt Road
PO Box 1015
Germantown, Wi 53022
Phone: 1-262-255-6333
Fax: 1-262-255-3232
Internet:
http://www.wago.com
Call Toll Free: 1-800-DIN-RAIL
(346-7245)