PLC Sample Code

Caps, LSS, CPT, Syswin, etc...

92 files

  1. Modbus Protocol Macro

    Omron Protocol Macro for Modbus Communicaitons RTU. Master and Slave.. To be used with the CJ/CS serial cards capable of Protocol Macro.
    Original version by Omron.
    Modified by me getting rid of a couple of bugs!!!

    9391 downloads

    Updated

  2. Woodwood Controler Example Protocol Program

    This is a sample program to communicate to a Woodwood controller. This program is to be used in conjunction with the Modbus Protocol Macro Software. (See download section)

    1700 downloads

    Updated

  3. CQMaster.swp

    Provides for transmission and reception of ten Data Memories each between two CQM1 PLCs

    1279 downloads

    Updated

  4. Compact Flash Memory Write

    The attached code will enable the Omron CJ1 PLC to write a combined text number file in a csv format to the compact flach memory card.
    To extract the data some minor manipulation is required. The file is stored as an DATA.IOM file in the TEST directo

    2937 downloads

    Updated

  5. Scaling in CJ1 CS1 PLC's

    The use of the old scaling functions SCL really suck when it comes to the new CJ1/CS1 PLC's mainly because it still relies on BCD etc....Today is so easy to use INT UINT values in the program i hardly ever use BCD any more.....
    Therefore I n

    3745 downloads

    Updated

  6. ASCII Generic Protocol Macro Object Code

    A collection of generic ASCII based sequences designed to provide TXD-RXD functionality to SCU and SCB modules for CS and CJ PLCs.
    This is the object code for the ASCII Generic Protocol Macro and must be loaded with the Protocol Macro Loader Util

    2249 downloads

    Updated

  7. TXD-RXD Quickstart Programs

    Collection of programs which demonstrate the use and setup of the TXD-RXD serial communication instructions. Examples for C200HE/G/X CPM2C CQM1 and CS/CJ PLCs
    Corrected CSCJ TXD_RXD program. Thanks BITS N BYTES

    9470 downloads

    Updated

  8. Modbus Protocol Macro Object Code

    This file contains the object code for Sleepy Wombat's Modbus Protocol Master PMCR. This is the file necessary if you do not have CX Protocol and want to use the Protocol Macro Transfer Utility found in the Omron - Utilities download section.

    3703 downloads

    Updated

  9. CX-Programmer Ver.5 Introduction Guide R120-E1-01.

    CX-Programmer Ver.5 Introduction Guide R120-E1-01. Quick start for beginning a project in CX-Programmer. Could also be useful for earlier versions of CX Programmer.

    6521 downloads

    Updated

  10. CX-Programmer Ver.5 Introduction to Function Blocks Guide R121-E1-01

    CX-Programmer Ver.5 Introduction to Function Blocks Guide R121-E1-01. Quick start for using Function Blocks with CS/CJ Ver 3 CPUs.

    20651 downloads

    Updated

  11. Modbus RTU Sample Code CJ1/SCB

    This is sample code for receiving and manipulating data from Si-TEC CGC generator controller

    4988 downloads

    Updated

  12. FB Calculate Day Of Week

    Will calculate the day of the week given and date of Year Month and Day

    2066 downloads

    Updated

  13. FB Extract Time Date into SecMin Hr Day Mth Yr

    Will extract and output the Time and Date in 6 different output words being Sec Min Hours Day Month Year. The year output is a Y2K format in that the range is 1980 thu 2079.

    2565 downloads

    Updated

  14. FB Day light savings function block

    This funciton block will output a bit when Daylight Savings is active. You input the Start Month and the start Sunday bit (Off = 1st Sunday of Month On = Last Sunday of Month) AND also the End Month and associated Sunday bit.
    This needs Function

    1991 downloads

    Updated

  15. CS1 C Mode Hostlink

    Provides Read and Write commands for Omron Hostlink Protocol

    2405 downloads

    Updated

  16. Example Scale Meter Protocol

    This protocol will talk to multiple Ranger Weigh Scales to display their respective display weights.

    2918 downloads

    Updated

  17. Omron Modbus Slave Ladder

    Omron Modbus RTU slave ladder programs for C200HS Alpha CPM2 CQM1 CQM1H CS1 and CJ1 fot use with onboard serial port.

    9095 downloads

    Updated

  18. FB Scale with parameters

    This function block will scale a value and output the rsult as an interger value and floating point (real) number. The result can be clamped or not clamped to the Min and Max range. Output bit indicating Over and Under range is also included.

    3914 downloads

    Updated

  19. Modbus TCP Client using FB's

    Example Implementation of Modbus TCP Client using Standard Omron Function Blocks.

    3792 downloads

    Updated

  20. Tracking product on conveyor

    Products arrive on conveyor irregularly pitched. Conveyor is equipped with an encoder or maybe a proxy looking at the sprocket.
    This program captures the position and then multiple FB calls can be made to give an output at a distance from the input point maybe at a label inspction point or reject unit.
    The Shift register readout FB can be called as many times as necessary.
    The encoder can be connected to a high-speed counter meaning that the PLC scan need not 'see' every number i.e the encoder counter can be asynchronous.
    I've simulated this in this program by incrementing the 'encoder' with a timed interrupt.
    Adjacent to the product position stack is a product status stack so data can be written in at any point too e.g. I'm in front of the label detect sensor - if it's on then I can enter a '1' (say) into the stack. As the status is kept in a Word then upto 16 devices can write into the stack. Subsequent writes are ORed with existing data.
    This can be achieved with FIFO but this method is more efficient as data is not actually moved just pointers to the data.

    4757 downloads

    Updated

  21. Useable timer

    Hate BCD? Me too. Here's a timer FB that uses wait for it an INTeger preset.
    Easier to scale gives you the time remaining done bit and a timing bit.
    Use one of the system bits (P_1s etc.) to set the timebase.

    3492 downloads

    Updated

  22. Example of Using Daylight Saving FB's

    Example of using the Daylight Saving Time FB that i have previouly up loaded.....You need to have uploaded all of the associated FB's for this to work...
    There is a pdf with the source code of the FB's in there as well. /thumbsupsmileyanim.gif style=vertical-align:middle emoid= border=0 alt=thumbsupsmileyanim.gif />

    2917 downloads

    Updated

  23. Process states sequence logics

    One of my recent project using OMRON CPM2A; with peocess states sequence logics programming concept. It is a systematic way of writing an "easy to maintenance" logics.

    3058 downloads

    Updated

  24. logging+ filewrite

    example of logging on a machien and writing it to file on a regular basis

    3005 downloads

    Updated

  25. STUP Example

    This is an example how to change the port settings:
    in the example it is triggered by dip switch 6 (free use) and it changes the speed from 115200 for th HMI to 9600 for the modem. You could completely change the setup: check manual W393 section 7 PLC setup area
    Word 160 in the setup is here D6000 for the standard comms and D6010 for the high speed

    2061 downloads

    Updated