The following program is an example of a basic point to point motion executed in a program bank.

B100           //CLEAR EXISTING PROGRAM BANKS

L100           //CLEAR EXISTING LOGIC BANKS

 

A1=50         //ACCELERATION 1 SET TO 50

S1=50         //SPEED 1 SET TO 50

S2=100       //SPEED 2 SET TO 100

P1=0           //POSITION 1 SET TO 0

P2=1000     //POSITION 2 SET TO 1000

 

B1              //BEGIN PROGRAM BANK 1

A1,S1,P2   //MOVE TO POSITION 2 AT SPEED 1 AND ACCELERATION 1

S2,P1        //MOVE TO POSITION 1 AT SPEED 2 AND ACCELERATION 1

END          //END PROGRAM BANK 1

 $               //SAVE PROGRAM TO EEPROM

 

In the program above, we first clear any existing banks to insure we are starting with a clean slate. We then declare all of our motion parameters. We set the necessary acceleration, speed, and position values. In program bank 1 there are two motions, the first is to position 2, then as soon as it reaches this point it moves to position 1 and the bank ends.

  • No labels