 |
ALPHA-VISION® content: FirstSteps
|
FirstSteps
SUMMARY
This document introduces first-time users to the SoftPLC7.
The following tasks are described:
- Import of a Step7-program to run on the SoftPLC7
- Running and testing of the imported program
CONTENTS
- Introduction
- File structure
- Approach
- Import
- Functionality of the Step7-Program
- Debugging - with SoftPLC7-utilities
- Debugging - with the SIMATIC Manager
Introduction
With the SoftPLC7 Software a small STEP7 Program is provided.
The same program is available in 3 types:
- As executable Demo Program.
(It can be called up via the Menu over the Start-button, if you
decide for that option, follow the description from the point
'Functionality of the Step7-Program')
- As archived SIMATIC project.
(In the following it is used to show how to import an existing SIMATIC project.)
- As Offline Directory of a STEP7 program.
(In the following it is used to show how to import from an Offline
Directory of a STEP7 program.)
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
- Choose the source to import from. The following alternatives exist:
- Import from the archived SIMATIC-Project.
- Import from the Offline-Directory of STEP7-DEMO
- Create the Destination folder for the project to import.
(We recommend <Installation Directory>\vision\SoftPlc7Demo\Imp_SoftPLC7_DEMO)
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.
- The ramp generation can be started an stopped
- The ramp value is incremented every second
- The increment value can be defined
- The maximum value of the Ramp can be defined
- When ramp value reaches the maximum its value is dropped to 0
- An alarm flag is raised when exceeding the limit
- The limit for raising an alarm flag can be defined
- The ramp direction can be reversed
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
- Use TCP/IP-protocol to connect SIMATIC Manager and SoftPLC7.
- Use the same IP address for the CP in the SIMATIC Manager and the SoftPLC7, this address has to correspond to the one of your
PC.
- Set the SoftPLC7 offline before changing the IP address.
- Deactivate firewalls.
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.