Webserver

How to provide machine data as HTML-files

How to provide machine data as HTML-files

You may know it: You want to make machine data available to many users centrally, quickly and easily. Our DataSuite offers you the possibility to do just that. In this article, we show you how you can easily generate HTML files from MDE data.

Webserver

Advantages of the HTML format

Before we show you how to generate machine data as HTML files, we will first show you the advantages of HTML files. The DataSuite, our universal software for collecting and processing machine data, is the basis for the following steps. 

Why HTML?

Providing machine data as an HTML file has several advantages. HTML is a text-based mark-up language and the schema is simple and uniform, which is why you do not need to rely on licences with this file format. To make the data more accessible, you can upload it to your web server.

By uploading a file to the web server, it can be opened from anywhere. We will show you how to upload an HTML file to DataSuite’s integrated web server at the end of the article.

The integrated web server of the DataSuite is a simple and fast solution that does not require any IT knowledge. If you want to use an external web server, which is much more complicated but offers more possibilities, we recommend the article: “Article follows”.

Get free consulting now

Your questions will be answered in a video call or a telephone conversation with one of our experts. Concrete requirements and projects can be discussed directly.

The appointment booking is done with Microsoft Bookings, Microsoft’s privacy policy applies

MB Software Data Suite 3 Beratungsgespräch

Machine data in HTML file

In this part of the article we will show you how to provide your machine data as an HTML file.

 

To do this, click on an existing trigger in the Trigger menu item and open the associated settings by clicking on “Edit”.

Edit DataSuite trigger

Now you can add another action at the end of the already existing flow by pressing “+”. Then search for “HTML” in the search box and click the following result:

Then click on the red framed field and assign a file name for the HTML file. Please note that only a conversion from Excel to HTML takes place here.

So you have to create an Excel file with DataSuite first or select an existing Excel file, which will be converted to HTML in this step. The trigger “Write data record” already creates in the default configuration such a file, so you only have to use the “+” Button to add a convert-action.

Why is the extra step Excel file useful?

Excel is more or less the HTML designer. In an Excel template, you can format the data and combine it with charts and other things. The Excel file created in this way then only needs to be converted into HTML. Datasuite does this for you. You can read how to easily generate Excel files from machine data in this article: 

It works that easy: Write Excel files with the Siemens S7

In the “Publish” field below, you can either save your HTML file on the file system or publish it directly on the integrated web server. We will show you where the difference lies and what the steps entail in the next section.

Publish HTML website in file system and integrated web server

Now we will show you how to publish your HTML website with machine data in the file system and directly on the integrated web server. Note, however, that the integrated web server must be configured beforehand. A standard configuration is already available and can be used. However, you must switch on the web server. You can find out how this works in the article: “follows”.

Publish HTML websites in the file system

First we focus on saving in the file system. To do this, enter the file name that the file with your machine data should have. If your trigger condition is fulfilled, the trigger is executed. You can also start the trigger manually.

After executing the trigger, you have successfully converted an Excel file containing your valuable data into an HTML file. You receive your HTML file and an additional folder.

To display the HTML file, the _files folder is also required. This contains the sheets and graphics, i.e. the actual content.

As you can see, the conversion worked and all the required files are there. In the next step we will show you how to publish the website directly on the integrated web server. This allows the website to be accessed directly via the browser.

Publish HTML websites on the integrated web server

To publish the file on the web server, select “Webserver” under the “Publish” field. Enter the address under which you want to call up the website. The first part is already predefined and cannot be changed.

If you now execute the trigger, you can access the document locally at the localhost address as seen below.

uploaded HTML file in the browser
Ready converted and uploaded machine data

As you can see, we have converted an Excel file containing machine data into an HTML file that is now accessible via the browser. This means that you do not need any software on the systems to open the file.

We have shown you an example here, but you can reproduce the whole process with your real Excel files. You can repeat these steps as often as you like to upload all your machine data to the integrated web server or save it in the file system.

Further DataSuite functions and customer support

 

DataSuite offers numerous other functions, for example, you can use it to generate PDF or Excel documents from machine data and automatically write machine data to a database. You can find the article on this in the DataSuite Tech Blog.

