4 clearing, 5 downloading, 4 fieldbus user program interface – Rice Lake iRite IDE User Manual
Page 93: Clearing, Downloading

920i
Programming Reference - Appendix
89
since the field names are not part of the data. Click the up arrow next to
Start import at row:
prompt to start
at row 2 (the real data).
5. Click
Next
and select the separator character you used when the file was exported (the default is
tab-delimited).
6. Click
Next
again, then click
Finish
to import the file. All of your data should now be displayed in
iRev
. If
you wish to downloaded the imported database to the
920i
, follow the procedure described in
6.3.4
Clearing
The
Clear All
button on the top of the toolbar in the
iRev
Data Editor clears both the
iRev
screen and the entire
920i
database. You must clear an existing
920i
database before downloading edited data, but this function must be
used with care to avoid losing data.
To clear a database:
1. Upload the database from the
920i
2. Edit the database and fields, if necessary.
3. Use the Export function described in Section 6.3.2 to save a copy of the database.
4. Highlight all of the fields at once and copy them using either Ctrl-C or by choosing
Edit-Copy
from the
toolbar.
5. Click the
Clear All
button to clear both the
920i
database and the
iRev
fields.
6. Upload the blank database from the
920i
to ensure data integrity. The lock symbol on the
iRev
screen will
open, allowing a new database to be downloaded.
7. To replace the cleared database with edited data, move the cursor to the upper left-hand box and paste the
copied data back into the
iRev
database. (Press Ctrl-V or choose
Edit-Paste
from the toolbar.)
8. Click the
Download
button to send fresh, edited data back down to the indicator (see below).
6.3.5
Downloading
IMPORTANT:
When you download data to the
920i
, it does not overwrite data that is there. Downloaded data is
added to the database regardless of whether it is the same data. If you edit uploaded data in
iRev
and want to
replace the indicator database, you must first Clear All, upload the cleared (blank) database, and then download
the edited data. (See Section 6.3.4 above.)
1. Create or edit the data in the rows and columns you want entered in the database.
2. With the indicator connected, click the
Download
button at the top on the toolbar.
3. A status box shows the download progress (
Downloading Row [number] of [total rows]
). When complete, a
Download completed successfully
message is shown. The database is now stored in the
920i
.
6.4
Fieldbus User Program Interface
The fieldbus data APIs (see “Fieldbus Data” on page 63), two type definitions (BusImage, BusImageReal), and
the EventPort function are used to manage fieldbus data.
The function of BusCommandHandler is similar to other user-written event handlers. When present and enabled
with the EnableHandler(BusCommandHandler) call, the BusCommandHandler is activated every time a message
is received on a fieldbus. Keeping the BusCommandHandler execution short is important in order to not miss
data transfers on the fieldbus.
The normal operation of BusCommandHandler is expected to include the following system calls in the following
order:
•
EventPort
•
GetImage, or GetImageReal
•
SetImage, or SetImageReal
with intervening code to perform the required user functions. The SetImage or SetImageReal call should be as
close to the end of the BusCommandHandler as possible.
The BusImage type is the data type passed in GetImage and SetImage (or, for real data, GetImageReal and
SetImageReal).