Category Archives: management

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.

What Everybody Ought to Know About Speaking to Individual People

Talking to individuals is a complex thing. Everyone is unique and has something to contribute. It is up to use to find out what that is through the way we conduct ourselves. It boils down to our ability to modify our behaviour to allow our audience to feel safe so true communications and be done. We will go through some of the things that I have learned over the years. Some items I am still working. Lets get started.

Julian Treasure in this  June 2013 TED talk gives us some of the basic rules and sins to stay away from in speaking. He also lists some ideas in the toolbox that we can all learn to use. We as individuals need to change in order to speak more effectively.

Julian Treasure: How to speak so that people want to listen

Listen
Listening is a skill. I was always told ‘We have Two ears and One mouth… Listen twice the amount we speak’. Active listening involves understanding what the other is trying to communicate. Do not interrupt the other person. Listen with an open mind. That is to think about what they are saying. Understand their point of view and opinions. Do not sympathise, empathise with the other person.

Communicate in the way in which the listener wants to communicate
There are several personality profiles that people can use to label individuals.  Assessments like Meyers -Briggs and DISC profiling are good to establish and understand your own profile. These should be use only for your reference. Communication to other people involve speaking to them in the manner that they want. This is where your own personal judgement comes into play. You can divide everyone that you communicate with into four categories.  They can be either more or less emotional than you, and more or less dominant than you. We can plot this out like this: We communicate to the individual based upon how they are on this plot in our opinion only. If I was personally strong in dominant and less in emotional then everyone would that I would talk to would seem to me like the other 3 areas.  I would adjust the way I communicate to them so it matches the way I perceive them.
So how do we communicate:
More Dominant / Less Emotional (Dominant)
We would speak direct and decisive. They are problem solvers, risk takers and self starters. Keep in mind that they have a high ego. There is only one way to get from Point A to Point B: That is a straight line.

More Dominant / More Emotional (Influencing)
We would speak enthusiastically and optimistic. They are trusting, persuasive, talkative and impulsive.  Keep in mind that they want to be entertained. When asked how to get from Point A to Point B: They will ask ‘Who else is going?’, but will come up with an answer.

Less Dominant / More Emotional (Steady)
We would speak possessively and predictable. They are good listeners, team players, steady and friendly. Keep in mind that they are reliable, dependable, patient and good at reconciling conflicts. When asked how to get from Point A to Point B: They will ask what is the plan?

Less Dominant / Less Emotional (Correct)
We would speak accurate and precise. They are conscientious, careful, analytical and systematic. Keep in mind that they want to know everything about the issue before making a decision. When asked how to get from Point A to Point B: They would need more information.

Remember that people change all of the time. We need to adjust the way we speak to them based upon our current observations.

Watch on YouTube : Communicate in the way in which the listener wants to communiate

Observe the conversation on their side
We mentioned that we should empathise with the other person. This means that we put ourselves in the mind of the other person to determine the next step that they will take.  Everyone has a picture of what they are thinking. We need to ensure that we understand their picture and possibly help them paint a masterpiece with our information.

Make people feel safe. You can do this by making every one that you communicate with feel important. Think of it as a big, blinking neon sign on everyone’s forehead saying ‘Make me feel important’. Simon Sinek explains in this March 2014 TED Talk this same message.

Simon Sinek: Why good leaders make you feel safe

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.

Looking For Production Improvements – Then Do A Gemba Walk!

I recently went for a Gemba Walk with Ann Machan,  General Manager of Pentair. Instead of doing normal daily production meetings, their walk does everything you can do in a boardroom, plus so much more.

What is a Gemba Walk?
http://www.gembawalk.com/the-gemba-walk/

We met in her office and were explained the KPI (Key Performance Indicators) for the operation of the plant.  Each of these KPI’s are posted at each department where the work happens and are on a large white board.

The walk each morning starts at the shipping office with the rest of the staff. The operator in shipping  discusses how their department has done in the last 24 hours in relation to the KPI. Questions are raised about the next 24 hours and possible issues. Before we leave this department Ann asks a few personal questions to the shipper. He answers and they start to laugh. It is obvious that they have a good relationship in which information can flow freely.

Splitting up the group into three different teams to cover the entire plant, the walk continues. We went to three additional departments where again we were shown the KPIs and how they related to the department. Notes were taken and questions asked about possible issues and current problems. Information was exchanged from the previous days problem with the solution for one that was to be implemented that afternoon.

We assembled back all together in a central location in the plant. A large board with people’s names (Responsible for Department) was listed on the left side and twenty one numbers were written on the top representing three weeks. The current week that they were on, followed by the next two weeks. This grid pattern was where they then discussed the walk and the issues raised. To the right of the board a chart was placed. This chart contained the total number of problems/issues solved for each department and total company. A graph was also displayed showing the growing trend. Underneath this chart were the KPI charts that all showed either sustained or improved performance.

We started with the previous days issues under yesterdays date. A status update was given and the posted note was moved to either the completion clip at the side or put under a future date. When this was complete, a representative of each of the three groups when through their list of issues. These were then assigned and placed on the board. Problems that required additional investigation were discussed briefly and then the 5 why process was assigned to the person who had the greatest knowledge.

This whole process took about one hour. The Gemba walk accomplished the following:

  • Everyone’s understanding on the current company situation based upon the KPIs
  • Everyone knowing exactly what is expected
  • Everyone taking pride and knowing they are doing a good job
  • Everyone knowing someone is there to help

I found the whole experience of the Gemba walk fascinating. It is the only way that I see that you can have clear lines of communication to all staff. The way in which to grow as a company is to learn from our workers and in turn we will teach them.  It was an opportunity to:

  • See the work being done
  • Experiment with ideas
  • Learn from all parties involved
  • Explain why things are this / that way
  • Watch what is being done

Take your own Gemba walk on your production floor. Let me know how it turns out.

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.