Introduction.
Introduction.
Introduction.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Workshop PG5<br />
Instructionlist<br />
Case sensitivity:<br />
Instructions and operands are not case sensitive.<br />
Symbols are not case sensitive unless they contain foreign characters, MotorOn<br />
is the same as MOTORON, but GRÜN is not the same as grün.<br />
Labels are symbol names given to locations in a program (program lines),<br />
which are used as destinations for jump instructions or to provide debug information.<br />
Characters allowed in labels are the same as those of symbols.<br />
Texts are case sensitive. ( Example: TEXT 20<br />
"UART:4800,8,N,1;MODE;MC2;DIAG:F0,R100;" ).<br />
Writing programs<br />
with symbols:<br />
Please make sure you have read the chapter "3. PCD Resources ".<br />
Why should we use symbols and name our input and outputs after all?<br />
Couldn’t we simply write our programs directly using the element address like<br />
shown?<br />
COB 0<br />
0<br />
ACC H<br />
STH I 0<br />
ANH I 4<br />
OUT O 33<br />
ECOB<br />
In fact you could write your programs like this if you like to. But:<br />
First symbols make your program easier to read.<br />
Second, imagine you have a program, which is 4000 lines long. The output O<br />
64 was used 30 times (for exp OUT 0 64, SET 0 64 etc.). During the start-up<br />
of your machine you break the output. For one reason or the other you don't<br />
have a spare card handy but lucky you, the output number O 67 off this card is<br />
available. You decide to use this one instead.<br />
You have changed the address of your output from O 64 to O 67. And you<br />
have to do so 30 times!!!!<br />
Had you declared O 64 by a symbol, you would only have to change the address<br />
one time in the symbol editor.<br />
That’s one of the reasons why its better to use symbols rather then fixed addresses<br />
in your program.<br />
PG5-07-E © Saia-Burgess Controls Ltd. Page 7-6