FirstSteps

SUMMARY

This document introduces first-time users to the SoftPLC7.
The following tasks are described:

CONTENTS

  1. Introduction
  2. File structure
  3. Approach
  4. Import
  5. Functionality of the Step7-Program
  6. Debugging - with SoftPLC7-utilities
  7. Debugging - with the SIMATIC Manager

Introduction

With the SoftPLC7 Software a small STEP7 Program is provided.
The same program is available in 3 types:

File structure

After installing SoftPLC7, the following File-Structure is found :

<Inst.Directory>\VISION\
                          bin\              (SoftPLC7-Software)
                          Step7Demo 
                             \SIMATCProject (Archived Step7-Project)
                             \STEP7_DEMO    (Offline-Directory of Step7-Project)
                             \VAT           (Folder for *.vat.ini files)
                          SoftPlc7SampleHll
            

Approach

  1. Choose the source to import from. The following alternatives exist:
    • Import from the archived SIMATIC-Project.
    • Import from the Offline-Directory of STEP7-DEMO
  2. Create the Destination folder for the project to import.
    (We recommend <Installation Directory>\vision\SoftPlc7Demo\Imp_SoftPLC7_DEMO)

  3. Run and test the SoftPLC7-program:
    • With the SoftPLC7 test utilities
      or
    • with the SIMATIC Manager.

Import

If you choose to import from the Offline-Directory of the S7-Project continue with 'Start the SoftPLC7-Program'

To import from the archived SIMATIC-Project you have to unpack the project.

Archive:
<Installation Directory>\VISION\SoftPlc7Demo\SIMATICProject\SimaticMgrDemo.zip
(We recommend to unzip the archive to the 'SIMATICProject' folder)

1. Start the SoftPLC7 Program

Start the SoftPLC7-Program via the Shortcut (if created when installing the SoftPLC7 Software), or double-click the program:
<Installation Directory>\VISION\bin\SoftPLC7.exe

Note:
At this point, license= and other start-up warnings like: 'AG 1: No blocks were found. An empty project with an empty OB1 is generated' can safely be ignored. Just close corresponding message boxes.

After selecting 'File' in the pull-down menu, you get the following window:




Choose 'SimaticImport...' to get the following window:


2. Select Source and Destination Folder

Select the folder of the source files to be imported.

FROM OFFLINE-DIRECTORY
<Installation Directory>\VISION\SoftPlc7Demo\STEP7_DEMO
Enter the folder directly or browse for it using the top '...'-button

or

FROM Step7-PROJECT
D:\vision\SoftPlc7Demo\SIMATIC Project\MesseDem (the recommended one)
Enter the folder directly or browse for it using the 'S7-Program...'-button.
When using the browser, the dialog window looks alike:





Only the S7 -blocks need to be imported, so tick the according selection box.

Note:
If you choose to import 'Connections and peripherals' also, the file 'SoftPLCNet.ini' is created; and after the import you are asked to restart the SoftPLC7 to activate the new SoftPLCNet.ini.

Select the folder where the imported files should be written to.
<Installation Directory>\vision\SoftPlc7Demo\Imp_SoftPLC7_DEMO (the recommended one)

Enter the folder directly or browse for it using the lower '...' button

3. Import

After selection, start the import via the 'Import' button.
After conversion, the system reports 'Ready'.

Functionality of the Step7-Program

Symbolic Table of the Step7-Program


Adress in the Step7 data-block DB 1 Name Data type Meaning
DB 1.DBX0.1 RampStart binary 0 = stop
1 = run
DB 1.DBW16 RampAlarmFlag signed 0 = OK
1 = alarm
DB 1.DBW10 RampIncrement signed Each second, the value is increased by this value. A negative value leads to a decrease.
DB 1.DBW14 RampAlarmLimit signed If this limit is reached, the alarm flag is set to "1"
DB 1.DBW12 RampMaxValue signed If this limit is reached, the values re-start from zero.
DB 1.DBW8 RampValue signed Current value.
DB 1.DBX0.5 RampDirection binary 0 = Each second, the RampIncrement-value is subtracted from the current value.
1 = Each second, the RampIncrement-value is added from the current value.

The program generates a ramp similar to the figure below.



WARNING
An inappropriate set of parameters leads to ever in- or decreasing values, e.g. if the current value is set to increase and the upper limit is a negative number or vice versa.

Debugging - with SoftPLC7-utilities

Copy the directory <Installation Directory>\VISION\SoftPlc7Demo\VAT to the destination directory of the import.

To switch to the debug-view of the SoftPLC7, choose 'Debug' from the pull-down menu 'View'. The SoftPLC7 changes to the following view:




From the VAT:-combo-box, choose 'DEMO' to populate the list-view with the currently availiable data-addresses, -values, and types:



Monitoring the SoftPLC7 Program

column name Description
Operand Data-block address that is monitored
DisplayFormat Display format of the data.
State Current value
Force value A value can be entered in that field. If this field is focused the current value is changed to this each time you press the "Return"-key
Force per. A left mouse click into that field forces the value out of column 'Force value' to be written to SoftPLC7 periodically. '1' in that column indicates the active state.


To start execution, the following set of values in the corresponding data-block addresses make sense (you can try others):
Block address / given name Example value Meaning
DB1 DBW10 / RampIncrement 3 Each second, the value increases by 3
DB1 DBW14 / RampAlarmLimit 60 If the current value is 60, the alarm flag (DB1 DBW16) is set to '1'
DB1 DBW12 / RampMaxValue 100 If the current value is 100, the value re-starts at zero.
DB1 DBX 0.1 / RampStart 1 Starts the execution based on the parameters given.

RampStart = 1 (Ramp value increases)
RampAlarmFlag = 1 (if RampAlarmLimit < RampValue)
RampIncrement = 3 (RampValue increments in steps of 3)
RampAlarmLimit = 50 (RampValue < 50 --> RampAlarmFlag=0
RampMaxValue =100 (RampValue drops from 100 to 0)
RampValue (shows increasing value of ramp if RampStart is set to '1' Value remains at the same level if RampStart is set to '0')

Debugging - with the SIMATIC Manager

WARNING


To change the IP-address, select 'PG-Interface...' from the pull-down menu 'Extras' to open the following window.





After changing the IP-address, close the dialog with "OK".
Please check your SIMATIC Manager documentation to learn how to use TCP/IP protocol, how to change IP-addresses, and how to switch to the online view.
To start debugging, switch both the SIMATIC Manager and the SoftPLC7 to their "online" modes, respectively.