Rockwell-automation 1747-PBASE BASIC Development Software Programming Manuel d'utilisateur Page 85

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 144
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 84
Publication 1746-PM001A-US-P
Writing Programs Using the BASIC Development Language 6-13
14. Continue typing in the rest of the program as shown:
hit_any_key( )
{pause and wait for keystroke}
cls()
{$L loop1}
Print “Enter your Operator Number”
{pause and wait for input}
get_key (op)
{check for input of 49 or 50 which are ASCII decimal for
1or2}
if op=49 then goto op1setup
if op=50 then goto op2setup
{print error and loop back for another entry}
cls()
print “Invalid Entry . . Operator number not recognized”
goto loop1
{$L op1setup}
get_time (d1,m1,y1)
{setup for operator #1}
goto acknowledge
{$L op2setup}
get_time (d2,m2,y2)
{setup for operator #2}
{$L acknowledge}
cls()
cursor_down(11)
print_time ( )
print “Operator #”,op-48.” acknowledged”
end
Translating
Since this example is written using the BASIC development language, it must be
translated to the BASIC Language prior to downloading to the module. Do this by
selecting Translate/Compile from the Other menu, and then selecting
1747-PBASE Translator. The program on the following page is the previous
program after it is translated.
Vue de la page 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 143 144

Commentaires sur ces manuels

Pas de commentaire