ACC, COMMUNICATION, DIGITAL, HMI, MANUFACTURING, MODBUS TCP, PLC, PROGRAMMABLE LOGIC CONTROLLER,
PROGRAMMING, PROGRAMMING EXAMPLE, UNCATEGORIZED
We will continue the series by looking at a sequencer controlling seven cylinders that can be taught. The
cylinders can be operator programmed from the AdvancedHMI screen. You will be able to select what
cylinders to activate at each step and program in 500 steps. Our PLC will be the Do-More from
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 1/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Automation Direct.
Here is a quick review of the programming series so far. If you are new to the site, we recommend
reviewing the other parts in the series rst.
Inpart 1we looked at writing PLC programs to control a traf c light using discrete bits and then using
timed sequencing using indirect addressing.
Part 2 used indirect addressing for inputs as well as output to control the sequence of pneumatic (air)
cylinders in the program. Part 3 and 4 we returned to the traf c light application and expand our
program signi cantly. We looked at the sequence of operation using Input, output and mask tables.
In part 5 we used the AdvancedHMI software to create the game of Simon. A round in the game consists
of the device lighting up one or more buttons in a random order, after which the player must reproduce
that order by pressing the buttons. As the game progresses, the number of buttons to be pressed
increases.
We will be using AdvancedHMI to communicate Modbus TCP to the Automation Direct Do-More
Designer Software Simulator. The following is the sequence of operation:
Watch on YouTube : Running the Cylinder Sequence (PLC / HMI)
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 2/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Note:All of the programsused areprovided free of charge and are an excellent way to learn PLC / HMI
programming.
The following table is the Modbus TCP memory map to the Do-More PLC:
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 3/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Here are the inputs and outputs we will be using for our program:
Run/ Jog Selector 00008 / 00015 Input/ Output MC8 / MC15 MC8 is the value and
MC15 is the click
Light Stack 00010 / 00009 / Output MC10 / MC9 / Red / Green / Amber
00008 MC8
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 4/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Cylinder 1 to 7 set 00041 to 00047 Input MC41 to MC47 Set the cylinder button
(click)
Cylinder 1 to 7 retract 00021 to 00027 Input MC21 to MC27 Indicate cylinder has
indicators retracted
Cylinder 1 to 7 extend 00031 to 00037 Input MC31 to MC37 Indicate cylinder has
indicators extended
Cylinder 1 to 7 extend 00050 to 00063 Output MC50 to MC63 Indicate cylinder input
/ retract error indicators error when jogging
The rst thing we will do is design the HMI. We have three main areas on the screen. Basic Controls,
Cylinder Visualization and the Sequence Step/Teach area. Please refer to the above reference chart for
the inputs and outputs programmed on the screen.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 5/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Basic Controls:
This area will allow us to see what mode we are in via the stack light. Red Stop
Yellow Jog / Teach Mode Troubleshooting
Green Run
Cylinder Visualization:
Each cylinder will have indication lights to determine status of the cylinder. (Extended / Retracted)
The cylinder will also have red indication lights to re ect the differences between the current sequence
and the next sequence step. This is visible when we are in jog mode.
Sequence Step/Teach:
When in jog or teach mode the sequence step is visible, which indicates the current step that we are on.
The inputs and outputs are displayed as a binary value which represents the actual inputs and outputs.
This is valuable when troubleshooting and nding errors in the system. The set button is visible when in
teach mode. When pushed the outputs and inputs are set for that step and the sequence will then
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 6/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
increment.
The following is the code for each of the words that the DataScribers are reading. This includes the code
to change the word into a 16 bit binary value.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 7/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Label4.Visible = True
Label5.Visible = True
Else
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
End If
End Sub
We will now look at the PLC ladder program. The program is broken down into several parts as follows:
ACC Automation
This is the main start / stop circuit of the program.
If we are in run mode the green light will be on. (MC9)
If we are not in jog mode (MC8) this circuit will be functional.
If we are not run mode (MC9) or in jog mode (MC8) then the stop mode is active.
This will turn on the red light. (MC10)
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 8/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 9/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Reset the sequencer pointers. This will happen automatically in run mode or by hitting the reset button
in jog or stop mode.
Teach Function
This rst rung will activate the values so we can manually turn them off/on with the HMI screen.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 10/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
This will reset the pointers when going into teach mode.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 11/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
This will set the teach point and increment to the next step.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 13/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 14/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Set the actual inputs / sequencer inputs / sequencer outputs so we can monitor this on the HMI.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 15/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 16/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Diagnostic Bits for indicating the difference for the inputs to the PLC. This will show up as a red
indication light on the cyclinder represented on the HMI.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 17/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 18/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
This section of PLC logic will mimic the inputs from the cylinders.
Cylinder 1 Retract MC21 (00021) Extend MC31 (00031)
Cylinder 2 Retract MC22 (00022) Extend MC32 (00032)
Cylinder 3 Retract MC23 (00023) Extend MC33 (00033)
Cylinder 4 Retract MC24 (00024) Extend MC34 (00034)
Cylinder 5 Retract MC25 (00025) Extend MC35 (00035)
Cylinder 6 Retract MC26 (00026) Extend MC36 (00036)
Cylinder 7 Retract MC27 (00027) Extend MC37 (00037)
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 19/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Between each funtion of the cylinder there is a time delay for the input to turn on and off of 500msec.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 20/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 21/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 22/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 23/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 24/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 25/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
This is the end of the PLC program. You can see that the program is not very complicated once you break
down the individual steps.
Download the PLC program and the Bin directory for the AdvancedHMI screen.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 26/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
Watch on YouTube : Building a PLC Program that You can be Proud Of Part 6b Explaining the
Program
If you have any questions or need further information please contact me.
Thank you,
Garry
If youre like most of my readers, youre committed to learning about technology. Numbering systems
used in PLCs are not dif cult to learn and understand. We will walk through the numbering systems
used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.
First Name:
SIGN UP
Use the information to inform other people how numbering systems work. Sign up now.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 27/28
11/19/2017 Building a PLC Program That You Can Be Proud Of Part 6 | Acc Automation
The Robust Data Logging for Free eBook is also available as a free download. The link is included when
you subscribe to ACC Automation.
http://accautomation.ca/building-a-plc-program-that-you-can-be-proud-of-part-6/ 28/28