5.5 Programming samples in RSLogix 5000
5.5.3 MOVIDRIVE ® B parameter access
In order to get an easy-to-use read access to parameters of the MOVIDRIVE® B via ex-
plicit messages and the register object, follow the following steps:
1. Generate the user-defined data structure 'SEW_Parameter_Channel' (
→
following figure)2. Define the controller tags (→following figure).
3. Create a Rung for the ReadParameter execution (→following figure).
• For contact, select the tag 'ReadParameterStart'
• For the Message Control, select the tag 'ReadParameter'
11764AXX 11765AXX 11766AXX
0
0
I
5
Programming samples in RSLogix 5000
Project Planning and Startup
4. Click on in the MSG instruction to open the Message Configuration Window (
→
following figure).Select 'CIP Generic' as message type. Fill in the further data in the following order: A Source Element = ReadParameterRequest.Index
B SourceLength = 12
C Destination = ReadParameterResponse.Index D Class = 7hex
E Instance = 1 F Attribute = 4hex
G Service Code = ehex
The Service Type is set automatically.
5. The target device is to be specified on the Communication tab (→following figure).
The path consists of:
• Name of the scanner (e. g. DNet_Scanner) • 2 (always 2)
• Slave address (e. g. 11 bit)
11767AXX
11768AXX
0
0
I
5
Programming samples in RSLogix 5000 Project Planning and Startup
6. After downloading the changes to the PLC, the index of the parameter to be read can be entered at ReadParameterRequest.Index. By altering ReadParameterStart to '1' the read request is executed once (
→
following figure).On response to the read request, ReadParameterResponse.Index should indicate the read index and ReadParameterResponse.Data should contain the read data. In this sample P160 internal setpoint n11 (Index 8489) has the value of 150 rpm. In the MOVITOOLS® MotionStudio parameter tree, the value can be checked. The tooltip of a parameter displays e. g. index, subindex, scaling ... of a parameter.
The complete list of index numbers and scaling factors can be taken from MOVIDRIVE® Fieldbus Unit Profile manual.
11769AXX
11770AXX
0
0
I
5
Programming samples in RSLogix 5000
Project Planning and Startup
Only few changes are required for parameter write access: • Define the controller tags (
→
following figure).• Create a rung for the WriteParameter execution (→following figure).
For contact, select the tag 'WriteParameterStart'
For the Message Control, select the tag 'WriteParameter'
• Click on in the MSG instruction to open the Message Configuration Window (
→
following figure).Fill in the data in the following order:
– Source Element = WriteParameterRequest.Index – Source Length = 12
– Destination = WriteParameterResponse.Index – Class = 7hex
– Instance = 2 – Attribute = 4hex
– Service Code = 10hex
11771AXX 11772AXX 11773AXX
0
0
I
5
Programming samples in RSLogix 5000 Project Planning and Startup
7. After downloading the changes to the PLC, index and value to be written into the pa- rameter can be entered at WriteParameterRequest.Index and WriteParameterRe-
quest.Data. By altering WriteParameterStart to '1' the write request is executed once
(
→
following figure).On response to the write request, WriteParameterResponse.Index should give the written index and WriteParameterResponse.Data should contain the written data. In this sample P160 internal setpoint n11 (Index 8489) has the value of 200 rpm. In the MOVITOOLS® MotionStudio parameter tree, the value can be checked. The tooltip of a parameter displays e. g. index, subindex, scaling ... of a parameter.
11774AXX
0
0
I
5
Programming samples in RSLogix 5000
Project Planning and Startup
5.5.4 MOVITRAC® B parameter access via DFD11B / UOH11B
The access to MOVITRAC® B parameter data via DeviceNet-SBus Gateway DFD11B/UOH11B is identical to the access to MOVIDRIVE® B parameter data (→chapter 5.5.3).
The only difference is, that Read/WriteParameterRequest.SubChannel1 is to be set to 2 and Read/WriteParameterRequest.SubAddress1 is to be set to the SBus ad-
dress of the MOVITRAC® B connected to the DFD11B/UOH11B (→following figure).
In this sample, MOVITRAC® B connected to the DFD11B-Gateway with SBus address 7 read the value 150 rpm from P160 Internal Setpoint n11 (Index 8489).
11775AXX
0
0
I
5
Programming samples in RSLogix 500 for SLC 500 Project Planning and Startup
5.6
Programming samples in RSLogix 500 for SLC 500
The following devices are used:
54179AEN
Figure 1: PLC equipment configuration
MAC-ID 1 MAC-ID 11 1 MAC-ID 10 4 123 56 789 +/-0. 4 123 56 789 +/-0. 4 123 56 789 +/-0. RSLogic500 for SLC 9324-RL0300END PC PC RS232C 1747-CP3 RS232C 1747-CP3 16 outputs 16 inputs Adapter 16 inputs Adapter 16 inputs DeviceNet Scanner SLC500 Power section 1746-P2 1485A-C2 Terminating resistor 1485A-C2 Terminating resistor
1747-SDN 1746-IB161746-OB16 1794-ADN 1794-IB16 1794-ADN 1794-OV16 1747-L542
DeviceNet (remote line 1485C-P1-A50)
Chassis 1746-A7 Power section System configuration DeviceNet T e rminal module 1794-TB2 T e rminal module 1794-TB2 MAC-ID 0 MAC-ID 8 MAC-ID 4 Unit MAC-ID SLC5/04 - DeviceNet scanner 1747-SDN 1
INPUT module with 32 inputs -
OUTPUT module with 32 outputs -
DeviceNet adapter with input module with 16 inputs 11
DeviceNet with output module 16 outputs 10
MOVIDRIVE® MDX61B with DFD11B 8 MOVIDRIVE® MDX61B with DFD11B 0 MOVIDRIVE® MDX61B with DFD11B 4
0
0
I
5
Programming samples in RSLogix 500 for SLC 500
Project Planning and Startup
The following memory areas have been specified with the DeviceNet manager software:
******************************************************************* 1747-SDN Scanlist Map
****************************************************************** Discrete Input Map:
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
I:3.000 R R R R R R R R R R R R R R R R Status word of the scanner
I:3.001 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 Process data from device 11
I:3.002 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 Process data from device 11
I:3.003 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 Process data from device 10
I:3.004 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 Process data from device 10
I:3.005 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 PID1 device 8 Polled I/O
I:3.006 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 PID2 device 8 Polled I/O
I:3.007 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 PID3 device 8 Polled I/O
I:3.008 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 PID1 device 8 Bit-Strobe I/O
I:3.009 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 PID2 device 8 Bit-Strobe I/O
I:3.010 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 PID3 device 8 Bit-Strobe I/O
I:3.011 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 PID1 device 0 Polled I/O
I:3.012 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 PID2 device 0 Polled I/O
I:3.013 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 PID3 device 0 Polled I/O
I:3.014 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 PID1 device 0 Bit-Strobe I/O
I:3.015 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 PID2 device 0 Bit-Strobe I/O
I:3.016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 PID3 device 0 Bit-Strobe I/O
I:3.017 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 PID1 device 4 Polled I/O
I:3.018 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 PID2 device 4 Polled I/O
I:3.019 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 PID3 device 4 Polled I/O
I:3.020 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 PID1 device 4 Bit-Strobe I/O
I:3.021 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 PID2 device 4 Bit-Strobe I/O
I:3.022 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 PID3 device 4 Bit-Strobe I/O
Discrete Output Map:
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
O:3.000 R R R R R R R R R R R R R R R R Control word of the scanner
O:3.001 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 Process data to device 11
O:3.002 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 Process data to device 10
O:3.003 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 POD1 device 8 Polled I/O
O:3.004 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 POD2 device 8 Polled I/O
O:3.005 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 POD3 device 8 Polled I/O
O:3.006 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 POD1 device 0 Polled I/O
O:3.007 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 POD2 device 0 Polled I/O
O:3.008 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 POD3 device 0 Polled I/O
O:3.009 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 POD1 device 4 Polled I/O
O:3.010 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 POD2 device 4 Polled I/O
O:3.011 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 POD3 device 4 Polled I/O
O:3.012 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Bit-Strobe for device 8