AutomationDirect Technical Support
AutomationDirect | Direct Sales in US and Canada | 1-800-633-0405

Example Programs AutomationDirect Logo


 

We supply these programs as examples of how to apply the various instructions in our PLC’s. Please try to use these examples in their original form before modifying them for your particular application. We have had many calls claiming that the examples don't work and found that a mistake had been made when the example was re-entered by hand. The examples posted here have been run on equipment in our lab. If you are having difficulty with one of the examples check the following:

  • Have changes been made and are they correct?
  • Look at the title page for any special instructions.
  • Is the example the only thing executing in the CPU and has the CPU gone from PROGRAM mode to RUN mode to allow the first scan logic to run?
  • Does the CPU type and I/O match the example?

If you still have problems give us a call.

Thank you - The AutomationDirect Technical Support Team

THE INFORMATION PROVIDED IN AUTOMATIONDIRECT TECHNOTES IS PROVIDED "AS IS" WITHOUT A GUARANTEE OF ANY KIND. These documents are provided by our technical support department to assist others. We do not guarantee that the data is suitable for your particular application, nor do we assume any responsibility for them in your application.

Directory:

  • General Examples
  • Communications Examples
  • Counter Examples
  • Operator Interface Examples
  • Software Examples

Please note: additional sample programs for C-more Operator Interface panels can be found at the c-more.automationdirect.com site.

Instructions: The program you will download depends on which CPU you have. Find your CPU in the colored columns on the right, and click the WinZIP icon WinZIP Archive to download the right example program. The absence of an icon for a given CPU means that the example is not applicable for or will not work with that CPU.

General Examples

05

06

105

205

305

350

405

CLICK

Productivity

Do-
more

EP-MISC-001 Ladder example code that will adjust the PLC's clock for Daylight Saving Time.
Notes:
For DirectLogic, only the 250/260/262, 350, 450/454 processors have a real time clock.
The DL05 example will only work if you have the optional D0-01MC installed.
The Basic CLICK PLCs do not have a real time clock.
WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive
EP-MISC-002 This file shows how the square root of a value between 1 and 9999 could be calculated. The resulting value has 2 implied decimal points. The square root is determined by using an iterative approximation, and therefore this algorithm requires a long time to execute.
  WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive      
EP-MISC-004 This example shows how to convert the current value of a timer or counter so that it appears to count down instead of up. This is useful for displays on an operator interface or for relational contacts to trigger an action at a low limit.
WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive   WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive
EP-MISC-005 This project uses two buttons pushed together for three seconds to latch an output.
WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive   WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive
EP-MISC-006 This is a simple example of how to use pointers.
WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive   WinZIP Archive  
EP-MISC-007 This program utilizes a pointer routine to store the accumulated time of T0 into successive double word V-memory locations beginning at V2000. Each time C0 changes from OFF to ON the accumulated time is loaded into the current memory location pointed to then the pointer location is incremented by 2 for a double word. This program is coded for the D2-250 Using Pointers it shows how to increment and move through a series of registers.
  WinZIP Archive   WinZIP Archive         WinZIP Archive  
EP-MISC-008 This project will create a table of values generated by measuring the times an input is energized.
WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive   WinZIP Archive WinZIP Archive   WinZIP Archive  
EP-MISC-009 This program shows how to implement a push-down stack in ladder using the MOV instruction.
WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive   WinZIP Archive WinZIP Archive      
EP-MISC-010 DL450 PLC Only. This program calculates the Standard Deviation on a Table of 10 BCD Double Words. See readme.txt inside the ZIP file for more details
            WinZIP Archive      