You can find much more information and setting options in the DataSuite software manual, which is included in the download. There you will find detailed instructions with screenshots.

Further information and assistance free of charge from our experts:

Phone: +49 2742 72927 80
E-mail: [email protected]

 

Conclusion

The DataSuite software enables you to easily provide your machine data as HTML files. You can save them locally in the file system or, thanks to the integrated web server, make them available quickly and easily as web pages in the network.

Download trial software

Test all functions free of charge for 30 days. You will receive a mail with download link for instant use.

Related articles

Shopfloor-Management-Software

DataSuite News EN 1/23

You know our DataSuite software and therefore know that it is very versatile and offers many functions. In conversations with customers, I notice again and again that particularly exciting features are often not known. I have therefore compiled some interesting little-known features in this newsletter.

read more »
uploaded HTML file in the browser

DataSuite News EN 5/22

wouldn’t it be nice if you could provide data of machines and plants easily and quickly as web pages? Maybe even with a diagram and your logo? We have built exactly this function and many more into our [MB] DataSuite. Forget the S7 web server and use the fast and easy alternative in the form of our software.

read more »
Das "Hexagon" von Wissen

DataSuite News EN 4/22

After a long search we have found a new home. From now on you will find us in the middle of the city of Wissen (Sieg) in one of the most modern office buildings in the region.

read more »
Factory worker is programming a CNC milling machine with a tablet computer.

Send SMS with a S7 PLC

Send SMS with a S7 PLC

When it comes to reducing unplanned downtime, problems can often arise. We offer you an easy way to keep track of your downtimes. In this article, we show you how you can automatically receive an SMS with a comprehensive error message and PLC variables of your S7 in case of a machine downtime.

Factory worker is programming a CNC milling machine with a tablet computer.

Why sending SMS from the S7 is worthwile

Improving the monitoring of your machines and plants will in most cases lead to a drastic reduction of your downtimes. Our versatile software for collecting and processing machine data, DataSuite, can have a big positive impact on this. Later in this article, we will show you how you can automatically receive an SMS when one of your machines fails. The big advantage is that you will be notified immediately with comprehensive information about the possible source of the error. Moreover, the SMS feature can be used with any cell phone, completely without installing an additional app or needing an internet connection.


This article builds on the article: “Reduce downtime in production”. There we showed how you can save time, money, and nerves with the help of DataSuite.

Importance of the DataSuite in this process

DataSuite allows you to send SMS without a SIM card. If you have set it up correctly, you will automatically receive an SMS with valuable information when a machine has a fault condition. This can be error texts directly from the plant, measured values or even other information. With the help of DataSuite, you can even include PLC variables in the SMS. In case of an alarm, you will then receive an SMS with a stored text and the values you have selected, e.g. current temperature, machine number etc. However, it should be noted that there are small costs for sending SMS at the SMS service provider SMS77. However, there is no basic fee and for an SMS with 160 characters, currently only 0.075 euros.

This is how information is exchanged in the event of a fault condition

The purpose of this article is that you will end up understanding and being able to practically implement the structure shown here. You will notice that it is actually quite simple. In order to successfully send an error message as an SMS at the end of this article, we need a trigger created in the DataSuite software. A trigger has trigger conditions and actions. If these conditions are met, the actions will be executed. So if your machine changes to the operating state “malfunction”, in this case the trigger will be triggered.

There are many ways to define a trigger. For example, you can define a temperature value from which your machine changes to the operating state “Fault”. In this case, your PLC transmits the data to the DataSuite software, which then compiles an error message in the form of an SMS. Which information the SMS should contain, you can define yourself in our software.

Praxisbeispiel und wie man eine E-Mail mit einer S7 verschicken kann

We will then show you a real-life example of how you can use DataSuite to send SMS messages. The DataSuite is mandatory for this. At the end of the article, you can enter your email address to request a free trial version of DataSuite.

Note: How you can send an e-mail with a fault message, we have shown for you in this article: Send e-mail with an S7 PLC

 

You would like to get a live insight into DataSuite 3?

In a live online demonstration, we will go into detail about the individual functions and answer any questions you may have. Together we will find out whether DataSuite 3 is suitable for your needs.

Send SMS with a S7 PLC

