Categories
Click Click PLUS Communication EasyPLC EasyPLC Machine Simulator Modbus TCP PLC PLC Learning

Click PLC Simple Conveyor EasyPLC

The Machine Simulator (MS) is part of the EasyPLC software suite. It has many built-in machines that can be programmed. A simple conveyor is one of these machines. This is usually the starting point for learning about the machine simulator. This conveyor example will use two digital inputs and two digital outputs. A pallet will move back and forth on the conveyor. When the pallet is detected on each end it will stop and reverse direction. If both motors are started at the same time, the motors will burn up. This will be demonstrated. The machine simulator will allow you as the programmer to make mistakes before trying your program in the physical world.
Click PLC Simple Conveyor EasyPLCThe Click PLC will be used to program this virtual machine. Using the Click Plus PLC, we will connect the simulator to the simple conveyor machine. This will be done using Modbus TCP (Ethernet) for communications. Using the five steps for program development we will show how this is programmed. Let’s get started.

Categories
AdvancedHMI Analog BRX Do-More Click Communication Do-More Do-More Designer Factory IO HMI Horner XL4 HostLink Modbus RTU Modbus TCP Omron CP1H PLC PLC Learning Sensors Visual Studio - VB.Net

ACC Automation 2017 Review

ACC Automation


We would like to take a few minutes and reflect on the past, current and future of ACC Automation. 2017 has been our best year yet thanks to you. Your questions, comments and suggestions have helped us to build the site that you see today.
Thank you.

Categories
Articles Communication PLC Basics PLC Learning

Three Free PLC Programming Software Tools

Every manufacturer has there own software to program the programmable logic controller (PLC) or the human-machine interface (HMI). However, there are a few tools that are free which will help in the development of your PLC programs. We will look at three of these software tools and show how beneficial they can be to you.


Free PLC Software Tools
Synergy – Share Multiple Computer Systems

When programming, I usually will have my laptop for the ladder logic and my desktop for the screen software. Connecting the two together and using one mouse and keyboard saves me the aggravation of switching back and forth between the keyboards.
Synergy - Three Free PLC Programming Software Tools

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems each with its own display without special hardware. It is intended for users with multiple computers on their desk since each system uses its own monitor(s). Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. It works on Windows, Mac OS X, and Linux.

Synergy Website
http://synergy-project.org/
Downloads:
Synergy for Windows:
http://download.cnet.com/Synergy/3000-2072_4-10714570.html
Synergy for Mac
http://download.cnet.com/Synergy/3000-2094_4-75362427.html

Windows Calculator – Free PLC Software Tool

That’s right. The windows calculator can be a very helpful tool when it comes to programming PLCs. When you need to convert, hexadecimal to binary, BCD to hexadecimal or any other combination the windows calculator can do it for you.

What everybody ought to know about PLC numbering systems.

Start the calculator. Start – All Programs – Accessories – Calculator
Calculator - Three Free PLC Programming Software Tools

View the programmer calculator. View – Programmer (Alt + 3)
Calculator 02 Programmer

We can then choose Hex for our numbering system. Then Word for our length of the address. You will notice that the display will show the Bin equivalent along with the marking of bit 0 to bit 15.
Calculator - Three Free PLC Programming Software Tools

7ABC base 16 = 0111 1010 1011 1100 base 2 = 31420 BCD
Calculator - Three Free PLC Programming Software Tools

Note: I am using Windows 7, but all of the versions of window calculator have similar functionality.

Windows HyperTerminal – Free PLC Software Tool

Serial communication can be difficult using PLC. HyperTerminal can be used to monitor the communication being sent from or to the programmable logic controller. Just hook up to the serial port and program HyperTerminal to monitor the port. Set the correct Data Bits, Baud Rate, Parity, Stop Bits, etc. Viewing the information on the monitor will assist you in seeing the exact data being sent to, or received by the PLC.
HyperTerminal - Three Free PLC Programming Software Tools

HOW TO IMPLEMENT THE OMRON PLC HOST LINK PROTOCOL

Hype Terminal – Windows 7 and 8

HyperTerminal was no longer sent with windows when Windows 7 was introduced.

Hype Terminal is fully functional replacement of HyperTerminal, perfect for GSM and GPS debugging, works with AT Commands. You can use Hype Terminal to help debug source code from a remote terminal. You can also use Hype Terminal to communicate with older character-based computers. Hype Terminal is designed to be an easy-to-use tool and is not meant to replace other full-feature tools available on the market.
Three Free PLC Programming Software Tools

