Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: teach and playback

teach and playback 3 years, 9 months ago #790

  • cadence
  • Posts: 1
  • Karma: 0
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

Re: teach and playback 3 years, 9 months ago #794

  • csearcy
  • Posts: 480
  • Karma: 23
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.
  • Page:
  • 1
Moderators: hsummer, csearcy
Time to create page: 0.46 seconds