In this part of the article, we will show you the required configurations in DataSuite to be able to receive error messages automatically via SMS. In our example, an error has occurred in the “Press 3” plant, which is why you will receive an SMS with the associated error message.

To be able to send SMS with an S7, you have to create your sms77 account in the DataSuite. If you do not have an account yet, please create a new account on the sms77 website beforehand.

If you have created an account, you can now set it up in DataSuite. To do so, please click on the menu item “Accounts” and then on “Create new account”.

create new email account in DataSuite software
Add SMS account in DataSuite

Then select the option “Sms77 Account” in the dialog and click on “Create” afterwards. Now you have to make some settings for the setup of the Sms77 account. Next, we will customize exactly this SMS account in DataSuite. There you can activate the debug mode at the very top.

What is the debug mode?

You can activate the debug mode when configuring the SMS account. In this case, the SMS are not sent to save costs during setup or testing. Before commissioning, this mode should definitely be deactivated, because this way no SMS are sent.

You will find a button at the bottom of the configuration page to test the settings. You can also limit the number of sent SMS per minute and hour underneath. This makes sense to prevent high costs due to accidentally sent SMS during commissioning in case of configuration errors.

link sms77 account toDataSuite
Edit SMS account

Enter the name that is to be displayed in the SMS as the sender. Below this, your API key must be entered. To be able to send SMS, you have to create an API key at sms77. We will show you in the next step how this works exactly.

Create API key at sms77

Now we will show you how to create an API key at sms77 to then link this account to DataSuite. First open the developer page of sms77. After you have logged in, please click on the + button at the tile “API keys”. Now a small menu will open, where you please enter a name at the top. After you have clicked on “Save”, your API key will be displayed below.

create API-Key at sms77 for DataSuite
Create AP key at sms77

With a click on the key, it can now be copied to continue with the setup in DataSuite. Go back to the configuration page of your SMS connection in DataSuite and paste your API key into the field provided. Now you can save the configuration like this. Make sure that debug mode is enabled if you’re still testing and don’t want to send an SMS for now. In the next step, we will show you how to define the SMS using a trigger.

Define SMS for the alert case

If you have successfully created an API key and added your SMS account, you can now define the message for the alert case. To do this, create a new trigger in the “Trigger” menu. Then search for “PLC sends SMS” in the search bar and click on “Create”.

First, the trigger conditions must be defined. When you purchase or test DataSuite, we will send you a free manual that explains the trigger conditions of a trigger. For now, we will deal with the configuration of the SMS itself. To define the SMS, please click on the “Send email” field below. The configuration could look like this:

PLC sends SMS configuration DataSuite
Edit SMS account

Select the sms77 account at the top. Enter the recipient below. Multiple recipients can be entered, separated by a semicolon (0274296887280; 0274296887281). Now you can enter the message of the SMS. The message can also contain variables. With a click on the “var+” symbol on the right side, you can select a variable directly from the control. In this example, we use the error code from the PLC. Note that sms77 charges per 160 characters. After saving, you can execute the trigger. Remember that no SMS can be sent in debug mode.

Your malfunction SMS can look like this

If the trigger was configured correctly, everything should now work. If the trigger condition you defined is met, an SMS is sent directly to the numbers you entered. However, the trigger can also be activated manually in the “Trigger” menu.

You can of course also receive an SMS in other fault conditions, the possibilities are not limited to you here. The SMS you would then receive could look like this:

SMS error message
Your error message could look like this

As you can see, you can customize the error message you receive in the event of a fault according to your needs. This way, you will always receive exactly the information you require.

Further DataSuite functions and information options

DataSuite offers many more functions, for example you can use it to create PDF or Excel documents from machine data and automatically write machine data to a database.

You can find much more information and setting options in the DataSuite software manual, which is included in the download. There you can find detailed instructions with screenshots.

More information and help free of charge from our experts:

Phone: +49 2742 72927 80
E-mail: [email protected]

Conclusion

With the help of DataSuite, you can have an SMS sent automatically when a machine breaks down. This can contain a detailed damage report and even PLC variables. This can greatly reduce your downtime, saving you time and money in fixing the problem.

Download trial software