Download Hype Terminal:
http://download.cnet.com/Hype-Terminal/3000-2086_4-76158601.html

Watch on YouTube: Three Free PLC Programming Software Tools

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.


Categories
Articles Communication Do-More Do-More Designer PLC PLC Learning

Here’s is a way to send email text messages PLC

Sending email messages from the PLC sounds like an easy task. However, very few applications do this on the production floor. This is probably due to the networks involved and using authentication can be complicated. In our example, we will use a restricted Gmail SMTP server so no authentication will be required. We will walk through sending email and text messages from the PLC to Google Gmail. Once in your Gmail account, the message can be automatically forwarded to another verified email or SMS text message address.
Here’s is a way to send email text messages PLC


Note:
Google is removing “Less Secured Apps” in the mail app. (Gmail) If you are using this to send email from your controller, you must enable 2-step verification. This will then give you the option to generate an “App Password” for your controller or program.
Gmail Less Secure App Access – App Passwords

SMPT – Google – PLC Send Email Text Messages

Simple Mail Transfer Protocol (SMTP) is an internet standard for email transmissions.

Google provides three different SMTP settings in which you can send email messages from a printer, scanner or application (PLC).

  1. SMTP relay service – used to send mail from your organization by authenticating with the IP address(s). You can send messages to anyone inside or outside of your domain.
  2. Gmail SMTP server – requires authentication with your Gmail/Google Apps account and password. Messages can be sent to anyone inside or outside of your domain.
  3. Restricted Gmail SMTP server – does not require authentication, and you will be restricted to send messages to Gmail or Google Apps users only.
Restricted Gmail SMTP Server – PLC Send Email Text Messages

We will use a restricted Gmail SMTP server to send emails and text messages. This is located at aspmx.l.google.com. This does not require authentication so a greater number of PLCs will be able to communicate to the server.

If you do not have a Google Gmail Account then you will need to set up this free service. Google Email Account

Now start the Do-more Designer software. This is available free of charge and is a fully functional package complete with a simulator. We will be using the simulator for our example. The actual Do-More PLC will have to have an Ethernet connection onboard connected to the internet. (H2-DM1E)

System Configuration – PLC Send Email Text Messages

Start a new project with the simulator or an existing project that has a connection to the internet.

Under ‘Project Browser’: ‘Tools’ select ‘System Configuration’
Here’s is a way to send email text messages PLC

In ‘CPU Configuration’ verify the IP address and NetMask. This will be automatically populated when using the Do-more Simulator.
Here’s is a way to send email text messages PLC

Hit the “Configure…” button if the IP address needs to be modified.
Here’s is a way to send email text messages PLC

In ‘System Configuration’ select ‘Device Configuration’
Here’s is a way to send email text messages PLC

Select “New Device” (If you do not already have an SMTP Client (Email) configured. If you do then select it and hit “Edit Device”)
Here’s is a way to send email text messages PLC

Select ‘SMTP Client (Email)’ and hit ‘OK’

Beside the ‘Device Name’ enter a name for the Email Client. Ex: @MyEmailClient Beside the ‘SMTP Server IP Address’ hit the ‘DNS Lookup…’
Here’s is a way to send email text messages PLC

Beside the URL: enter the server address aspmx.l.google.com and then hit ‘Lookup’. This will retrieve one of the IP addresses of the server. Then press ‘Select’ to return this address to the configuration page.
Here’s is a way to send email text messages PLC

Ensure that the SMTP Server Port is set for 25. This is the default port setting. The Timeout setting can be left at 30 seconds. This is the amount of time for the PLC to wait before setting any error message. Enter your ”‘From’ Email Address” – Enter your Google Gmail account address. Select ‘OK’ to end the configuration. Here’s is a way to send email text messages PLC
Ensure that authentication is disabled.

Now that we have our email client device ‘@MyEmailClient’ set up we can move onto programming the Email messages.
Here’s is a way to send email text messages PLC

Ladder Logic Program – PLC Send Email Text Messages

We use the EMAIL instruction in the PLC to send the messages. We will send two messages; one will be an email and the other an SMS text message. The subject line will be different to distinguish the two.

Here is the PLC program for sending both messages.
Here’s is a way to send email text messages PLC

You will notice that the messages are triggered by a one shot.
Here’s is a way to send email text messages PLC

Do-More Prog12 GMail Text
Notice in the message we combine text with actual word and bit addresses that we want to send. The help function in the Do-more Designer software can provide further information.


Testing the Program – PLC Send Email Text Messages

