Selecting The Operating Mode For The S7-200 Cpu - Siemens SIMATIC S7-200 System Manual

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual
Tip
Copying V Memory to permanent memory can be used to save values that are created from an
HMI and stored from the program to the internal EEPROM.
To include the values saved to the internal EEPROM in your STEP 7--Micro/WIN project, you
must upload the DB. However, this upload is only possible if the DB (which included a variable
that was at an equal or higher address than the V Memory address saved in SMW32) was
previously downloaded from STEP 7--Micro/WIN.
Sample Program: Copying V Memory to the Permanent Memory
This example transfers VB100 to permanent memory. On a rising edge of I0.0, if another transfer is not in progress, it
loads the address of the V memory location to be transferred to SMW32. It selects the amount of V memory to transfer
(1=Byte; 2=Word; 3=Double Word or Real). It then sets SM31.7 to have the S7-200 transfer the data at the end of the
scan.
The S7-200 automatically resets SM31.7 when the transfer is complete.

Selecting the Operating Mode for the S7-200 CPU

The S7-200 has two modes of operation: STOP mode and RUN mode. The status LEDs on the
front of the CPU indicates the current mode of operation. In STOP mode, the S7-200 is not
executing the program, and you can download a program or the CPU configuration. In RUN
mode, the S7-200 is running the program.
The S7-200 provides a mode switch for changing the mode of operation. You can use the
-
mode switch (located under the front access door of the S7-200) to manually select the
operating mode: setting the mode switch to STOP mode stops the execution of the
program; setting the mode switch to RUN mode starts the execution of the program; and
setting the mode switch to TERM (terminal) mode does not change the operating mode.
If a power cycle occurs when the mode switch is set to either STOP or TERM, the S7-200
goes automatically to STOP mode when power is restored. If a power cycle occurs when
the mode switch is set to RUN, the S7-200 goes to RUN mode when power is restored.
STEP 7--Micro/WIN allows you to change the operating mode of the online S7-200. To
-
enable the software to change the operating mode, you must manually set the mode switch
on the S7-200 to either TERM or RUN. You can use the PLC > STOP or PLC > RUN menu
commands or the associated buttons on the toolbar to change the operating mode.
You can insert the STOP instruction in your program to change the S7-200 to STOP mode.
-
This allows you to halt the execution of your program based on the program logic. For more
information about the STOP instruction, see Chapter 6.
40
Network 1
//Transfer a V memory
//location (VB100) to
//permanent memory
LD
I0.0
EU
AN
SM31.7
MOVW
+100, SMW32
MOVB
1, SMB31
S
SM31.7, 1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents