Calculated Industries 6250 Guide de l'utilisateur Page 112

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 138
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 111
11/25/96
6270 Programming Tips
97
Step
Enable the Trace mode so that you can view the program as it is executed:
Command Description
> TRACE1 Enables the trace mode
Step
Execute the program:
Command Description
> RUN prog8 Runs program prog8
Step
The program will execute until the WAIT(IN=b11) command is encountered. The program
will then pause, waiting for the input condition to be satisfied. Simulate the input state using
the INEN command. Inputs with an E value are not affected.
Command Description
> !INEN11 Disables inputs 1 and 2, leaving them in the ON state
The motor will now move for 4000 steps.
Step
Deactivate the input simulation:
Command Description
> INENEE Re-enables inputs 1 and 2
Programming Error Responses
Depending on the error level setting (set with the ERRLVL command), when a programming
error is created, the 6250 will respond with an error message and/or an error prompt.
A list of all possible error messages is provided in the 6000 Series Command Language
Discussion section near the beginning of the 6000 Series Software Reference Guide.
The default error prompt is a question mark (?), but you can change it with the ERRBAD
command if you wish.
At error level 4 (ERRLVL4—the factory default setting) the 6250 responds with both the error
message and the error prompt. At error level 3 (ERRLVL3), the 6250 responds with only the
error prompt.
Identifying Bad
Commands
To facilitate program debugging, the Transfer Command Error (TCMDER) command allows
you to transfer the command that the controller detects as an error. This is especially useful if
you receive an error message when running or downloading a program, because it catches and
remembers the command that caused the error.
When the bad command is detected, the controller sends an error message to the screen,
followed by the ERRBAD error prompt (?). To determine which command is in error, enter
the TCMDER command and the controller will display the command, including all its
command fields, if any.
Once a command error has occurred, the command and its fields are stored and status bit #11,
as reported in the SS and TSS commands, is set to 1. The status bit remains set until the
TCMDER command is issued.
Example
Ex ampl e De s c r i p t io n
> DEF badprg Begin definition of program called badprg
- MA11 Select the absolute preset positioning mode
- A25,4Ø Set acceleration
- AD11,26 Set deceleration
- V5,8 Set velocity
- VAR1=Ø Set variable #1 equal to zero
- GO11 Initiate move on both axes
- IF(VAR1<)16 Mistyped IF statement—should be typed as: IF(VAR1<16)
- VAR1=VAR1+1 If variable #1 is less than16, increment the counter by 1
- NIF End IF statement
- END End programming of program called badprg
> RUN badprg Run the program called badprg
*INCORRECT DATA Error message indicates incorrect command syntax
? TCMDER Query the controller for the command that caused the error
*IF(VAR1<)16 The bad command is displayed
>
Error Handling
Vue de la page 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 137 138

Commentaires sur ces manuels

Pas de commentaire