Now You Can Have Data Logging Free

A data logger is also known as a data recorder or  data acquisition. It is a method to record data over a period of time and/or events.

The recorded information can come from sensors in the field. They can be digital or analog. With analog (voltage or current) we can measure temperature, pressure, sound, weight, length, etc. Digital data can be used for counts, times, events (motor overload), etc.

Data collecting can be time or event driven. Time based would be like collecting data every minute, shift, day etc. An event based collection would be from an error in the field such as an overload of a motor or a fault with a temperature controller.

Data mining / analysis is the most important part of the data logging.

Data mining / analysis is the way in which we look at the data and determine  what to do. Clustering is a method to look at the data in similar groups for comparison. An example of this would be the amount of material made on individual shifts in the plant.  Setting up the data logging in a way to examine the output over time is very helpful in determining methods to increase productivity in the manufacturing environment.

Time studies or observations are vital in the lean manufacturing world. Data logging can be useful in assisting with these studies. However, unlike the usual manual approach, this time study can be continuous.

Doing Time Observations

Data logging does not have to be expensive. It is also not as intimidating as it may sound.

The ‘Robust Data Logging for Free’ eBook is available in a free download. Just subscribe to ACC Automation to get the link for the free download.
 
This eBook will walk you though step by step on getting information into a database so you can start analysing the data. With traditional loggers, software will read the memory of the PLC and store in a local computer. If the network stops or the PLC communication fails then the logging will stop.
Creating a robust PLC data logger allows the communication to be stopped for a period of time without losing any of the data for collection. This is accomplished by storing the data locally on the PLC until communication is restored. All of the data is then read without loss. The amount of time that the connection can be lost will be dependent on the memory size of the PLC and the frequency of the data collected.
This series will walk you through the steps to create and implement a robust PLC data logger using the following equipment and hardware.
  • Automation Direct – Do-More – H2-DM1E PLC (Ethernet Modbus TCP)
  • Do-more Designer 1.3 (Simulator instead of PLC mentioned above)
  • Windows based computer running IIS
  • Visual Basic 6

Additional information on Omron Host Link Protocol and Indirect Addressing can be found in the eBook.

The ‘Robust Data Logging for Free’ eBook is available for a free download. Just subscribe to ACC Automation on the left side menu of the website to get the link for the free download.

Watch on YouTube : Now You Can Have Robust Data Logging For Free
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

How to Send Email to SMTP Server

Simple mail transfer protocol (SMTP) is the email protocol for sending information. We can take advantage of this ability to email from our data logged from the PLC. Shift reports on productivity can be automatically emailed to recipients. Faults or errors detected by the PLC can be emailed directly to individuals for correction.

We will use visual basic 6 (VB6) to send an email message to the SMTP Google Gmail server. Using this method we can use HTML code to format our messages. Attachments can also be added to the email message. In this example I have added the ACC icon file.

The first step is to add a reference to Microsoft CDO for Windows 2000 Library.  Project -> References

Make a simple form:

This will have one command button on it labeled “Send Mail”

The code for the command button will be as follows:
Private Sub Command1_Click()

Call SendEmail
End Sub

Add the following Sub SendEmail code to the project :
‘Sample code that is used to send emails from any SMPT server using CDO in Visual Basic 6.0.

‘Added a reference to the project by navigating to Project -> references and adding Microsoft CDO for windows 2000 Library.
Sub SendEmail()
On Error Resume Next ‘ Set up error checking
Set cdoMsg = CreateObject(“CDO.Message”)
Set cdoConf = CreateObject(“CDO.Configuration”)
Set cdoFields = cdoConf.Fields
‘ Send one copy with Google SMTP server (with autentication)
schema = “http://schemas.microsoft.com/cdo/configuration/”
cdoFields.Item(schema & “sendusing”) = 2
cdoFields.Item(schema & “smtpserver”) = “smtp.gmail.com”
cdoFields.Item(schema & “smtpserverport”) = 465
cdoFields.Item(schema & “smtpauthenticate”) = 1
cdoFields.Item(schema & “sendusername”) = “gclshortt@gmail.com”
cdoFields.Item(schema & “sendpassword”) = “password”
cdoFields.Item(schema & “smtpusessl”) = 1
cdoFields.Update
With cdoMsg
    .To = “gshortt@domtech.net”
    .From = “gclshortt@gmail.com”
    .Subject = “Send email to gmail”
    ‘ Body of message can be any HTML code
    .HTMLBody = “Test message using CDO in vb6 to Gmail smtp”
    ‘ Add any attachments to the message
    .AddAttachment “c:\AccDo.ico”
    Set .Configuration = cdoConf
    ‘ Send the message
    .Send
End With
‘Check for errors and display message
If Err.Number = 0 Then
      MsgBox “Email Send Successfully”, , “Email”
Else
      MsgBox “Email Error” & Err.Number, , “Email”
End If
Set cdoMsg = Nothing
Set cdoConf = Nothing
Set cdoFields = Nothing
End Sub

When you run the program you will get one of the following messages depending if the email was correctly sent or not.

Here is the message that arrives to the recipient:

Simple mail transfer protocol is an easy way to share information from the PLC data collected.
You can download the following VB6 sample code here.

Watch on YouTube : How to Send Email to SMTP Server
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.