Test all functions free of charge for 30 days. You will receive a mail with download link for instant use.

Related posts

Shopfloor-Management-Software

DataSuite News EN 1/23

You know our DataSuite software and therefore know that it is very versatile and offers many functions. In conversations with customers, I notice again and again that particularly exciting features are often not known. I have therefore compiled some interesting little-known features in this newsletter.

read more »
uploaded HTML file in the browser

DataSuite News EN 5/22

wouldn’t it be nice if you could provide data of machines and plants easily and quickly as web pages? Maybe even with a diagram and your logo? We have built exactly this function and many more into our [MB] DataSuite. Forget the S7 web server and use the fast and easy alternative in the form of our software.

read more »
Das "Hexagon" von Wissen

DataSuite News EN 4/22

After a long search we have found a new home. From now on you will find us in the middle of the city of Wissen (Sieg) in one of the most modern office buildings in the region.

read more »

Send e-mail with an S7 PLC

Send e-mail with an S7 PLC

Reducing downtime is quite difficult at times. Especially in large machine parks, it’s easy to lose track of everything. That’s why we offer you a way to reduce downtime cost-effectively and efficiently. In this article, we will show you how you can automatically receive an e-mail with the cause and machine data with your S7 in the event of a fault.

Why sending e-mails from the S7 is worthwhile

To reduce downtime in production, you can improve the monitoring of your machines and plants. This works particularly well with DataSuite, our versatile software for collecting and processing machine data. Later in this article, we’ll show you how to automatically receive an email when one of your machines fails.

This article builds on the article: “Reduce downtime in production”. There we demonstrated how DataSuite can help you save time, money, and frustration.

DataSuite allows you to send an e-mail without modem software when a machine has a fault condition. This e-mail then contains valuable information, i.e. a detailed description of the error. This can be measured values, error messages directly from the machine, or other information. With DataSuite, you can even send a diagnostic and error log as a PDF in the e-mail. In addition, the e-mail dispatch is always free of charge and in the event of an alarm, you will receive an e-mail with a stored text and the values you have selected, e.g. current temperature, machine number etc.

How the information exchange works in the event of an alarm

If your machine changes to the “fault” operating state, a trigger is released. Each trigger has trigger conditions and actions. If these conditions are met, the actions are executed.

For example, you can define a temperature value at which your machine switches to the “fault” operating state. Then, your PLC transmits the data to DataSuite, which processes the information and compiles an error message as an e-mail. You will then receive this e-mail on your e-mail address with the information you requested, which is already contained in your control system anyway.

We will then show you in practice how you can send e-mails using DataSuite. For this you logically need DataSuite, but we also offer you a trial version at the end of this article.

Note: How to send an SMS with a fault message, we have shown for you in this article:

You would like to get a live insight into DataSuite 3?

In a live online demonstration, we will go into detail about the individual functions and answer any questions you may have. Together we will find out whether DataSuite 3 is suitable for your needs.

Send e-mail with an S7 PLC

In this part of the article, we will show you what you need to configure in DataSuite to be able to receive error messages automatically by e-mail. In our example, an error has occurred in the “Saw 4” plant, so you will automatically receive an email with the error message and a log.

To be able to send e-mails with an S7, you must first create an e-mail account. To do this, click on the “Accounts” menu item and then on “Create new account”.

Then select the “Email account” option in the dialog and click “Create”. In the next window, you will need to make some settings to set up the email account. DataSuite can only send emails, so only the outgoing mail server is needed. Below the configuration, there is a button to test the settings. In addition, below it, you can limit the number of emails sent per minute and per hour to prevent spam during startup in case of configuration errors.

configure email account in DataSuite
Configure email account

At the top, enter the name that you want to be displayed as the sender of the e-mail. For “Email address”, enter the address from which the mails should be sent. Underneath, log in with your email login details to link your account. Finally, all you need is the address, encryption, and port of your outgoing mail server. You can find this information from your email provider.

Define email for the incident

If you have successfully added the e-mail account, you can now define the message for the incident. To do this, you must create a new trigger in the “Trigger” menu. Then search for “PLC sends email” in the search bar and click on “create”.

First, you have to define the trigger conditions. You can find out exactly how this works in the manual, which will be sent to you free of charge when you purchase or test DataSuite. For now, though, we’ll focus on configuring the email itself. To do this, please click on the “Send an email” field below. The configuration could look like this:

Compose email malfunction report in DataSuite
Compose email malfunction report

At the top, select the email account you just created. Below that, you can enter the recipient. Multiple recipients can be entered, separated by a semicolon ([email protected];[email protected]). Below that, enter a subject and a message. The line with the recipient, subject, and message can also contain variables. Finally, you can add an attachment at the very bottom, for example an Excel file with machine data.

This is how your malfunction mail can look like

If you have configured the trigger correctly, it will trigger at a certain temperature, for example. In this way, your S7 immediately sends an e-mail as soon as a threshold value defined by you is reached. Of course, you can also receive an e-mail in other cases of malfunction, for example in case of a simple error. The e-mail, which you receive automatically in this fault case, could look like this:

Email with error message from DataSuite
Your error message could look like this

As you have seen, you can customize the error message according to your needs. This way, you will always get exactly the information you really require. This can be error codes, logs or similar.

DataSuite offers many more functions, for example you can use it to create PDF or Excel documents from machine data and automatically write machine data to a database.

You can find much more information and setting options in the DataSuite software manual, which is included in the download. There you can find detailed instructions with screenshots.

More information and help free of charge from our experts:

Phone: +49 2742 72927 80
E-mail: [email protected]

Conclusion

With the help of DataSuite software, you can reduce your downtime by improving your monitoring. With our handy features, you can automatically receive an email with a detailed damage report when a machine breaks down. This will save you a lot of time and money.

Download trial software

Test all functions free of charge for 30 days. You will receive a mail with download link for instant use.

Related posts

Shopfloor-Management-Software

DataSuite News EN 1/23

You know our DataSuite software and therefore know that it is very versatile and offers many functions. In conversations with customers, I notice again and again that particularly exciting features are often not known. I have therefore compiled some interesting little-known features in this newsletter.

read more »
uploaded HTML file in the browser

DataSuite News EN 5/22

wouldn’t it be nice if you could provide data of machines and plants easily and quickly as web pages? Maybe even with a diagram and your logo? We have built exactly this function and many more into our [MB] DataSuite. Forget the S7 web server and use the fast and easy alternative in the form of our software.

read more »
Das "Hexagon" von Wissen

DataSuite News EN 4/22

After a long search we have found a new home. From now on you will find us in the middle of the city of Wissen (Sieg) in one of the most modern office buildings in the region.

read more »
Moderne Produktion

Store machine data of a S7 PLC in a SQL database

Store machine data of a S7 PLC in a SQL database

Some machine operators still use Excel files to document their data. In this article, we will show you why a database is always worthwhile and how you can store machine data from an S7 PLC in an SQL database.

Moderne Produktion

Why a database is better than Excel

In order to be able to work with extensive S7 machine data, we recommend an SQL database. What this is exactly and how it works, we will explain in the next step. Afterwards, we will show you in practice how you can enter a data record of your Siemens S7 PLC into a database table.

But first, we want to clarify the question of why you should use a database at all. You can simply manage your machine data in Excel tables and graphs, right? That is not wrong, but a database brings decisive advantages:

As you can see, managing your machine data in a database offers decisive advantages. In summary, the central management of data simplifies all processes. Data from a database is additionally more readable and easier to manage. For example, if you are searching for specific data records, this search is completed in a database in less than a second.

Our goal today: Store machine data in an SQL database

Read this article to learn how to take advantage of an SQL database for your machinery and equipment. Our goal at the end is the following structure:

SQL database data transmission to S7 PLC

Better than Excel

But if you store your data in Excel files, the search is often time-consuming and inconvenient. Excel is therefore suitable for small amounts of data needed by a single person. However, an SQL database is the next logical step if you want to store and manage larger amounts of data. Another plus: Increased security of your data. Multi-user capability, i.e. the ability for several people to work with the data at the same time, makes your production more professional and more efficient.

Databases are everywhere these days, even your Google searches are recorded in a structured way in a database. Considering the increasing amount of data we generate and have at our disposal every day, the importance of databases cannot be overlooked.