EP-MISC-011 Calibrating analog I/O with a non-zero starting point
WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive   WinZIP Archive  
EP-MISC-012 Off-Delay Timer WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive   WinZIP Archive WinZIP Archive PDF Document PDF Document PDF Document
EP-MISC-013 Adding two tables using consecutive V-Memory locations with pointers WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive
EP-MISC-014 How to create a FIFO (First In First Out) Stack WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive
EP-MISC-017 Creating a Non-linear function with look-up table   WinZIP Archive                
EP-MISC-018 This example provides a 24-hr clock value for use in Time-of-day operations.   WinZIP Archive             WinZIP Archive  
EP-MISC-019 Program showing various functions using ladder vs Iboxes       WinZIP Archive            
EP-MISC-021 PLC controlled motor latching program               WinZIP Archive WinZIP Archive  
EP-MISC-022 Analog scaling and negative number math       WinZIP Archive            
EP-MISC-023 Do-more introduction example                   WinZIP Archive
EP-MISC-024 How to create a FIFO (First In First Out) Stack in Do-More                   WinZIP Archive
EP-MISC-026 Change Do-More IP address data into addresses displayable in C-more                   WinZIP Archive
EP-MISC-027 Executing logic based on time of day in Do-More                 WinZIP Archive WinZIP Archive
EP-MISC-028 Changing daylight savings flag in Do-More                   WinZIP Archive
EP-MISC-029 Convert timer accumulator to hours/minutes/seconds countdown WinZIP Archive WinZIP Archive   WinZIP Archive       WinZIP Archive WinZIP Archive WinZIP Archive

 

Communications

05

06

105

205

305

350

405

CLICK

Productivity

Do-
more

EP-COM-001 Example of how to configure port 2's communication parameters.
PDF Document PDF Document   PDF Document Link PDF Document PDF Document      
EP-COM-002 This program shows how communication errors can be detected when using the RX and WX instructions.
WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive      
EP-COM-003 Networking multiple GS drives with the standard instruction set in the DL05 and D2-250
WinZIP Archive WinZIP Archive   WinZIP Archive     WinZIP Archive      
EP-COM-004 Networking multiple GS drives with the new Modbus instruction set in the DL06 and D2-260
  WinZIP Archive   WinZIP Archive            
EP-COM-005 Master project:
This project contains simple logic for reading the inputs from an DL05 / 06 slave and placing their status in C0-C17 in the master. It also writes C20-C37 to the outputs on the slave.
Slave project:
This project can be used in conjunction with the master project to setup the slave to turn off its outputs if the master PLC stops communicating with it.
WinZIP Archive WinZIP Archive           WinZIP Archive WinZIP Archive  
EP-COM-006 An example program for the D2-250 CPU and the ERM to communicate with an HA-EDRV2 and a SJ100 Hitachi drive
      WinZIP Archive            
EP-COM-008 Ladder example for receiving ASCII input. Typical application would be a bar code scanner or weight scale that sends data to the PLC and does not require any communication from the PLC
  WinZIP Archive   WinZIP Archive       WinZIP Archive WinZIP Archive  
EP-COM-009 Ladder example for sending commands to an SCL stepper drive from port 2 of a D2-260       WinZIP Archive            
EP-COM-010 Ladder example for sending commands to an SCL stepper drive from port 2 of a CLICK PLC               WinZIP Archive    
EP-COM-011 How to print without leading zeroes (D2-250, D2-250-1)       WinZIP Archive            
EP-COM-012 ASCII Receive and Send example               WinZIP Archive WinZIP Archive  
EP-COM-013 ASCII String Creation with checksum                 WinZIP Archive  
EP-COM-014 Ladder example for sending commands to an SCL stepper drive from the Do-more PLC serial port                   WinZIP Archive
EP-COM-015 Do-more to Viewmarq date/time write example                   WinZIP Archive
EP-COM-016 Program to send a message once a minute and embedded variable every second from D0-05 to Viewmarq panel WinZIP Archive                  
EP-COM-017 Program to send a large message once a minute and embedded variable every second from D0-05 to Viewmarq panel WinZIP Archive                  
EP-COM-018 Set up of IP address using V memory locations in Do-more                   WinZIP Archive
EP-COM-020 RS-485 example for Productivity                 WinZIP Archive  
EP-COM-021 D2-260 to Protos-X communications example with watchdog       WinZIP Archive            
EP-COM-022 P3000 to Protos-X communications example with watchdog                 WinZIP Archive  
EP-COM-023 Do-More to Protos-X communications example with watchdog                   WinZIP Archive
EP-COM-024 CLICK to Protos-X communications example with watchdog               WinZIP Archive    
EP-COM-025 DoMore to SR55 communications example                   WinZIP Archive
EP-COM-026 DirectLogic to SR55 communications example WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive      
EP-COM-027 CLICK to SR55 communications example               WinZIP Archive    
EP-COM-028 Ladder example for sending commands to an SCL stepper drive from RS232 port 1 of a Productivity Series PLC                 WinZIP Archive  
EP-COM-029 TCP Client and Server projects for Productivity                 WinZIP Archive  
EP-COM-030 UDP Client and Server projects for Productivity                 WinZIP Archive  

 

