Notifications
Clear all

teach and playback

2 Posts
1 Users
0 Likes
8,856 Views
(@cadence)
Posts: 1
New Member Guest
Topic starter
 

i need to know how can I teach a position (multiple positions actually) and then play it back.

I saw the sample program record and playback but I don't understand clearly how it works.

I want to know what variable to use to store the positions and how to set them, and how will I call back those positions later in the program.

thank you

 
Posted : 28/01/2013 8:08 am
(@csearcy)
Posts: 316
Reputable Member Guest
 

Any of the variables in the Smartmotor can be used for position(PT). The trick is keeping values in memory when the power to the motor is cycled.

PT=a 'is a valid command, but a is a volitile variable, and needs to be stored to EEPROM

EPTR=100 'will set the EEPROM pointer
VST(a,1) 'will store the value in variable a to EEPROM

'In another part of the program, you can retrieve the value from EEPROM
EPTR=100 'will set the EEPROM pointer
VLD(a,1) 'will load the value from EEPROM location 100 to variable a

'Note that VLD(a,5) will store 5 consecutive EEPROM memory locations to variables a,b,c,d,and e.

 
Posted : 28/01/2013 3:54 pm
Share: