MX2 Timer application using Drive programming

Updated October 18, 2024

Task:

Turn on a motor using a drive, run it for a set time, and stop after a condition is met.

Functionality:

  1. Input1 turns the motor on.
  2. The motor accelerates for X seconds.
  3. If Input2 is pressed, the motor immediately turns off.
  4. If Input2 is not pressed, the motor continues accelerating for the full X seconds, then decelerates and stops in X seconds.

Configuration Steps:

Set the following parameters on the drive:

  • F002, F003
  • A017 
    • 01: Enabled (Start/stop via multifunction input PRG terminal) 
    • 02: Enabled (Start/stop via power on/off

Input Mapping:

  • Map external inputs to internal variables:
    • C001 = 56 (MI1), C002 = 57 (MI2)

Ensure the program loops using "goto loop" and "goto main" so it continually checks the input status.

This approach allows the motor to run based on the defined conditions and inputs.

Program 

entry  

    U(00) := X                    [(X=Seconds) change this variable value to increase and decrease time]     

:main 

if X(00) = 1 then                       [if input one if turned on]

    FW := 1                                    [ turn on forward motion]

    timer set TD(0) U(00)           [initiate timer]

endif 

if TD(0) = 1 then                   [condition_2 when timer finishes counting]

    FW := 0                                [stop the motor]

    timer off TD(0)                [Reset the timer]

endif 

if X(01) = 1 then                     [condition_3 when the second input is turned on]

    stop                                             [Turn the motor off]

endif 

goto looping_                                [keep looping]

:looping_ 

goto main 

end

 

The drive programming manual has been linked below. 

https://edata.omron.com.au/eData/Inverters/I170E-EN-01A.pdf

Start a Conversation
This conversation is closed
Uploading...