PLC Sample Code

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

92 files

  1. 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.

    3704 downloads

    Updated

  2. 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!!!

    9393 downloads

    Updated

  3. Lowpass filter function block

    Lowpass filter for Omron PLCs.
    Only tested on CJ-series CPU. Use at own risk!
    Many thanks to Peter Nachtwey @ PLCS.net for providing the mathematical formula.
    Unfiltered = raw unfiltered value in INT.
    TC = Time constant tau, given in seconds.
    Filtered = Filtered value in INT.
    FilteredReal = Filtered value in REAL.
    - The FB can be duplicated.
    - The FB can only be used in program parts that are scanned every CPU cycle, as it relies on the "P_Scan_Time_Value" variable.
    According to the working principles of a lowpass filter, it will take the filtered value tau amount of seconds to reach 63% of the unfiltered value.
    The value will reach within 1% of the unfiltered value in approx 5x tau.

    700 downloads

    Submitted

  4. logging+ filewrite

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

    3005 downloads

    Updated

  5. HHMMSS.cxf

    FB to provide a simple long timer with time remaining outputs. Time can be entered in HMS (or just mins for example).
    Time remaining is normalised to HMS though.
    Uses 2 other FBs. Create instances of HHMMSS as required.

    762 downloads

    Submitted

  6. Function block RANDOMIZE on ST

    PRNG algorithm packed into a functional block. As an example of using ST language for Omron CJ series PLC.

    43 downloads

    Submitted

  7. Function block on ST for algorithm DIFU DIFD

    An example on ST is the definition of the fronts of a discrete signal.

    29 downloads

    Submitted

  8. FINS Ethernet Master / Slave Solution

    Drop in code for Single Master and up to 30 Slave PLCs on FINS Ethernet.
    The Master PLC can be a CP1L-E, CJ2M, CJ2H, CS1, or any PLC capable of sending FINS commands.
    Originally designed to share data across a network of CP1L-E PLCs.
    Each PLC shares 100 words in each direction with the master PLC.
    The reads can be setup to read as fast as possible, or at a given interval.
    The writes can be change of state (COS) driven, as fast as possible, or at a given interval.
    .pdf manual included.

    2369 downloads

    Submitted

  9. 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

  10. 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.

    2566 downloads

    Updated

  11. 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

    1992 downloads

    Updated

  12. FB Calculate Day Of Week

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

    2067 downloads

    Updated

  13. FB : Password Set

    There was already a nice FB made available by PMCR, but it had little restriction which I didn't liked. So I made this one. This FunctionBlock enables you to set a password like '1234OOPS' rather instead of being limited by HEX digits (0-9..A-F)
    So it's kinda a alternative to the one PMCR made available.
    I also added another functionality. This Function Block is configurable to work in automatic mode (password will be set on certain PLC hour) and/or manual mode, where you can give a trigger to the Function Block which will set the password (as example, when you're finished with online editing you can trigger the FB)
    I think it will explain itself. If you have questions, you can PM me.
    Have phun!
    ^^

    1263 downloads

    Updated

  14. Example Scale Meter Protocol

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

    2918 downloads

    Updated

  15. 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 />

    2918 downloads

    Updated

  16. Easy to use Modbus RTU Master for CP1L CP1H CJ1 CJ2 CS1

    This application is a ready to use Modbus RTU master for CP1L, CP1H, CJ1, CJ2, and CS1.
    The user creates 'tables' of items to read and write. The ladder code automatically performs the communications as setup by the user.
    The CJ1 / CJ2 / CS1 solution requires the use of a Protocol Macro on an SCU31 / SCU41 module, and the CP1L / CP1H function uses the Serial Gateway function of the CP1H / CP1L on a CP1W-CIF11 or CIF12.
    Sample NS screens are provided with an Omron 3G3JX inverter as an example Modbus RTU slave.
    Updated 1/7/2011 to include 3G3MX2 screen for NS, and to include CJ1W-SCU22,32,42 in documentation.
    Updated 9/19/2012 to support 2 ports on an SCU card (CS, CJ1, CJ2) or 2 ports on a CP1L / CP1H.

    21545 downloads

    Updated

  17. DeviceNet Explicit Message Example

    Example Ladder Code for Sending a DevicNet Explicit Message. Example is for a CS1 and coded in CX Programmer.

    2437 downloads

    Updated

  18. DATE Instruction for CP PLCs

    Sample code to set the RTC on a CP PLC. Individual sections can be enabled/disabled.

    95 downloads

    Submitted

  19. 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

  20. 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

  21. CX-Programmer Ver.3 Introduction Guide R104-E1-01.pdf

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

    5503 downloads

    Updated

  22. CX-Programmer Ver.3 Introduction Guide R104-E1-01 (ZIP VERSION)

    CX-Programmer Ver.3 Introduction Guide R104-E1-01. Quick start for beginning a project in CX-Programmer. Could also be useful for earlier versions of CX Programmer.
    Same as this download:
    http://forum.mrplc.com/index.php?&act=Download

    5377 downloads

    Updated

  23. CS1/CJ1 Floating Point to Fixed Point Conversion for HMI

    Nested loop for quick conversion of CS1/CJ1 floating point words to fixed point words (xxxx.xxxx) for display on HMI. Format is CXP 2.0 (.cxp)

    2531 downloads

    Updated

  24. CS1 C Mode Hostlink

    Provides Read and Write commands for Omron Hostlink Protocol

    2406 downloads

    Updated

  25. CS CJ CP NSJ password set

    This is a Function Block to set a password in a PLC.
    It can be used to automatically set a password, so you don't have to do it from CX Programmer.

    3239 downloads

    Submitted