Motion Control Products
Motor Sizing
Customer Service
Service

Questions?

We're here to help.

On the phone:

M - F 8:30 am EST to 5:00 pm PST

Customer Service: 1-800-418-7903

Technical Support: 1-800-GO-VEXTA (468-3982)

By e-mail:

Click Here to Contact Us

Live Chat:

M - F 8:30 am EST to 5:00 pm PST
(use Live Chat button at top of the page)

Se habla español

Chicago: +1-847-871-5931

Los Angeles: +1-310-715-3303

Japanese Support

1-800-746-6872

Oriental Motor
Sample Programs - CRK Series with Built-in Controller

Sample Programs - Download Instructions

The program examples below are similar to some of our most common applications. The examples are can be used as starting points for meeting the needs of your application.

These programs can be downloaded directly into the CRK with Built-in controller with the use of the CRK Motion Creator Graphical User Interface (GUI). To download the GUI, click here. Instructions for how to download these files with the GUI are available here. To download the GUI click here.

Simple Index Move

This program tells the motor to move three preset distances with a delay between each of the moves.

Simple Index

Sequence:  5  "SimpleIndex"
( 1) pc = 0    #Set PC to 0
( 2) VS 100    #Set starting velocity to 100pps
( 3) VR 5000   #Set running velocity to 5000pps
( 4) TA .2     #Set accel time to 0.2sec
( 5) TD .1     #Set decel time to 0.1sec
( 6) DIS 500   #Set distance to 500pulses
( 7) MI        #Move incrementally
( 8) MEND      #Wait until motion end
( 9) WAIT 1    #Wait 1sec
(10) DIS 1000  #Set distance to 1000pulses
(11) MI        #Move incrementally
(12) MEND      #Wait until motion end
(13) WAIT 1    #Wait 1sec
(14) DIS -500  #Set distance to 500pulses in opposite direction
(15) MI        #Move incrementally
(16) MEND      #Wait until motion end
(17) WAIT 1    #Wait 1sec

Download
The program (*.txt) will open in a separate window. Use File > Save As to download.

Simple Absolute Move

This program tells the motor to move three preset positions with a delay between each of the moves.

Simple Absolute

Sequence:  4  "SimpleAbsolute"
( 1) PC = 0    #Set PC=0  
( 2) VS 100    #Set starting velocity to 100pps
( 3) VR 5000   #Set running velocity to 5000pps
( 4) TA .2     #Set accel time to 0.2sec
( 5) TD .1     #Set decel time to 0.1sec
( 6) MA 500    #Move to 500
( 7) MEND      #Wait until motion end
( 8) WAIT 1    #Wait 1sec
( 9) MA 1500   #Move to 1500
(10) MEND      #Wait until motion end
(11) WAIT 1    #Wait 1sec
(12) MA 1000   #Move to 1000

Download
The program (*.txt) will open in a separate window. Use File > Save As to download.

Repeated Index Move

This program tells the motor to repeat an index move four times with a delay between each of the moves.

Loop Index

Sequence:  3  "LoopIndex"
( 1) VS 100     #Set starting velocity to 100pps
( 2) VR 5000    #Set running velocity to 5000pps
( 3) TA .2      #Set accel time to 0.2sec
( 4) TD .1      #Set decel time to 0.1sec
( 5) DIS 500    #Set distance 500 steps
( 6) LOOP 4     #Loop 4 times
( 7) MI         #Move incrementally
( 8) MEND       #Wait for motion end
( 9) WAIT 1     #Wait 1sec
(10) ENDL       #End of loop

Download
The program (*.txt) will open in a separate window. Use File > Save As to download.

Continous Motion with Speed Changes (Velocity Change Scan)

This program tells the motor to move continuously in the CW direction and to change it's velocity on-the-fly after a specified period of time.

Velocity Change Scan

Sequence:  2  "VelocityChangeScan"
( 1) VS 100     #Set starting velocity to 100pps
( 2) VR 2000    #Set 1st running velocity to 2000pps
( 3) TA .2      #Set 1st accel time to 0.2sec
( 4) TD .2      #Set decel time to 0.2sec
( 5) MCP        #Move continuously in the positive direction
( 6) WAIT 5     #Wait 5sec
( 7) TA .5  #Set 2nd accel time to 0.5sec
( 8) VR 5000    #Set 2nd running velocity to 5000pps
( 9) MCP        #Move continuously in the positive direction at new velocity
(10) WAIT 10    #Wait 10sec
(11) ABORT      #Abort sequence execution

Download
The program (*.txt) will open in a separate window. Use File > Save As to download.

Continuous Motion with Speed Changes on an Input (Velocity Change Input)

This program tells the motor to move continuously in the CW direction and to begin a series of velocity changes when a specified input turns ON.

Velocity Change Input

Sequence:  7  "VelocityChangeInput"
( 1) VS 100     #Set starting velocity to 100pps
( 2) VR 1000    #Set 1st running velocity to 1000pps
( 3) TA .2      #Set accel time to 0.2sec
( 4) TD .1      #Set decel time to 0.1sec
( 5) MCP        #Move continuously in the positive direction
( 6) WHILE (IN1=0)
( 7) WEND         #Wait until input #1 turns ON
( 8) LOOP 3     #Loop 3 times
( 9) VR=VR+1000 #Increase velocity by 1000pps
(10) MCP        #Move continuously in the positive direction
(11) SAS SPEED CHANGE #Send characters "SPEED CHANGE" to terminal
(12) WAIT 4     #Wait 4sec 
(13) ENDL       #End loop
(14) ABORT      #Abort sequence execution

Download
The program (*.txt) will open in a separate window. Use File > Save As to download.

Speed Changes during an Index Motion (Velocity Change Index)

This program changes the motor speed on-the-fly several times while moving a preset distance.

Velocity Change Index

Sequence:  6  "VelocityChangeIndex"
( 1) pc =0      #Set PC to 0
( 2) VS 100     #Set starting velocity to 100pps
( 3) VR 1000    #Set running velocity to 1000pps
( 4) TA .2      #Set accel time to 0.2sec
( 5) TD .1      #Set decel time to 0.1sec
( 6) DIS 60000  #Set distance to 60000 steps
( 7) MI         #Move incrementally
( 8) WAIT 3     #Wait 3sec
( 9) CV 3000    #Change running velocity to 3000pps
(10) WAIT 3     #Wait 3sec
(11) CV 5000    #Change running velocity to 5000pps

Download
The program (*.txt) will open in a separate window. Use File > Save As to download.

Call Subroutine

This program shows how to calls a subroutine after an index motion has been completed and a specified input is turned ON.

Call Subroutine

Sequence:  1  "CallSubroutine"
( 1) VS 100    #Set starting speed to 100pps
( 2) VR 1000   #Set running speed to 1000pps
( 3) TA .2     #Set accel time to 0.2sec
( 4) TD .1     #Set decel time to 0.1sec
( 5) DIS 2000  #Set distance to 2000 steps
( 6) MI        #Move incrementally
( 7) MEND      #Wait for motion end
( 8) WHILE (IN1=0)
( 9) WEND   #Wait until input #1 turns ON
( 10) CALL 3    #Call subroutine 3

Download
The program (*.txt) will open in a separate window. Use File > Save As to download.

Download Instructions

 


© 2011 ORIENTAL MOTOR U.S.A. CORP. All Rights Reserved.