{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fmodern\fprq1 Swiss;}{\f3\fswiss\fprq2 System;}} {\colortbl\red0\green0\blue0;\red0\green240\blue240;\red0\green0\blue255;\red0\green128\blue128;\red1\green1\blue1;} \deflang1033\pard\plain\f2\fs26\cf2 'This Program Gives an Example of Sending \par 'Voltage, Current, Temperature, and Position data to a 4x20 LCD Display. \par 'This is good for setting up limits on torque down applications \par 'This assumes you have an Animatics 4x20 Anilink Display wired to a motor \par \par 'The followin gline of code initises the LCD display, clears it \par ' and places the curser at the upper left hand corner. \par \par \plain\f2\fs20\cf2 PRINTA(#56,#12,#6,#1)\tab 'SETUP OF LCD \par \plain\f2\fs26\cf2 \par GOSUB0\tab \tab 'Initialise text on the display \par GOSUB1\tab \tab 'Go to LCD update subroutine \par \par END \par \par \par C0 \par \plain\f2\fs20\cf2 PRINTA(#128," Volts : ") \par PRINTA(#192," mAmps : ") \par PRINTA(#148," Temp : ") \par PRINTA(#212,"Pos. Er.: ") \par RETURN \par \plain\f2\fs26\cf2 \par \par C1 \par \plain\f2\fs20\cf2 \plain\f2\fs20\cf3 WHILE\plain\f2\fs20\cf2 1 \par \tab GOSUB2\tab \tab \tab \tab \tab 'Get Internal Motor Data \par \tab PRINTA(#138,k,".",m," ")\tab \tab 'print volts to display \par \tab PRINTA(#201,UIA*10," ")\tab \tab 'print current to display \par \tab PRINTA(#158,t," ")\tab \tab \tab 'print Temperature to display \par \tab PRINTA(#222,@PE," ")\tab \tab \tab 'Print Position error to display \par \plain\f2\fs20\cf3 LOOP\plain\f2\fs20\cf2 \par \plain\f2\fs26\cf2 RETURN \par \par 'This Subroutine Gets Internal Motor Port Data \par C2 \par \tab j=UJA\tab \tab 'Read Internal Port J (voltage on buss in tenths of volts) \par \tab k=j/10 \tab 'Pull out decimal \par \tab l=k*10 \par \tab m=j-l \par \tab i=UIA*10\tab \tab 'Read Internal Port I (Current in tenths of Amps) \par \tab t=TEMP\tab \tab 'Read Internal Temperature Port \par RETURN \par \par \par \plain\f2\fs20\cf2 \par \plain\f2\fs26\cf2 \par \par }