Running the program and triggering the messages will send the Email to your google account.
Gmail 01 Email

You will notice if you open the message, a warning is given. ‘This message may not have been sent by’ appears because authentication is turned off. We can just ignore this message.
Gmail 02 Email Message

We need to now set up the Email forwarding to any account.

Under the gear sign in Google Gmail select the ‘Settings’.
Gmail 03 Email Settings

Select ‘Add a forwarding address’
Gmail 04 Add a forwarding address

This will bring up a dialogue to now forward Email to a specific account. During this process, a verification code will be sent to this address. You must enter this code for validation or respond to the Email in order for the forwarding address to work.
Gmail 05 Add a forwarding address

Email to SMS Gateways can be used to forward your message in a text format. Here is a website that will show a List of Email to SMS Gateways.

Here are some that we use in Canada: Example: 613-451-0104 on Rogers network = 6134510104@sms.rogers.com

  • number@txt.bellmobility.ca
  • number@sms.wirefree.informe.ca
  • number@sms.fido.ca
  • number@msg.telus.com
  • number@sms.lynxmobility.com
  • number@text.mtsmobility.com
  • number@mobiletxt.ca
  • number@sms.rogers.com
  • number@sms.sasktel.com
  • number@vmobile.ca
  • number@txt.windmobile.ca
  • number@sms.wirefree.informe.ca

Once we have the forwarding address in and verified, we can move onto the last step, which is creating a filter. The filters will allow automatically look at the incoming Email message and perform an action on the message. In our case, we will be forwarding the message.

Under the settings menu, select ‘Filters’ and then ‘Create New Filter’
Gmail 06 Settings Filters

The first page contains the items that we are looking for in the filter. Fill in the address of the sender, which will be our Gmail account and the subject. The subject will be ‘ACC PLC _ GMail Text’.
Gmail 07 Settings Filters

Select ‘Continue >>’

Our filter parameters appear at the top of the screen. Now we can determine what to do when a message arrives.
Gmail 08 Settings Filters

  • Mark as read
  • Forward it to (Select forwarding address)
  • Never send it to Spam

You can create as many filters as you wish. Sending to multiple accounts requires only to repeat the filter with the additional email addresses.

In the above example, we used a restricted Gmail SMTP server. No authentication was required so we can send an email with only an internet connection to the PLC.

Watch on YouTube: Here’s is a quick way to send email text messages from the PLC

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.


Categories
Do-More Do-More Designer PLC PLC Basics PLC Learning

PLC Programming Example – Process Mixer

We will apply the five steps to PLC Program development to our following programming example of a process mixer.
The process mixer will be programmed using ladder logic. We will discuss each step of the PLC program development.

1 – Define the task:
How does the process mixer work?

PLC Prgramming Example - Process Mixer



A normally open start and normally closed stop pushbuttons are used to start and stop the process. When the start button is pressed, solenoid A energizes to begin filling the tank. As the tank fills, the empty level sensor switch closes. When the tank is complete, the full-level sensor switch closes. Solenoid A is de-energized. The mixer motor starts and runs for 3 minutes to mix the liquid.  When the agitate motor stops, solenoid B is energized to empty the tank. The empty sensor switch opens to de-energize solenoid B when the tank is empty. The start button is pressed to repeat the sequence.

2 – Define the Inputs and Outputs:
What sensors will be used in the PLC program?

Inputs:
Start Pushbutton – Normally Open – On/Off
Stop Pushbutton – Normally Closed – On/Off
Empty Sensor Switch – On/Off
Full Sensor Switch – On/Off
Timer 3 minutes done bit – On/Off (Internal)

Outputs:
Mixer Motor – On/Off
Solenoid A – Fill – On/Off
Solenoid B – Empty – On/Off
Timer 3 minutes – (Internal)

3 – Develop a logical sequence of operation:
How the PLC example program is to solve the logic.

A flow chart or sequence table is used to understand the process entirely.  It will also prompt questions like the following.

What happens when electrical power and/or pneumatic air is lost? What happens when the input / output devices fail? Do we need redundancy?

Knowing all of these answers upfront is vital in developing the PLC program. This is the step where you can save yourself a lot of work by understanding everything about the operation. It will help prevent you from continuously re-writing the PLC logic.

Process Mixer - Sequence Table

4 – Develop the PLC program
Writing the PLC sample ladder logic program for the process mixer.

Since we need to continue the sequence when the power goes off, memory retentive locations in the PLC must be used. In our example, we will use the ‘V Memory’ areas.

The first thing in our program is to control the start and stop functions. This is done through a latching circuit. From the sequence table, we know that we need to have the timer done and the empty sensor off to reset the sequence.Process Mixer Program 1

The filling of the tank is done through Solenoid A. It is turned on by the start signal and off by the full sensor switch. (Sequence Table) You will notice that we have a memory retentive output and the actual output to activate the solenoid.Process Mixer Program 2

The retentive memory timer will start timing when we have the start sequence signal and when the empty and fill sensors are on. The timer will reset when the empty and fill sensors are off. The mixing motor will be on when the timer is timing and when the timer is not done.Process Mixer Program 3

Solenoid B turns on to empty the tank when the timer is done, and the full and empty sensors are on. It will reset when the empty sensor switch goes off.Process Mixer Program 4

5- Test the program
Simulate the PLC program of the Process Mixer

 

PLC Programming Example - Process Mixer

Test the program under many conditions. Check to see what happens when power is removed.

Using this five-step program development technique will shorten your programming time. The result will be a better-defined logic and easier to understand the program because it has within the documentation the logic flow chart or sequence table.

Watch on YouTube: PLC Programming Example – Process Mixer

Testing of the program is essential and should be done in various ways. Factory IO provides a 3D simulation of the process. Factory IO provides a straightforward method of seeing your program in action before you wire your application.

We will be using the BRX PLC Modbus TCP Server (Slave). Factory IO will be the Modbus TCP Client (Master). When the tank fills up, we will start a dwell time instead of the mixer time for the simulation.
Here is the mapping of the inputs and outputs using Factory IO.

Factory IO Website is at the following URL:
https://factoryio.com/
Documentation is well done. Start at the ‘Getting Started’ at the following URL:
https://factoryio.com/docs/

You can download the PLC program and Factory IO scene here.

Watch the following video to see this simulation in action.

Watch on YouTube: Process Mixer Test Simulation

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 PLCs are not challenging 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 for free download. The link is included when you subscribe to ACC Automation.


Categories
Do-More Do-More Designer Outputs PLC PLC Basics PLC Learning Sensors

How PLC Outputs Work – Discrete and Analog

This post is a further follow-up from my original ‘Here’s a Quick Way to Understand PLC Inputs and Outputs’. There are basically two different kinds of PLC outputs, Discrete and analog. Discrete outputs are either ‘ON’ or ‘OFF’; 1 or 0. You can think of them as a single light bulb. Analog outputs have a range to them. They are outputs that usually will control proportional valves, drive speeds, etc. They usually have one of the following signals that are outputted from the PLC: 4-20mA, 0-10VDC, 1-5VDC.


PLC Discrete Outputs – On / Off


How PLC Outputs Work - Discrete and Analog

The above diagram has three outputs. A coil, light, and motor. The Ladder outputs Y0, Y1, and Y2 control the outputs respectfully. You will notice that when the Ladder output turns on, the corresponding output card bit LED turns on. This then will energize the output hardwired to the device.

The outputs are turned on or off at the end of every PLC Scan. The PLC logic is solved left to right, top to bottom in most PLCs. Physical outputs are not set/reset until an I/O refresh is performed at the end of every scan. This means that if I have a scan of 1msec, then the maximum time it will take to turn on/off the output is 1msec.

PLCs will sometimes have the ability to update the I/O in the middle of a scan. Please refer to your PLC manufacturer’s manual for this instruction. This can be used for updating the I/O quickly or controlling stepper drives for motors by giving them a pulse train output from the discrete PLC output. A pulse train is just a quick series of on/off states of the output.

PLC Analog Outputs – Range of Output


How PLC Outputs Work - Discrete and Analog

An analog output converts a digital value to a voltage or current level that can be used to control (vary) physical outputs. In the example above we are controlling the speed of the motor. Words in the PLC will control the analog value.
Example:
4 – 20 mA current Output – 8-bit resolution
4 mA = 00000000 base 2 = 00 base 16
20 mA = 11111111 base 2 = FF base 16
For a review of numbering systems, follow the link below:
What Everybody Ought to Know About PLC (Programmable Logic Controller) Numbering Systems

In the industrial environment noise from variable frequency drives, improper grounding, etc. can interfere with your analog input. The following post will show a quick method to reduce this noise.
The Secret Of Getting Rid Of Noise On Your Analog Signal

Previous Post:
How PLC Inputs Work

Watch on YouTube: How PLC Outputs Work

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.

How PLC Outputs Work - Discrete and Analog

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