Vous êtes sur la page 1sur 6

SIEMENS HARDWARE PLATFORM (S7-300)

CENTRAL PROCESSING UNIT(CPU) :


The CPU of the S7-300 type PLC is designated as CPU 31x, CPU 31xC, CPU 31xC-2 PtP, CPU 31xC-2 DP, CPU 31xT-2 DP or CPU 31xC-2 PN/DP, where x can be 2, 3, 4, 5, 7 or 9. The CPUs with extension PtP have integral interfaces to communicate with other devices through Point-to-Point protocols like 3964R or ASCII. The CPUs with extension DP integral interfaces to communicate with other devices through Profibus DP protocol. S7-300 CPUs can be either Master or Slave in a Profibus network. The CPUs with extension PN/DP integral interfaces to communicate with other devices through both Profinet and Profibus protocol. All the CPUs have integral ports to communicate to the programmer through MPI protocol. The CPUs with suffix C have integral I/Os and certain process functions built in the CPU. However, expansion of I/Os are permitted. The CPUs with suffix T have integral I/Os and certain technology functions like motion control built in the CPU. However, expansion of I/Os are permitted. Micro Memory Cards are required for operation of the CPUs. The power supply required by CPU is 24V DC.

DIGITAL INPUT MODULE :


Digital input modules are used to connect selector switches, push buttons, limit switches, proximity switches, etc to the PLC. Digital inputs can accept 24V DC, 48V DC, 120V AC or 240V AC. The entire module is for a particular voltage. The number of inputs or channels available on a single module can be 16, 32 or 64.

The most commonly used DI is 24V DC type

The maxm.length between signal source and PLC can be 1000M (shielded cable) or 600M (unshielded cable) The wiring to the channels is done on Front Connectors which are then screwed on the module. Front connectors can be 20 pin or 40 pin depending on the number of channels on the module.

DIGITAL OUTPUT MODULE :


Digital output modules are used to connect relays, contactors, lamps, etc to the PLC. Digital outputs can be of type 24V DC, 48V DC, 120V AC or 240V AC. The entire module is for a particular voltage. The number of inputs or channels available on a single module can be 16, 32 or 64. The most commonly used DO is 24V DC type. The maxm.length between signal source and PLC can be 1000M (shielded cable) or 600M (unshielded cable) The wiring to the channels is done on Front Connectors which are then screwed on the module. Front connectors can be 20 pin or 40 pin depending on the number of channels on the module.

ADDRESSING : The addressing of any variable is byte based. During configuration, the address of the first byte of the module is set. The next bytes in the module are assigned address automatically. The address of the first byte can be selected to by system or user defined. The address of a particular channel has three parts type of channel (input or output I or Q), Byte Address (Module Address + Byte No.) and the Channel No (0-7).

DISTRIBUTION OF THE MEMORY AREAS :


The memory of an S7 CPU can be divided into three areas The load memory is used for user programs without symbolic address assignments or comments (these remain in the memory of the programming device). The load memory can be either RAM or EPROM. Blocks that are not marked as required for startup will be stored only in the load Memory. The work memory (integrated RAM) contains the parts of the S7 program relevant for running your program. The program is executed only in the work memory and system memory areas. The system memory (RAM) contains the memory elements provided by every CPU for the user program, such as the process-image input and output tables, bit memory, timers, and counters. The system memory also contains the block stack and interrupt stack. In addition to the areas above, the system memory of the CPU also provides temporary memory (local data stack) that contains temporary data for a block when it is called. This data only remains valid as long as the block is active.

Retentive Memory Areas on S7-300 CPUs :

If a power outage occurs or the CPU memory is reset (MRES), the memory of the S7300 CPU (dynamic load memory (RAM), work memory, and system memory) is reset and all the data previously contained in these areas is lost. With S7-300 CPUs, the program and its data can be protected in the following ways:

All the data in the load memory, work memory, and in parts of the system memory can be protected with battery backup. Program can be stored in the EPROM (either memory card or integrated on the CPU). A certain amount of data can be stored depending on the CPU in an area of the nonvolatile NVRAM.

Using the NVRAM :


The S7-300 CPU provides an area in the NVRAM (non-volatile RAM).If The program is stored in the EPROM of the load memory, Certain data can be saved(if there is a power outage or when the CPU changes from STOP to RUN) by configuring the CPU accordingly. To do this set the CPU so that the following data are saved in the nonvolatile RAM: Data contained in a DB (this is only useful if you have also stored your program in an EPROM of the load memory) Values of timers and counters Data saved in bit memory. On every CPU, a certain number of timers, counters, and memory bits can be saved. A specific number of bytes is also available in which the data contained in DBs can be saved.The MPI address of the CPU is stored in the NVRAM. This makes sure that the CPU is capable of communication following a power outage or memory reset.

Using Battery Backup to Protect Data :


By using a backup battery, the load memory and work memory are retentive during a power outage. The CPU can be configured so that timers, counters, and bit memory are saved in the NVRAM, this info is also retained regardless of whether a backup battery is use or not.

Configuring the Data of the NVRAM :


While configuring CPU with STEP 7, it can be decided which memory areas is to be wanted to beretentive.The amount of memory that can be configured in the NVRAM depends on the CPU which is to be used.More data can not be backed up than specified for the CPU.

INTERMEDIATE STORAGE THROUGH BIT MEMORY :


There is a bit memory area, designated by M, specified in terms of bytes. The number of bytes available depends on the CPU selected. The memory is addressed in a way similar to addressing input or output. E.g. MB 0 (Memory Byte 0), M 33.5 (Bit No.5 of Memory Byte 33),MW 100 (Memory Word 100, i.e Memory Byte 100 and Memory Byte 101). The memory area can be used as temporary storage location for bit, byte, word or double-word values.

DATA TYPES : There are 2 types of data Elementary Data Types and Complex Data Types.

Elementary Data Types :


Each elementary data type has a defined length.

Complex Data Types :


Complex data types define data groups that are larger than 32 bits or data groups consisting of other data types. STEP 7 permits the following complex data types: DATE_AND_TIME STRING ARRAY STRUCT UDT (user-defined data types) FBs and SFBs The following table describes the complex data types. Structures and arrays can be defined either in the variable declaration of the logic block or in a data block.

Data Type

Description

DATE_AND_TIME DT

Defines an area with 64 bits (8 bytes). This data type saves In binary coded decimal format:

STRING Defines a group with a maximum of 254 characters (data type CHAR).The standard area reserved for a character string is 256 bytes long.This is the space required to save 254 characters and a header of 2 bytes. The required

Memory can be reduced the for a string by defining the no. of characters that will be stored in the character string (for example: string[9] SIEMENS). ARRAY Defines a multidimensional grouping of one data type (either elementary or complex). For example: ARRAY [1..2,1..3]OF int defines an array in the format 2 x 3 consisting of integers.The data stored in an array is accessed. using the Index ([2,2]").Maximum 6 dimensions can be defined in one array.The index can an integer (-32768 to 32767).

STRUCT

Defines a grouping of any combination of data types.

UDT

Simplifies the structuring of large quantities of data and entering data types when creating data blocks or declaring variables in the variable declaration. Complex and elementary data type can be combined to create userdefineddata type. UDTs have their own name and can therefore be used more than once. User determine the structure of the assigned instance data Block and allow the transfer of instance data for several FB calls in one instance DB.

FB, SFB

Vous aimerez peut-être aussi