What an SQL database is and its functions

A database allows you to collect, store and manage data. For larger amounts of data, a database is worthwhile in any case, because you can keep track of all the data. Now you know what a database is. But what does SQL mean?

The “Standard Query Language” is the database language for relational databases. It is supported and used by almost all database systems. In addition, it has a simple structure and is based on the English language. An advantage is that SQL is case-insensitive. This means that the upper and lower case is unimportant. The editing and creation of database tables is done in SQL via the “Data Definition Language” (DDL). In addition, the SQL commands are simple in structure and in English.

However, it is important to know which functions an SQL database offers. So what can you do with such a database?

Defining a database means that a database and the different tables are basically created. One can also define the records and attributes. Editing a database includes the function of adding and removing records. In addition, individual attribute values can be changed. Querying a database is particularly interesting. With a simple command, you can search a database full of data for individual attributes and then display them separately. We will also discuss this function later in this article.

What is a database system?

A database system consists of the actual database and a database management system (DBMS). The database is only the physical data itself, but without DMBS no operations can be performed on it. The DMBS is basically just a software that enables operations on the actual database.

As you now know, SQL is the database language. To be able to use the functions mentioned above, you need a database system. In simple terms, a database system is a program that allows you to access and configure a database.

There are different database management systems. Among others, Microsoft SQL Server, MySQL, MariaDB and Postgres are well known. However, in this case we will use MySQL, which is one of the most popular and well-known options.

MySQL is free, widely used, easy to use and is available for all popular operating systems. It was developed in the mid-1990s and appeared in 2000. Other advantages are its extensive documentation and security. MySQL is considered to be particularly secure and stable, since you can encrypt your data extensively. It is also extremely flexible: there are interfaces to many scripting languages for web applications. The DMBS is under the GPL license (OpenSource), has a high storage volume and evaluates queries quickly.

Here is an overview of the most important advantages:

MySQL is recommended due to its longevity and popularity. It is perfect for getting started, so later in the article we will show you how to write machine data from an S7 to an SQL database and vice versa.

You would like to get a live insight into DataSuite 3?

In a live online demonstration, we will go into detail about the individual functions and answer any questions you may have. Together we will find out whether DataSuite 3 is suitable for your needs.

Creating a MySQL database for S7 machine data

In this chapter, we will show you step by step how to create a SQL database using MySQL to write machine data to and from a S7 PLC. First, you need the MySQL Community Server. With this version there are no costs and all important functions are included. You can find the link to the download here.

Select your operating system above and then click on the recommended download in the middle. After that, please select the lower of the two versions to download, as shown in this image:

Now you can start the download. If you are not interested in creating an Oracle account, you can simply click “No thanks” in the next window below. This will start the download automatically. After the download, the installer will open, select “Developer Default” to install all the necessary data. Since you need to pay attention to a few things during the installation, we recommend watching a YouTube tutorial that explains the installation in detail.

Next step: creating the database using SQL script

Once you have installed all the necessary files, you must first open MySQL Workbench. On the main page, you will see your connections. Click on the “plus” to add a new connection. Define a connection name and a username there. Then click on the connection and enter the password you set during the installation.

Now we can create our first own database using SQL script. To do this, enter the command shown in the screenshot, where the last part is the name.

Create the first table and enter data

Click on the left lightning bolt to execute the command. Now your database is already created, but still without content. Therefore, we will now create a first table. Here, we create a table with plant parts as an example.

create MySQL table
Create MySQL table

As you can see, the commands are all actually relatively simple. On this page, there is an overview of the most important MySQL commands.

To fill the table now, you can use the following commands:

insert data into MySQL database table
Enter MySQL data into table

Display table columns

The next screenshot shows the finished table in MySQL. With the command “select *” you can display all the data from your table:

display MySQL database table
Display MySQL table data

This table can now be used to enter machine data or also to read out the existing data.

Thanks to the functions of DataSuite, once you have created the database, you basically don’t need any SQL commands. While you can use commands you have written yourself, you can also use one of our templates to transfer data to and from a database. Strictly speaking, you do not need any SQL knowledge to do this. In the next step, we connect the SQL database to the S7 PLC.