About this manual, 0 introduction, 1 what is irite – Rice Lake iRite IDE User Manual
Page 5: 2 why irite, 3 about irite programs, About this manual 1.0, Introduction

920i
Programming Reference - Introduction
1
About This Manual
This manual is intended for use by programmers who
write
iRite
applications for
920i
®
digital weight
indicators.
This manual applies to Version 4.01 and later of the
920i
indicator software and should be used in
conjunction with the Version 4.01
920i
Installation
Manual, PN 67887. See that manual for detailed
descriptions of indicator capability and operation.
Warning
All programs should be thoroughly
tested before implementation in a live
system. To prevent personal injury and
equipment damage, software-based
interrupts must always be
supplemented by emergency stop
switches and other safety devices
necessary for the application.
A u t h o r i z e d d i s t r i b u t o r s a n d t h e i r
employees can view or download this
manual from the Rice Lake Weighing
S y s t e m s d i s t r i b u t o r s i t e a t
www.ricelake.com
.
1.0
Introduction
1.1
What is iRite?
iRite
is a programming language developed by Rice
Lake Weighing Systems and used for the purpose of
programming the
920i
programmable indicator.
Similar to other programming languages,
iRite
has a
set of rules, called syntax, for composing instructions
in a format that a compiler can understand.
An
iRite
program is nothing more than a text file,
which contains statements composed following the
iRite
language syntax. The text file created using the
iRite
programming language isn’t much use until it is
compiled. Compiling is done using a compiler
program.
The compiler reads the text file written in
iRite
and
translates the program’s intent into commands that are
understandable to the
920i
’s serial interface. In
addition, with an ample amount of appropriate
c o m m e n t s , t h e s a m e
i R i t e
p r o g r a m t h a t i s
understandable to the compiler should also relate, to
any person reading the file, what the program is meant
to accomplish.
1.2
Why iRite?
Although there are many different programming
languages already established in the programming
world, some of which you may already be familiar
with, none of them were "the right tool for the job."
Most other programming languages are very general
and try to maximize flexibility in unknown or
unforeseen applications; hence they carry a lot of
overhead and functionality that the
920i
programmer
might not ever use.
Considering the varying backgrounds and experiences
of the people that will be doing most of the
iRite
programming, we wanted a language that was easy to
learn and use for the first-time programmer, but also
familiar in syntax to an experienced programmer.
Furthermore, we wanted to eliminate some of the
unnecessary features that are troublesome in other
languages, namely the pointer data type. In addition,
we added some items that are very useful when
programming the
920i
, the database data type and the
handler subprogram, for example.
Also by creating a new language, we had the luxury of
picking the best features from other languages, with
the advantage of hindsight. The result is
iRite
: a
compact language (only six discrete statement types,
three data types) with a general syntax similar to
Pascal and Ada, the string manipulation of Basic, and
a rich set of function calls and built-in types specific
to the weighing and batching industry. A Pascal-like
syntax was adopted because Pascal was originally
developed as a teaching language and its syntax is
unambiguous.
1.3
About iRite Programs
The
920i
indicator has, at any given moment, many
time critical tasks it must accomplish. It is always
calculated new weight from new analog information,
updating the display, watching for key press events,
running the setpoint engine, watching for serial input,
streaming weight data, or sending print data out one or
more serial ports. In addition to these tasks, it also
runs user programmed custom event handlers, i.e. an
iRite
program.