Counters

05

06

105

205

305

350

405

CLICK

Productivity

Do-
more

EP-CT-001 Example of how to calculate RPM for a device connected to the High Speed Counter inputs on the 105 CPU.
    WinZIP Archive              
EP-CT-002 This app shows how to combine Straight Velocity and Accel/Decel profiles in mode 30.
      WinZIP Archive            
EP-CT-003 This file that contains two projects for 105 mode 30 pulse output; one for trapezoidal profile and one for registration. These projects are enhancements of the examples show in the manual on pages 3-31 and 3-34 in that they provide logic for using a momentary start pushbutton instead of a maintained button.
    WinZIP Archive              
EP-CT-004 CTRIO programming examples for Pulse Output functions
      WinZIP Archive            
EP-CT-005 Making both quadrature counting channels of a CTRIO retentive on power cycle       WinZIP Archive            
EP-CT-006 Example program for making 2 CTRIO modules in an 06 retentive on power cycle   WinZIP Archive                
EP-CT-007 Example program for counting/rate using interrupt input on DC input Click PLC               WinZIP Archive    
EP-CT-008 Example program for making a single CTRIO channel retentive on power cycle       WinZIP Archive         WinZIP Archive  

 

Operator Interface

05

06

105

205

305

350

405

CLICK

Productivity

Do-
more

EP-VM-001 Collection of example programs for Do-more, Click, and P3000 PLCs to send messages to the Viewmarq panels               WinZIP Archive WinZIP Archive WinZIP Archive
EP-OP-001 Example of how to detect that the Optimation panel is no longer communicating from within the CPU.
WinZIP Archive WinZIP Archive WinZIP Archive WinZIP Archive   WinZIP Archive WinZIP Archive      
EP-OP-002 This app note shows how the date & time can be changed using the OP-1510 panel. It only works in the 250, 350, 440 & 450 CPU with the date & time instructions.
  WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive      
EP-EZ-001 This example has an EZ Touch project and a DirectSoft32 Ladder program that shows how to set the PLC Clock for the (250,350,440,450 and 05(with optional D0-01MC module installed)) using the DATE and TIME instructions.
WinZIP Archive WinZIP Archive   WinZIP Archive   WinZIP Archive WinZIP Archive      
EP-EZ-002 These two files are an example for the EZ-TEXT panels and DL205 PLC family that gives several demonstrations of how to use the panel for viewing and changing messages and data, for emergency messages controlled by the PLC, and how to configure the options on the TEXT panel.
  WinZIP Archive   WinZIP Archive            
EP-EA-001 Changing CMore and CMore Micro Screens From the PLC and Panel (see related Tech Note)   WinZIP Archive             WinZIP Archive  
EP-EA-004 Program to detect when an operator interface or other master device changes a register value in a PLC               WinZIP Archive WinZIP Archive  
EP-EA-005 Email setup project for C-more - Load and simulate to see what needs to be done to make email work WinZIP Archive Download C-more project
EP-EA-006 C-more clock change options for various AutomationDirect PLCs   WinZIP Archive   WinZIP Archive         WinZIP Archive WinZIP Archive

 

Software  
EP-POV-001 Point of View: Recipe example project
WinZIP Archive Download Example Program
EP-POV-002 Point of View: Basic template for starting projects
WinZIP Archive Download Example Program
EP-POV-003 Point of View: Example project showing basic examples of objects
WinZIP Archive Download Example Program
EP-POV-004 Point of View: Example showing use of class for multiple similar devices
WinZIP Archive Download Example Program
EP-POV-005 Point of View: Example project to test connections to CLICK PLC via Ethernet
WinZIP Archive Download Example Program
EP-POV-006 Point of View: Example project to test connections to Do-more PLC via Ethernet
WinZIP Archive Download Example Program

 

Other Example Programs  
GS20(X) GS20(X) Drives PLC example programs
WinZIP Archive Download Example Programs
ProSense PPC5 Advanced Process Controllers ProSense PPC5 PLC example programs
WinZIP Archive Download Example Programs
WEG CFW AC Drives WEG CFW100 and CFW300 AC Drives example programs
WinZIP Archive Download Example Programs
WEG SSW07 Softstarters WEG SSW07 Softstarters example programs
WinZIP Archive Download Example Programs

Copyright © 1999- AutomationDirect.com. ALL RIGHTS RESERVED