Serial COM S7
Serial COM S7
Manual
V1.2.5
August 2014
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); Vila Nova de Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
Serial COM S7
Sections
Warranty and Liability ................................................................................................................... 1
A.
Warranty ........................................................................................................................... 1
B.
Liability .............................................................................................................................. 1
System Overview ........................................................................................................................... 2
Installation..................................................................................................................................... 3
A.
Downloading the Program’s Latest Version ...................................................................... 3
B.
Running the Installer ......................................................................................................... 4
C.
Starting and Stopping the Service ..................................................................................... 6
Interface / Configuration............................................................................................................... 7
A.PLC Hardware Preparation..................................................................................................... 7
B.Interface PLC Code ................................................................................................................. 7
1.Variable Description ........................................................................................................... 7
2.Expected Communication Flowchart ................................................................................. 8
3.Sample PLC Code ................................................................................................................ 9
User Interface .............................................................................................................................. 11
A.Configuration by GUI ........................................................................................................... 11
B.Configuration by file............................................................................................................. 14
Authorization............................................................................................................................... 15
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); Vila Nova de Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
Serial COM S7
Warranty and Liability
Please read this section carefully, before taking any other action with the software.
A. Warranty
The provided system is guaranteed against all manufacturing defects for a year after its
purchase. During this time, SETLEVEL will proceed with the correction of any software bugs, in
the shortest period of time possible after being informed of the problem in question.
B. Liability
Before installing this software, make sure that you have thoroughly read its documentation,
requirements, and recommendations. SETLEVEL cannot be held responsible for problems
resulting directly or indirectly from alterations made to the provided products, nor from the
undue use of the same. The software should only be used for its intended purpose. Setlevel
cannot be held responsible for unforeseen interference with other software, developed either
by the client or a third-party, nor for the undue functioning of any connected hardware.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
1 / 15
Serial COM S7
System Overview
The SerialCOMS7 software is a Windows-based service designed to integrate communication
with RS232 devices, using a Serial COM port. Consequently, any device using RS232 can
connect to a Siemens S7 PLC by using TCP/IP.
Currently, on version 1.20, this communication is still one-directional, allowing only the
reception of data from the device. Future versions will include bi-directional communication,
reading from the device and also sending data to it.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
2 / 15
Serial COM S7
Installation
In this section, the steps necessary to install this application are detailed. This includes
downloading the latest version of the program, and running the respective installer.
A. Downloading the Program’s Latest Version
In order to ensure that you are installing the latest version of the program, you may download
the trial from the following link, at our website:
http://www.setlevel.pt/products/product.php?id=56
This will download the package containing the SerialCOMS7.msi file. If your browser asks for
permission to download, please confirm.
The file will be created on the path that you choose to place it. To run it, double click on the
application icon. This will open the SerialCOMS7 service installer.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
3 / 15
Serial COM S7
B. Running the Installer
By double-clicking the installer icon, you will have opened the setup wizard.
On the first installer window, click on “Next”, which will take you to the options screen. There,
you can choose the path to which the files will be installed, and which Windows users will have
permission to use the service. You can also control disk space costs, although the application in
question occupies minimal amounts of space.
Confirm installation options, by pressing “Next”. As soon as the progress bar completes, you
will receive a notification informing that it was done successfully. Press “Close” to exit this
window.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
4 / 15
Serial COM S7
Now, the service is installed on your system (although stopped), and you should have on your
desktop an icon named “SerialCOMS7 GUI”.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
5 / 15
Serial COM S7
C. Starting and Stopping the Service
Whenever you wish to Start or Stop the service, you have to do so through the Windows
Services. In order to open the services window, access the Start menu and press the “Run…”
button. On the prompt window, run “services.msc”, which will open the services window.
Locate the SerialCOMS7 service, which should currently be stopped. By right-clicking it, you
may see the options to Start/Stop. Choose the “Start” option. The service is now initiated.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
6 / 15
Serial COM S7
Interface / Configuration
A. PLC Hardware Preparation
SerialCOMS7 can be connected to any Siemens S7 PLC, so if you want to connect to a
PLC S7 300/400 just ensure that it is connected to the PC/IPC running SerialCOMS7
service. In case you want a connection to a WinAC/LC RT/RTX must be ensured the
IE-General object (like the example below) on your Hardware Configuration.
B. Interface PLC Code
In order to communicate with SerialCOMS7 it is required first to setup the interface DB on
the plc. The image under is the structure needed to get the data on any PLC program.
1.Variable Description




