![ProSoft Technology PS69-DPS Скачать руководство пользователя страница 41](http://html1.mh-extra.com/html/prosoft-technology/ps69-dps/ps69-dps_user-manual_1618995041.webp)
RSLogix Example Program
PS69-DPS
♦
CompactLogix or MicroLogix Platform
Profibus DP Slave Communication Module
ProSoft Technology, Inc.
Page 41 of 94
January 12, 2009
3
RSLogix Example Program
In This Chapter
I/O Example................................................................... 41
Messaging Example ...................................................... 43
The ProSoft Solutions CD-ROM contains example Ladder Logic programs.
These examples should be used as templates for starting your project. An
explanation of each project is in the following sections. If you are using another
type of CompactLogix Controller, change the ControllerType in RSLogix and then
store it to your individual project. If you setup up a new controller project you can
use the Copy and Paste functionality of RSLogix to transfer the user defined data
types or ladder logic needed with the module PS69-DPS from the template
projects to your own application
Sample Project
Controller Type
RSL Version Description
AOIPS69DPS.L5X
1769-L32E
5000 V16
CompactLogix Add On Instruction
PS69_DPS_L32E_V13.ACD
1769-L32E
5000 V13
Basic CompactLogix I/O example
PS69_DPS_messaging_L32E_v13.ACD 1769-L32E
5000 V13
Basic CompactLogix messaging example
PS69_DPS_ML15.rss
MicroLogix 1500
500 V6.2
Basic MicroLogix I/O example
3.1
CompactLogix I/O Example
This ladder logic program is a basic example for the setup of the PROFIBUS-DP
Slave communications module "PS69-DPS" in RSLogix5000. This example can
be used to start a project when using a CPU 1769-L32E. Basic PROFIBUS I/O
data exchange is shown. Details on the Subroutines created and the User
Defined Data Types are as follows.
MainRoutine
: The MainRoutine calls all of the following routines. This routine
also contains a simple I/O transfer function block.
DPS_Update_Ext_Data
: The DPS_Update_Ext_Data routine serves as an
example of how the user can map each of the different extended status
information provided in the ExtStatusInfo array. This routine evaluates the
content of the ExtStaSelect value and copies the information into the
appropriate user defined data type.
SR_Copy_Input
: The SR_Copy_Input routine on every scan updates the
DpsInputArray structure with the Input Data of the module.
SR_Copy_Output
: The SR_Copy_Output routine on every scan updates the
DpsOutputArray structure with the Output Data of the module.
Numerous user defined data types have been created to make it easier to
address different elements of the Input and Output array of the module. The two
main structures are DpsInputArray and DpsOutputArray. Their definitions and the
structures included in each are shown in the following tables.