Rice Lake 920i Programming Reference Manual

Rice Lake 920i Programming Reference Manual

Irite programmable hmi indicator/controller
Hide thumbs Also See for 920i:

Advertisement

Programmable HMI Indicator/Controller
Version 3.08
Programming Reference
67888

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 920i and is the answer not in the manual?

Questions and answers

Summary of Contents for Rice Lake 920i

  • Page 1 Programmable HMI Indicator/Controller Version 3.08 Programming Reference 67888...
  • Page 3: Table Of Contents

    Course descriptions and dates can be viewed at www.ricelake.com or obtained by calling 715-234-9171 and asking for the training department © 2009 Rice Lake Weighing Systems. All rights reserved. Printed in the United States of America. Specifications subject to change without notice.
  • Page 4 6.5 Program to Retrieve 920i Hardware Configuration ........
  • Page 5: About This Manual

    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...
  • Page 6: Running Your Program

    , b e c a u s e o f i t s m i n i m a l c o m p u t a t i o n a l How Do I Get My Program into the 920i? requirements.
  • Page 7: Sound Programming Practices

    The will still programs that are available from RLWS follow a 920i be executing its other tasks, like calculating current single standard. You are welcome to download this weights, and running the setpoint engine. But it will standard from our website, or you can write your own.
  • Page 8: Summary Of Changes

    Database Operations” on page 82, “Fieldbus User Program Interface” on page 83, “Program Category Page to Retrieve 920i Hardware Configuration” on Scale Data Acquisition GetMV page 84, and “920i User Graphics” on page 86. System Support Beep DisableHandler EnableHandler EventStatus EventTime...
  • Page 9: Tutorial

    Hello, world! It would look like this: ’s display in the status message area, every time 920i the indicator is turned on, taken out of configuration mode, or reset. Let’s take a closer look at each line of program HelloWorld;...
  • Page 10: Program Example With Constants And Variables

    The -- can start on any column in a line and can be after, on the same line, as other valid program statements. 920i Programming Reference...
  • Page 11 Identifiers with global duration, in a program, are understood in all text regions of the program, 920i and their memory is allocated at program start-up and is re-allocated when the indicator is powered up. The “c” in the prefix helps us recognize that the identifier is a constant. Constants are a special type of identifier that are initialized to a specific value in the declaration and may not be changed anytime or anywhere in the program.
  • Page 12 Their value may be changed any time they are “in scope”, they may be changed in every region of the program anytime the program is loaded in the 920i. Lines 13—18 are our first look at a function declaration. A function is a subprogram that can be invoked (or called) by other subprograms.
  • Page 13 2. If we had a printer connected to port 2 on the , every time the program startup handler is fired, we would see 920i the following printed output: The area of a circle with radius 1.0 is 3.14...
  • Page 14: Language Syntax

    Literally, any time a whole number is used in the text of the program, the compiler creates an integer constant. The following gives examples of situations where an integer constant is used: iCount : integer := 25; for iIndex := 1 to 3 sResultString := IntegerToString(12345); sysResult := StartTimer(4); 920i Programming Reference...
  • Page 15: Delimiters

    The colon (:) is used to separate an identifier from its data type. The colon is also used in front of the equal sign (=) to make the assignment operator: function GetAverageWeight(iScale : integer) : real; iIndex : integer; csCopyright : constant string := "2002 Rice Lake Weighing Systems"; Language Syntax...
  • Page 16 4/7 = 0. If you were hoping to assign the result to a real like in the following example: rSlope : real; rSlope := 4/7; 920i Programming Reference...
  • Page 17: Program Structure

    rSlope will still equal 0, not 0.571428671 as might be expected. This is because the compiler does integer math when both operands are integers, and stores the result in a temporary integer. To make the previous statement work in , one of the operands must be a real data type or one of the operands must evaluate to a real. So we iRite could write the assignment statement like: rSlope := 4.0/7;...
  • Page 18 [g_ciArraySize] of tDescription; -- Variable declarations go here. g_iBuild : integer; g_srcResult : SysCode; g_aArray : tBigArray; g_rSingleRecord : tDescription; -- Start functions and procedures definitions here. function MakeVersionString : string; sTemp : string; begin 920i Programming Reference...
  • Page 19: Declarations

    if g_iBuild > 9 then sTemp := ("Ver " + g_csVersion + "." + IntegerToString(g_iBuild, 2)); else sTemp := ("Ver " + g_csVersion + ".0" + IntegerToString(g_iBuild, 1)); end if; return sTemp; end; procedure DisplayVersion; begin DisplayStatus(g_csProgName + " " + MakeVersionString); end;...
  • Page 20 Enumeration, record and array type definitions are not allowed as the type of a component: only previously defined user- or system-defined type names are allowed. <record-type-definition>: record <field-declaration-list> end record <field-declaration-list>: <field-declaration> | <field declaration-list> <field declaration> <field-declaration>: IDENTIFIER ':' <type> ';' 920i Programming Reference...
  • Page 21 field-declaration-list RECORD RECORD Figure 3-5. Record Type Definition Syntax Examples: type MyRecord is record A : integer; B : real; end record; The EmployeeRecord record type definition, below, incorporates two enumeration type definitions, tDepartment and tEmptype: type tDepartment is (Shipping, Sales, Engineering, Management); type tEmptype is (Hourly, Salaried);...
  • Page 22: Variable Declarations

    Variables declared with the keyword constant must have an initial value. <variable-declaration>: IDENTIFIER ':' <stored-option> <constant-option> <type> <optional-initial-value> <stored-option>: /* NULL */ | stored <constant-option>: /* NULL */ | constant <optional-initial-value>: /* NULL */ | := <expr> Example: MyVariable : StopLightColor; 920i Programming Reference...
  • Page 23: Subprogram Declarations

    3.3.3 Subprogram Declarations A subprogram declaration defines the formal parameters, return type, local types and variables, and the executable code of a subprogram. Subprograms include handlers, procedures, and functions. Handler Declarations A handler declaration defines a subprogram that is to be installed as an event handler. An event handler does not permit parameters or a return type, and can only be invoked by the event dispatching system.
  • Page 24 A function must return to the point of call using a return-with-value statement. <function-declaration>: function IDENTIFIER <optional-formal-args> ':' <type> ';' <decl-section> begin <stmt-list> end ';' FUNCTION optional-formal-args IDENTIFIER type subprogram-completion Figure 3-10. Function Declaration Syntax Examples: function Sum (A : integer; B : integer) : Integer; 920i Programming Reference...
  • Page 25: Statements

    begin return A + B; end; function PoundsPerGallon : Real; begin return 8.34; end; Statements There are only six discrete statements in . Some statements, like the if, call, and assignment (:=) are used iRite extensively even in the simplest program, while the exit statement should be used rarely. The if and the loop statements have variations and can be quite complex.
  • Page 26: Call Statement

    : constant integer := 2; g_sString : string := "Initialized, not changed yet"; procedure PrintGlobalString; begin WriteLn(g_ciPrinterPort, g_sString); end; procedure SetGlobalString (var vsStringCopy : string); begin vsStringCopy := "String has been changed"; Write(g_ciPrinterPort, "In function call: "); PrintGlobalString; end; 920i Programming Reference...
  • Page 27: If Statement

    begin Write(g_ciPrinterPort, "Before function call: "); PrintGlobalString; SetGlobalString(g_sString); Write(g_ciPrinterPort, "After function call: "); PrintGlobalString; end GlobalAsVar; When run, the program prints the following: Before function call: Initialized, not changed yet In function call: Initialized, not changed yet After function call: String has been changed 3.4.3 If Statement THEN...
  • Page 28 := 2; elsif (rWeight > 4.5) and (rWeight < 9.25) then iGrade := 3; elsif (rWeight > 9.25) and (rWeight < 11.875) then iGrade := 4; else iGrade := 0; sErrorString := "Invalid Weight!"; end if; 920i Programming Reference...
  • Page 29: Loop Statement

    3.4.4 Loop Statement LOOP stmt-list optional-iteration-clause LOOP Figure 3-15. Loop Statement Syntax The loop statement is also quite important in programming. The loop statement is used to execute a statement list 0 or more times. An optional expression is evaluated and the statement list is executed. The expression is then re-evaluated and as long as the expression is true the statements will continue to get executed.
  • Page 30 Figure 3-17. Optional Step Clause Syntax NOTE: Use caution when designing loops to ensure that you don’t create an infinite loop. If your program encounters an infinite loop, only the loop will run; subsequent queued events will not be run. 920i Programming Reference...
  • Page 31: Return Statement

    3.4.5 Return Statement The return statement can only be used inside of subprograms (functions, procedures, and event handlers). The return statement in procedures and handlers cannot return a value. An explicit return statement inside a procedure or handler is not required since the compiler will insert one if the return statement is missing. If you want to return from a procedure or handler before the code body is done executing, then you can use the return statement to exit at that point.
  • Page 32: Built-In Types

    AuxFmt6, AuxFmt7, AuxFmt8, AuxFmt9, AuxFmt10, AuxFmt11, AuxFmt12, AuxFmt13, AuxFmt14, AuxFmt15, AuxFmt16, AuxFmt17, AuxFmt18, AuxFmt19, AuxFmt20 ); --TimerMode must match the definitions in API_timer.c in the core software. type TimerMode is (TimerOneShot, TimerContinuous, TimerDigoutON, TimerDigoutOFF); type OnOffType is (VOff, VOn); 920i Programming Reference...
  • Page 33 type Keys is (Soft4Key, Soft5Key, GrossNetKey, UnitsKey, Soft3Key, Soft2Key, Soft1Key, ZeroKey, Undefined3Key, Undefined4Key, TareKey, PrintKey, N1Key, N4Key, N7Key, DecpntKey, NavUpKey, NavLeftKey, EnterKey, Undefined5Key, N2Key, N5Key, N8Key, N0Key, Undefined1Key, Undefined2Key, NavRightKey, NavDownKey, N3Key, N6Key, N9Key, ClearKey), TimeDateKey, WeighInKey, WeighOutKey, ID_EntryKey, DisplayTareKey, TruckRegsKey, DisplayAccumKey, ScaleSelectKey, DisplayROCKey,...
  • Page 34 Scale1 : constant Integer := 1; Port1 : constant Integer := 1; SysResult : SysCode; TareWeight : Real; … SysResult:= GetTare (Scale1, Primary, TareWeight); if SysResult = SysOK then WriteLn (Port1, "The current tare weight is ", TareWeight)’ end if; 920i Programming Reference...
  • Page 35: Api Reference

    This section lists the application programming interfaces (APIs) used to program the indicator. Functions 920i are grouped according to the kinds of operations they support. NOTE: If you are unsure whether your version of software supports a given API, check the system.src file to see if the API is present.
  • Page 36: Tare Manipulation

    Removes the tare associated with scale S and sets the tare type associated with the scale to NoTare. Method Signature: function ClearTare (S : Integer) : SysCode; Parameters: [in] Scale number SysCode values returned: The scale specified by does not exist. SysInvalidScale The scale specified by has no tare. SysNoTare 920i Programming Reference...
  • Page 37: Rate Of Change

    The scale is reporting an error condition. SysDeviceError The function completed successfully. SysOK Example: ClearTare (Scale1); GetTareType Sets T to indicate the type of tare currently on scale S. Method Signature: function GetTareType (S : Integer; VAR T : TareType) : SysCode; Parameters: [in] Scale number...
  • Page 38: Accumulator Operations

    The units specified by is not valid. SysInvalidUnits The scale is reporting an error condition. SysDeviceError The accumulator is not enabled for the specified scale. SysPermissionDenied The function completed successfully. SysOK Example: AccumValue : Real; … GetAccum (Scale1, AccumValue); 920i Programming Reference...
  • Page 39 GetAccumCount Sets N to the number of accumulations performed for scale S since its accumulator was last cleared. Method Signature: function GetAccumCount (S : Integer; VAR N ; Integer) : SysCode; Parameters: [in] Scale number [out] Accumulator count SysCode values returned: The scale specified by does not exist.
  • Page 40: Scale Operations

    … AccumValue := 110.5 SetAccum (Scale1, Primary, AccumValue); 5.1.5 Scale Operations CurrentScale Sets S to the numeric ID of the currently displayed scale. Method Signature: function CurrentScale : Integer; Example: ScaleNumber : Integer; … ScaleNumber := CurrentScale; 920i Programming Reference...
  • Page 41 GetMode Sets M to the value representing the current display mode for scale S. Method Signature: function GetMode (S : Integer; VAR M : Mode) : SysCode; Parameters: [in] Scale number [out] Current display mode Mode values returned: Scale is currently in gross mode. GrossMode Scale is currently in net mode.
  • Page 42 Sets V to zero value if scale S is in an overload or underload condition. Otherwise, V is set to a non-zero value. Method Signature: function InRange (S : Integer; VAR V : Integer) : SysCode; Parameters: [in] Scale number [in] In-range value SysCode values returned: 920i Programming Reference...
  • Page 43 The scale specified by does not exist. SysInvalidScale The scale is reporting an error condition. SysDeviceError The function completed successfully SysOK Example: ScaleInRange : Integer; … InRange (Scale1, ScaleInRange); SelectScale Sets scale S as the current scale. Method Signature: function SelectScale (S : Integer) : SysCode; Parameters: [in] Scale number...
  • Page 44: A/D And Calibration Data

    GetLCCD (S : Integer; VAR V : Integer) : SysCode; Parameters: [in] Scale number [out] Deadload count SysCode values returned: The scale specified by does not exist. SysInvalidScale The scale specified by is not an A/D-based scale. SysInvalidRequest 920i Programming Reference...
  • Page 45 The function completed successfully. SysOK GetLCCW Sets V to the calibrated span count for scale S. Method Signature: function GetLCCW (S : Integer; VAR V : Integer) : SysCode; Parameters: [in] Scale number [out] Calibrated span count SysCode values returned: The scale specified by does not exist.
  • Page 46: System Support

    Returns a true (non-zero) value if the display is suspended (using the SuspendDisplay procedure), or a false (zero) value if the display is not suspended. Method Signature: function DisplayIsSuspended : Integer; EnableHandler Enables the specified event handler. See Section 6.1 on page 79 for a list of handlers. Method Signature: procedure EnableHandler (handler); 920i Programming Reference...
  • Page 47 EventChar Returns a one-character string representing the character received on a communications port that caused the event. If EventChar is called outside the scope of a event, EventChar returns a PortxCharReceived PortxCharReceived string of length zero. See Section 6.1 on page 79 for information about the event handler.
  • Page 48 Method Signature: procedure GetEIN (I : Integer); Parameters: [out] EIN number GetGrads Sets G to the configured grad value of scale S. Method Signature: function GetGrads (S : Integer; VAR G : Integer) : SysCode; 920i Programming Reference...
  • Page 49 Parameters: [in] Scale number [out] Grads value SysCode values returned: The scale specified by does not exist. SysInvalidScale The scale specified by does not support this operation (serial scale). SysInvalidRequest The scale is reporting an error condition. SysDeviceError The function completed successfully. SysOK GetSoftwareVersion Returns the current software version.
  • Page 50 SetSoftkeyText (K : Integer; S : String) : SysCode; Parameters: [in] Softkey number [in] Softkey text SysCode values returned: The value specified for K is less than 1 or greater than 10, or does not represent a SysInvalidRequest configured softkey. The function completed successfully. SysOK 920i Programming Reference...
  • Page 51 SetSystemTime Sets the realtime clock to the value specified in DT. Method Signature: function SetSystemTime (VAR DT : DateTime) : SysCode; Parameters: [in] System DateTime SysCode values returned: Hour or minute entry not valid. SysInvalidRequest The function completed successfully. SysOK SetTime Sets the time in DT to the values specified by Hour, Minute, and Second.
  • Page 52: Serial I/O

    Auxiliary format AuxFmtx SysCode values returned: The print format specified by does not exist. SysInvalidRequest The request could not be processed because the print queue is full. SysQFull The function completed successfully. SysOK Example: Fmtout : PrintFormat; … 920i Programming Reference...
  • Page 53 Fmtout := NetFmt Print (Fmtout); Send Writes the integer or real number specified in <number> to the port specified by P. Method Signature: procedure Send (P : Integer; <number>); Parameters: [in] Serial port number Example: Send (Port1, 123.55); -- sends the value "123.55" to Port 1. SendChr Writes the single character specified to the port specified by P.
  • Page 54 This procedure cannot be used to send null characters. Use the SendChr or SendNull procedure to NOTE: send null characters. Method Signature: procedure Write (P : Integer; <arg-list>); Parameters: [in] Serial port number [in] arg_list Print text Example: WriteLn (Port1, "This is another test."); 920i Programming Reference...
  • Page 55: Program Scale

    SubmitData indicators configured for program scale operation, passes data from a user program to the scale 920i processor. Weight, mode, and tare values are provided by the user program; the displayed weight is the weight value minus tare. Gross/net mode is set by the gn parameter regardless of whether a tare value is passed. This allows display of a net value when the net is known but gross and tare values are not available.
  • Page 56 GetSPBand (SP : Integer; V : Real) : SysCode; Parameters: [in] Setpoint number [out] Band value SysCode values returned: The setpoint specified by does not exist. SysInvalidSetpoint The setpoint specified by has no hysteresis (BANDVAL) parameter. SysInvalidRequest The function completed successfully. SysOK 920i Programming Reference...
  • Page 57 Example: SP7Bandval : Real; … GetSPBand (7, SP7BAndval); WriteLn (Port1, "Current Band Value of SP7 is", SP7Bandval); GetSPCaptured Sets V to the weight value that satisfied the setpoint SP. Method Signature: function GetSPCaptured (SP : Integer; V : Real) : SysCode; Parameters: [in] Setpoint number...
  • Page 58 The setpoint specified by does not exist. SysInvalidSetpoint The setpoint specified by has no preact (PREACT) parameter. SysInvalidRequest The function completed successfully. SysOK Example: SP2Preval : Real; … GetSPPreact (2, SP2Preval); WriteLn (Port1, "Current Preact Value of SP2 is", SP2Preval); 920i Programming Reference...
  • Page 59 GetSPPreCount Sets Count to the preact learn interval value (PCOUNT parameter) of setpoint SP. Method Signature: function GetSPPreCount (SP : Integer; Count : Integer) : SysCode; Parameters: [in] Setpoint number [out] Preact learn interval value Count SysCode values returned: The setpoint specified by does not exist.
  • Page 60 The function completed successfully. SysOK ResetBatch Terminates a running, stopped, or paused batch process and resets the batch system. Method Signature: function ResetBatch : SysCode; SysCode values returned: The BATCHNG configuration parameter is set to OFF. SysPermissionDenied 920i Programming Reference...
  • Page 61 No batch routine is running. SysBatchRunning The function completed successfully. SysOK SetBatchingMode Sets the batching mode (BATCHNG parameter) to the value specified by M. Method Signature: function SetBatchingMode (M : BatchingMode) : SysCode; Parameters: [in] Setpoint number [in] Batching mode BatchingMode values sent: Batching mode is off.
  • Page 62 The setpoint specified by has no NSAMPLE parameter. SysInvalidRequest The value cannot be changed because a batch process is currently running. SysBatchRunning The value specified for is not in the allowed range for setpoint SysOutOfRange The function completed successfully. SysOK 920i Programming Reference...
  • Page 63 Example: SP5NS : Integer; … SP5NS := 10 SetSPNSample (5, SP5NS); SetSPPreact Sets the preact value (PREACT parameter) of setpoint SP to the value specified by V. Method Signature: function SetSPPreact (SP : Integer; V : Real) : SysCode; Parameters: [in] Setpoint number [in]...
  • Page 64 SP3VOR := 35.5 SetSPVover (3, SP3VOR); SetSPVunder For checkweigh (CHKWEI) setpoints, sets the underrange value (VUNDER parameter) of setpoint SP to the value specified by V. Method Signature: function SetSPVunder (SP : Integer; V : Real) : SysCode; Parameters: 920i Programming Reference...
  • Page 65: Digital I/O Control

    [in] Setpoint number [in] Underrange SysCode values returned: The setpoint specified by does not exist. SysInvalidSetpoint The setpoint specified by has no VUNDER parameter. SysInvalidRequest The function completed successfully. SysOK Example: SP4VUR : Real; … SP4VUR := 26.4 SetSPVunder (4, SP4VUR); StartBatch Starts or resumes a batch run.
  • Page 66: Fieldbus Data

    Returns the status word for the specified fieldbus. See the fieldbus Installation and Programming manual for a description of the status word format. Method Signature: function GetFBStatus (fieldbus_no : Integer; scale_no : Integer; VAR status : Integer) : SysCode; Parameters: [in] Fieldbus number fieldbus_no [in] Scale number scale_no 920i Programming Reference...
  • Page 67 [out] Fieldbus status status SysCode values returned: SysInvalidRequest The function completed successfully. SysOK GetImage For integer data, GetImage returns the content of the BusImage for the specified fieldbus. Method Signature: function GetImage (fieldbus_no : Integer; VAR data : BusImage) : SysCode; Parameters: [in] Fieldbus number...
  • Page 68: Analog Output Operations

    PulseRate (S : Integer; VAR R : Integer) : SysCode; Parameters: [in] Slot number [out] Current pulse rate SysCode values returned: The specified counter ( ) is not a valid pulse input. SysInvalidCounter The function completed successfully. SysOK 920i Programming Reference...
  • Page 69: Display Operations

    5.10 Display Operations ClosePrompt Closes a prompt opened by the PromptUser function. Method Signature: procedure ClosePrompt; DisplayStatus Displays the string msg in the front panel status message area. The length of string msg should not exceed 32 characters. Method Signature: procedure DisplayStatus (msg : String);...
  • Page 70: Display Programming

    The value specified for gr_num is greater than 100. SysDeviceError The function completed successfully. SysOK SetBargraphLevel Sets the displayed level of bargraph widget W to the percentage (0–100%) specified by Level. Method Signature: function SetBargraphLevel (W : Integer; Level : Integer) : SysCode; Parameters: 920i Programming Reference...
  • Page 71 Sets the state of symbol widget W to S. The widget state determines the variant of the widget symbol displayed. All widgets have at least two states (values 1 and 2); some have three (3). See Section 9.0 of the Installation 920i Manual for descriptions of the symbol widget states. Method Signature: function SetSymbolState (W : Integer;...
  • Page 72: Graphing

    : Integer; width : Integer) : SysCode; Parameters: [in] Graphic number graphic_no [in] X-axis starting pixel location x_start [in] Y-axis starting pixel location y_start [in] Graphic bitmap bitmap [in] Color type color [in] Graphic height height [in] Graphic width width 920i Programming Reference...
  • Page 73 SysCode values returned: The DisplayImage specified by does not exist. SysInvalidRequest bitmap SysOutOfRange Specified parameters exceed display height or width, or are too small to accommodate the graphic. SysDeviceError Internal error The function completed successfully. SysOK Example: G_Graph1 : DisplayImage; result : Syscode;...
  • Page 74: 5.13 Database Operations

    I, before a call to <DB>.FindFirst or <DB>.FindLast. <DB>.FindFirst Finds the first record in the referenced database that matches the contents of <DB> column I. Method Signature: function <DB>.FindFirst (I : Integer) : SysCode; SysCode values returned: 920i Programming Reference...
  • Page 75 The referenced database cannot be found. SysNoSuchDatabase The requested record is not contained in the database. SysNoSuchRecord The column specified by does not exist. SysNoSuchColumn The function completed successfully. SysOK <DB>.FindLast Finds the last record in the referenced database that matches the contents of <DB> column I. Method Signature: function <DB>.FindLast (I : Integer) : SysCode;...
  • Page 76: Timer Controls

    Resets the value of timer T (1–32) by stopping the timer, setting the timer mode to TimerOneShot, and setting the timer time-out to 1. Parameters: [in] Timer number Method Signature: function ResetTimer (T : Integer) : Syscode; SysCode values returned: The timer specified by a not valid timer. SysInvalidTimer 920i Programming Reference...
  • Page 77 The function completed successfully. SysOK ResumeTimer Restarts a stopped timer T (1–32) from its stopped value. Method Signature: function ResumeTimer (T : Integer) : Syscode; Parameters: [in] Timer number SysCode values returned: The timer specified by a not valid timer. SysInvalidTimer The function completed successfully.
  • Page 78: 5.15 Mathematical Operations

    Returns a value between –π/2 and π/2, representing the arctangent of x in radians. Method Signature: function Atan (x : Real) : Real; Ceil Returns the smallest integer greater than or equal to x. Method Signature: function Ceil (x : Real) : Integer; 920i Programming Reference...
  • Page 79: 5.16 Bit-Wise Operations

    Returns the cosine of x. x must be specified in radians. Method Signature: function Cos (x : Real) : Real; Returns the value of e Method Signature: function Exp (x : Real) : Real; Returns the value of log (x). Method Signature: function Log (x : Real) : Real;...
  • Page 80: String Operations

    If start is greater than the string length, the result is an empty string. If start + length is greater than the length of S, the returned value contains the characters from start through the end of S. Method Signature: function Mid$ (S : String; start : Integer; length : Integer) : String; 920i Programming Reference...
  • Page 81: 5.18 Data Conversion

    Oct$ Returns an 11-character octal string equivalent to I. Method Signature: function Oct$ (I : Integer) : String; Right$ Returns a string containing the rightmost I characters of string S. If I is greater than the length of S, the function returns a copy of S.
  • Page 82: Data Recording

    Integer; stop_sp : Integer) : SysCode; Parameters: [in] Data array name data [in] Scale number scale_no [in] Start setpoint number start_sp [in] Stop setpoint number stop_sp SysCode values returned: The function did not complete. SysRequestFailed The function completed successfully. SysOK 920i Programming Reference...
  • Page 83: Appendix

    Runs when the UP navigation key is released NumericKeyPressed Runs when any key on the numeric keypad (including CLR or decimal point) is pressed. Use the EventKey function within this handler to determine which key caused the event. Table 6-1. 920i Event Handlers Appendix...
  • Page 84: Compiler Error Messages

    Runs when the ENTER key or Cancel softkey is pressed in response to a user prompt ZeroKeyPressed Runs when the ZERO key is pressed ZeroKeyReleased Runs when the ZERO key is released Table 6-1. 920i Event Handlers (Continued) Compiler Error Messages Error Messages Cause (Statement Type) Argument is not a handler name...
  • Page 85 Error Messages Cause (Statement Type) Expression must be numeric For statement Expression type does not match declaration Initializer Function name overloads handler name Function declaration uses name reserved for handler Handlers may not be called Procedure/function call Identifier already declared in this scope All declarations Illegal comparison Boolean expression...
  • Page 86: Irev Database Operations

    Database Operations You can use and the database utility software (PN 72809) to edit, save, and restore ® iRev 920i Interchange databases for the . This section describes procedures for maintaining databases using , including: 920i 920i iRev •...
  • Page 87: Clearing

    . If iRev Next Finish you wish to downloaded the imported database to the , follow the procedure described in 920i Section 6.3.5. 6.3.4 Clearing button on the top of the toolbar in the Data Editor clears both the screen and the entire...
  • Page 88: Program To Retrieve 920I Hardware Configuration

    EventPort call from within the BusCommandHandler. Example BusCommandHandler Code -------------------------------------------------------- -- Handler Name : BusCommandHandler -- Created By : Rice Lake Weighing Systems -- Last Modified on : 1/16/2003 -- Purpose : Example handler skeleton. -- Side Effects : -------------------------------------------------------- handler BusCommandHandler;...
  • Page 89 program Hardware; my_array : HW_array_type; handler User1KeyPressed; i : integer; next_slot : HW_type; begin Hardware(my_array); for i := 1 to 14 loop if my_array[i] = NoCard then WriteLn(2,"Slot ",i," No Card"); elsif my_array[i] = DualAtoD then WriteLn(2,"Slot ",i," DualAtoD"); elsif my_array[i] = SingleAtoD then WriteLn(2,"Slot ",i,"...
  • Page 90: 920I User Graphics

    920i User Graphics user programs can be used to display graphics. The entire display is writeable; graphics can be of any iRite 920i size, up to the full size of the display, and up to 100 graphic images can be displayed. The actual number of...
  • Page 91: Api Index

    API Index IntegerToString 77 RealToString 77 A/D and calibration data APIs StringToInteger 77 GetFilteredCount StringToReal 78 GetLCCD data recording GetLCCW CloseDataRecording 78 GetMV GetDataRecordSize 78 GetRawCount InitDataRecording 78 GetWVAL database operations GetZeroCount <DB>.Add 70 scale operations <DB>.Clear 70 GetFilteredCount 40 <DB>.Delete 70 GetLCCD 40 <DB>.Findfirst 70...
  • Page 92 GetNet Oct$ GetRawCount PauseBatch GetROC Print GetSoftwareVersion program scale GetSPBand SubmitData 51 GetSPCaptured ProgramDelay GetSPDuration PromptUser GetSPHyster pulse input operations GetSPNSample ClearPulseCount 64 GetSPPreact PulseCount 64 GetSPPreCount PulseRate 64 GetSPTime PulseCount GetSPValue PulseRate GetSPVover RealToString GetSPVunder RemoveGraph 920i Programming Reference...
  • Page 93 ResetBatch SetAlgout ResetTimer SetBargraphLevel ResumeDisplay SetBatchingMode ResumeTimer SetConsecNum Right$ SetDate scale data acquisition SetDigout A/D and calibration data SetEntry GetFilteredCount 40 SetImage GetLCCD 40 SetImageReal GetLCCW 41 SetLabelText GetMV 41 SetMode GetRawCount 41 SetNumericValue GetWVAL 42 setpoints and batching GetZeroCount 42 DisableSP 51 accumulator operations EnableSP 51...
  • Page 94 EventTime 44 Chr$ GetConsecNum 44 ClearAccum GetCountBy 44 ClearGraph GetDate 44 ClearPulseCount GetEIN 44 ClearTare GetGrads 44 CloseDataRecording GetSoftwareVersion 45 ClosePrompt GetTime 45 GetUID 45 CurrentScale LockKey 45 LockKeypad 45 ProgramDelay 46 data conversion APIs ResumeDisplay 46 920i Programming Reference...
  • Page 95 IntegerToString RealToString EnableHandler StringToInteger EnableSP StringToReal EventChar data recording APIs EventKey CloseDataRecording EventPort GetDataRecordSize EventStatus InitDataRecording EventString database operations APIs EventTime <DB>.Add <DB>.Clear <DB>.Delete <DB>.FindFirst fieldbus data APIs <DB>.FindLast GetFBStatus <DB>.FindNext GetImage <DB>.FindPrev GetImageReal <DB>.GetFirst SetImage <DB>.GetLast SetImageReal <DB>.GetNext <DB>.GetPrev <DB>.Sort GetAccum <DB>.Update...
  • Page 96 InRange 38 ATan SelectScale 39 Ceil SetMode 39 SetUnits 39 ZeroScale 40 tare manipulation Log10 AcquireTare 32 Sign ClearTare 32 GetTareType 33 Sqrt SetTare 33 weight acquisition Mid$ GetGross 31 GetNet 31 GetTare 32 Oct$ scale operations APIs 920i Programming Reference...
  • Page 97 CurrentScale SetSPCount GetMode SetSPDuration GetUnits SetSPHyster GetUnitsString SetSPNSample InCOZ SetSPPreact InMotion SetSPPreCount InRange SetSPTime SelectScale SetSPValue SetMode SetSPVover SetUnits SetSPVunder ZeroScale StartBatch SelectScale StopBatch SelectScreen SetPrintText Send SetSoftkeyText SendChr SetSPBand SendNull SetSPCount serial I/O APIs SetSPDuration Print SetSPHyster Send SetSPNSample SendChr SetSPPreact SendNull...
  • Page 98 LockKey LockKeypad ProgramDelay ResumeDisplay SetConsecNum SetDate SetSoftkeyText SetSystemTime SetTime SetUID STick SuspendDisplay SystemTime Time$ UnlockKey UnlockKeypad SystemTime tare manipulation APIs AcquireTare ClearTare GetTareType SetTare Time$ timer control APIs ResetTimer ResumeTimer SetTimer SetTimerDigout SetTimerMode StartTimer StopTimer UCase$ UnlockKey 920i Programming Reference...

Table of Contents