NewDataRS232 (BOOL) - Triggers to TRUE, this means the string Data was populated
with the new data from the device. Should be set to false by PLC to confirm data
collection
iCommCheck (INT) – Changes +1 every 20s. SerialCOMS7 controls this value, it should
be read only by the plc, so the PLC should act as a slave. If nothing changes more than
20 sec, it means the SerialCOMS7 is either off /down/not configed.
Data (STRING[40]) – Variable that collects the DATA from the service.
EmptyString (STRING[40] ) – Used to clean the Data variable after a receive event.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
7 / 15
Serial COM S7
2.Expected Communication Flowchart
This doesn’t mean that it is required to develop a complex block. Already in the project
a function was created, for easy integration SerialCOMS7 integration FC. It is available and all
DB’s and FB’s can be changed. The only requirement for this function to work is the use of a
standard Siemens function SFC20 BLK_MOV.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
8 / 15
Serial COM S7
3.Sample PLC Code
The main function is FC1 it is a SCL function. It can be changed by going to Sources .
There you can check the code of the function as seen below:
On this sample we are checking new Data reception and as well if the Service is down.
No more code is needed in order to SerialComS7 to work.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
9 / 15
Serial COM S7
1. You need to set a DB , in our example DB3. We created a variable called
Device with type RS232
2. Then a DB100 was created with a String[40] . This will be the final reception of
the data we want to receive. So we can further manipulate. It can be a
barcode from a scanner, a RFID card reader or even a value of a sensor.
3. Call FC1 on OB1 as showed below.
4. With CommCheck you can compare the value with an old value.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
10 / 15
Serial COM S7
If you completed this steps congratulations SerialComS7 is installed.
User Interface
By double-clicking on the “Serial COM S7 GUI” icon, the Graphic User Interface for the service
will appear. Press the “Connect” button, located on the lower-right corner of the window, in
order to begin the data transmission process.
This window provides you with the basic status and information of the service, provided it is
running without any errors. If properly connected, the required data should be displayed
(otherwise, the “No data” and “Service not connected” messages will be displayed, as shown
above).
A. Configuration by GUI
All the configurations can be handled by the form.
If a value is changed on one of the tabs the s
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
11 / 15
Serial COM S7
The following values are needed to be configured based on your application, this are
the main values:
I.
II.
III.
IV.
RS232_COMM_ON – This variables enables the use of not of the gateway. If
this variable is off the COM port will not be open. So you can use the Port
COM for other application.
PLC_COMM_ON – with this variable you turn on the connection to PLC.
S7_DB_NUMBER – PLC S7 DB that receives the data. The Data Block that needs
to be set up to receive the data from SerialCOMS7.
RS232_COMM_PORT – This variables enables the use of not of the gateway. If
this variable is off the COM port will not be open. So you can use the Port
COM for other application.
The following configurations are used to set the RS232 port configuration. You should
contact and check the vendor manual of your device. In order to set the correct parameters.
V.
RS232_BAUDRATE – This variable sets the Baudrate for the Serial com
Connection. Possible values:
a. 1200
b. 2400
c. 4800
d. 9600
e. 14400
f. 19200
g. 28800
h. 38400
i. 57600
j. 76800
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
12 / 15
Serial COM S7
k. 115200
VI.
RS232_DATABITS– This variable sets the Baudrate for the Serial com
Connection. Possible values:
a. 5
b. 6
c. 7
d. 8
VII.
RS232_PARITY– This variable sets the Parity for the Serial com Connection.
Possible values:
a. None
b. Even
c. Mark
d. Odd
e. Space
VIII.
RS232_HANDSHAKE– This variable sets the Handshake for the Serial com
Connection. Possible values:
a. None
b. Hardware
c. Hardware/XonXoff
d. XonXoff
IX.
RS232_STOPBITS– This variable sets the StopBits for the Serial com
Connection. Possible values:
a. 0
b. 1
c. 1.5
d. 2
When a value is changed the Save Button will change colour. In order to request a save of
the configuration. Please remember you need to restart the service for the new
configuration to load
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
13 / 15
Serial COM S7
B.Configuration by file
You can find a file in the installation folder called Config.XML . In this XML you can set the
necessary configuration.
You will find the same values as the GUI. Please use the GUI for
configuration it is highly recommended.
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
14 / 15
Serial COM S7
Authorization
You are hereby authorized to use this software, pending on the condition that you have
purchased it directly from Setlevel or from a licensed distributor, or otherwise have an
authenticated agreement with any such entity granting you the license for usage.
Each installation requires an individual license. A given license key must not be used in
multiple installations. To obtain a valid license key, in order to activate the software, please
contact us.
If you ordered the software you will get your license details by an e-mail [email protected].
Setlevel – Your Industry Partner
Rua da Indústria, Lote nº 9 (4760-758 Vilarinho das Cambas); V.N.Famalicão, Portugal
Tel +351 252 311 765 Fax +351 252 311 765 Email: [email protected]
15 / 15
Download

Serial COM S7