### Example: Configuring and Starting Timer for Digital Output (Proprietary Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md A sequence demonstrating how to configure and start a timer (Timer 1) to control a digital output (slot 0, bit 1). It sets the timer value to 1 second, sets the mode to turn on the digital output upon expiration, links the timer to the specific digital output, and then starts the timer. ```Proprietary Pascal-like SetTimer(1,100); SetTimerMode(1,TimerDigoutOn); SetTimerDigout(1,0,1); StartTimer(1); ``` -------------------------------- ### Example: Enable Setpoint 4 (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md An example demonstrating how to call the EnableSP function to enable setpoint number 4. ```Proprietary Pascal-like EnableSP (4); ``` -------------------------------- ### Open USB File for Reading (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use USBFileOpen to open an existing file named 'test' on the USB drive for reading data. The internal pointer is positioned at the start of the file. ```API Call USBFileOpen(test,FileRead); ``` -------------------------------- ### Open File on SD Card for Reading (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use FileOpen to open an existing file named 'Testing.txt' on the SD card for reading data. The internal pointer is positioned at the start of the file. ```API Call FileOpen("Testing.txt",SDCard,FileRead); ``` -------------------------------- ### Example: Setting Setpoint Band Value (iRite/Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md An example demonstrating how to declare a variable for the band value, assign a value to it, and then call the SetSPBand function to set the band value for setpoint 7. ```iRite/Pascal-like SP7Bandval : Real; SP7Bandval := 10.0; SetSPBand (7, SP7Bandval); ``` -------------------------------- ### Open File on SD Card for Creation (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use FileOpen to create a new, empty file named 'Testing.txt' on the SD card. If the file exists, it will be overwritten. ```API Call FileOpen("Testing.txt",SDCard,FileCreate); ``` -------------------------------- ### Open USB File for Creation (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use USBFileOpen to create a new, empty file named 'Testing.txt' on the USB drive. If the file exists, it will be overwritten. ```API Call USBFileOpen(Testing.txt, FileCreate); ``` -------------------------------- ### SetTare Example (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to set a tare value using the SetTare function. It declares a Real variable for the desired tare, assigns a value, and then calls SetTare with scale 1, Primary units, and the desired tare value. ```Pascal DesiredTare : Real; DesiredTare := 1234.5; SetTare (1, Primary, DesiredTare); ``` -------------------------------- ### Starting FTP Server Pascal Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Initiates the FTP server, allowing external devices access. Requires manual password configuration and enabling the FTP server in the system configuration. Returns a SysCode indicating the operation status. ```Pascal function StartFTPServer : SysCode; ``` -------------------------------- ### EventKey KeyPressed Example System Language Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md An example handler demonstrating how to use the EventKey function within a KeyPressed event to check if the pressed key is the ClearKey. ```System Language handler KeyPressed; begin if EventKey = ClearKey then end if; end; ``` -------------------------------- ### Example: GetGrads (Pascal/Delphi) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates an example call to the GetGrads function. It retrieves the configured grad value for Scale 1 and stores the result in the variable Grads. ```Pascal/Delphi GetGrads (1, Grads); ``` -------------------------------- ### SetAllDigOut Example 1 - Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example usage of the SetAllDigOut function. Sets the outputs on the DIO card in slot 3 using the bitmask value 68. This corresponds to setting bits 3 and 7 to the ON state. ```Pascal-like SetAlIDigOut(3, 68) ``` -------------------------------- ### Retrieve and Display Hardware Configuration - iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This iRite program retrieves the hardware configuration of the indicator using the built-in Hardware function, which populates an array with coded identifiers for installed option cards. It then iterates through the array, deciphers the codes, and prints the name of the card installed in each slot to output channel 2. The array size is fixed for a 920i (14 slots), and the program includes checks for various card types. ```iRite program Hardware; my_array ∶ HW_array_type; handler User1KeyPressed; i : integer; 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," SinglAtoD"); elsif my_array[i] σ=σ DualSerial then WriteLn(2,"Slot ",i," DualSerial"); elsif my_array[i] σ=σ AnalogOut then WriteLn(2,"Slot ",i," AnalogOut"); elsif my_array[i] σ=σ DigitalIO then WriteLn(2,"Slot ",i," DigitalIO"); elsif my_array[i] λ= Pulse then WriteLn(2,"Slot ",i," Pulse"); elsif my_array[i] σ=σ Memory then WriteLn(2,"Slot ",i," Memory"); elsif my_array[i] σ=σ DeviceNet then WriteLn(2,"Slot ",i," DeviceNet"); elsif my_array[i] λ= Profibus then WriteLn(2,"Slot ",i," Profibus"); elsif my_array[i] λ= Ethernet then WriteLn(2,"Slot ",i," Ethernet"); elsif my_array[i] σ=σ ABRIO then WriteLn(2,"Slot ",i," ABRIO"); elsif my_array[i] σ=σ BCD then WriteLn(2,"Slot ",i," BCD"); elsif my_array[i] σ=σ DSP2000 then WriteLn(2,"Slot ",i," DSP2000"); elsif my_array[i] σ=σ AnalogInput then WriteLn(2,"Slot ",i," AnalogInput"); elsif my_array[i] σ=σ ControlNet then WriteLn(2,"Slot ",i," ControlNet"); elsif my_array[i] σ=σ DualAnalogOut the WriteLn(2,"Slot ",i," DualAnalogOut") end if; end loop; WriteLn(2,""); end; nd Hardware; ``` -------------------------------- ### Example: SetDFStages (Pascal/Delphi) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates an example call to the SetDFStages function. It sets the digital filtering stages for Scale 1, setting all three stages (S1, S2, S3) to the value 4. ```Pascal/Delphi SetDFStages (1,4,4,4); ``` -------------------------------- ### Example: Disable Setpoint 4 (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md An example demonstrating how to call the DisableSP function to disable setpoint number 4. ```Proprietary Pascal-like DisableSP (4); ``` -------------------------------- ### Example: GetCountBy (Pascal/Delphi) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates an example call to the GetCountBy function. It retrieves the count-by value for Scale 1 using Primary units and stores the result in the variable CountBy. ```Pascal/Delphi GetCountBy (1, Primary, CountBy); ``` -------------------------------- ### Example Fieldbus Command Handler - Proprietary (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This snippet provides an example skeleton for the BusCommandHandler, which is triggered upon receiving a fieldbus message. It illustrates the standard sequence of operations: initializing a data array, identifying the source port using EventPort, reading incoming data with GetImage, and preparing to send data back using SetImage. It serves as a template for implementing custom fieldbus logic. ```Proprietary (Pascal-like) handler BusCommandHandler; --Declaration Section busPort : integer; data : BusImage; i : integer; result : SysCode; begin -- Clear out the data array. for i := 1 to 32 loop data[i] := 0; end loop; -- Find out which port (which bus card) started this event. busPort := EventPort; -- Then read the received data. result := GetImage(busPort, data); -- Test result as desired -- Data interpretation and manipulation goes here. -- Finally, put the changed data back. result := SetImage(busPort, data); -- Test result as desired end; ``` -------------------------------- ### SetDigout Function Example - Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md An example demonstrating how to use the SetDigout function. It declares an integer variable, assigns it a value, and then calls SetDigout to set the output at slot 0, bit 2 to the value of the variable (0). ```Pascal-like DIGOUTSOB2 : Integer; ``` ```Pascal-like DIGOUTSOB2 := 0; ``` ```Pascal-like SetDigout (0, 2, DIGOUTSOB2); ``` -------------------------------- ### iRite Hello World Program (Startup) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This iRite program displays "Hello, world!" in the indicator's status area when the program starts. It uses the implicit ProgramStartup event handler and calls the built-in DisplayStatus procedure. ```iRite program HelloWorld; begin DisplayStatus("Hello, world!"); end HelloWorld; ``` -------------------------------- ### Example: Calling GetDigout (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to declare an integer variable `DIGOUTSOB2` and call the GetDigout function for slot 0, bit 2, to retrieve the status of the digital output. ```Pascal-like DIGOUTSOB2 : Integer; GetDigout (0,2, DIGOUTSOB2); ``` -------------------------------- ### Acquiring and Displaying Millivolts (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Shows how to declare a Real variable for millivolts, call the GetMV function to get the millivolt reading for a scale, and display the result formatted to two decimal places. ```Pascal Millivolt : Real; GetMV (1, Millivolt); Writeln (1,"Current Millivolt reading is"+ realtostring(Millivolt,0,2)); ``` -------------------------------- ### Example GetSPVunder Usage (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to call the GetSPVunder function to retrieve the underrange value of setpoint 4 and print it to output channel 1, formatted to 2 decimal places. ```Pascal-like SP4VUR : Real; GetSPVunder (4, SP4VUR); WriteLn (1, "Current Underrange Value of SP4 is "+ RealToString(SP4VUR,0,2)); ``` -------------------------------- ### SetAllDigOut Example 2 - Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Another example usage of the SetAllDigOut function. Sets the outputs on the Onboard DIO in slot 0 using the bitmask value 86. This corresponds to setting bits 2, 3, 5, and 7 to the ON state. ```Pascal-like SetAIIDigOut(0, 86) ``` -------------------------------- ### Get Software Version (Proprietary) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns the current software version string of the device. Provides information about the installed firmware. ```Proprietary function GetSoftwareVersion : String; ``` -------------------------------- ### Getting Scale Display Mode (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Documents the `GetMode` function signature and an example call. This function retrieves the current display mode (e.g., GrossMode, NetMode) for a specified scale number `S`, returning the mode value in the `VAR` parameter `M` and a `SysCode` indicating the operation's status. The example demonstrates calling `GetMode` for scale 1 and storing the result in a `Mode` variable `CurrentMode`. ```Pascal function GetMode (S : Integer; VAR M : Mode) : SysCode; ``` ```Pascal CurrentMode : Mode; ``` ```Pascal GetMode (1, CurrentMode); ``` -------------------------------- ### Start Timer (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Starts a specified timer. For one-shot timers, this function must be called each time the timer is used. Continuous timers only need to be started once unless stopped. If a timer is set with a time-out value of 0, StartTimer will not start it but will return SysOK. Parameter T is the timer number. Returns SysOK or SysInvalidTimer. ```Pascal function StartTimer (T : Integer) : Syscode; ``` -------------------------------- ### Example GetSPValue Usage (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to call the GetSPValue function to retrieve the value of setpoint 4 and print it to output channel 1, formatted to 2 decimal places. ```Pascal-like SP4Val : Real; GetSPValue (4, SP4Val); WriteLn(1,"Current Value of SP4 is "+ RealToString(SP4Val,0,2)); ``` -------------------------------- ### Example: Calling GetDigin (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to declare an integer variable `DIGINSOB3`, call the GetDigin function for slot 0, bit 3, and then write the retrieved status to the console using WriteLn and IntegerToString. ```Pascal-like DIGINSOB3 : Integer; GetDigin (0,3, DIGINSOB3); WriteLn (1, "Digin SOB3 status is "+ IntegerToString(DIGINSOB3,0)); ``` -------------------------------- ### Starting Weight Collection (Scale Language) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Initiates the collection of weight data from a specified scale and directs it into a user-defined array of type WeightCollectionArray. ```Scale Language Function StartWeightCollection (scale_no : Integer; data : WeightCollectionArray) : SysCode; ``` -------------------------------- ### Example: Calling GetDigAll (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to declare an integer variable `dioStatus` and call the GetDigAll function for slot 0 to retrieve the bitmasked status of all digital I/O points into `dioStatus`. ```Pascal-like dioStatus : integer; GetDigAll(0, dioStatus); ``` -------------------------------- ### EventChar Port4CharReceived Example System Language Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md An example handler demonstrating how to use the EventChar function within a Port4CharReceived event to capture the received character into the variable strOneChar. ```System Language handler Port4CharReceived; begin strOneChar := EventChar; end; ``` -------------------------------- ### Example GetSPVover Usage (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to call the GetSPVover function to retrieve the overrange value of setpoint 3 and print it to output channel 1, formatted to 2 decimal places. ```Pascal-like SP3VOR : Real; GetSPVover (3, SP3VOR); WriteLn (1, "Current Overrange Value of SP3 is "+ RealToString(SP3VOR,0,2)); ``` -------------------------------- ### Declaring an Event Handler Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example defines an event handler subprogram named 'SP1Trip'. Handlers do not accept parameters or return values and are invoked by the event dispatching system. The example includes a simple loop and conditional return statement. ```Custom handler SP1Trip; I : Integer; begin for I:=1 to 10 loop Writeln (1, "Setpoint Tripped!"); if I=2 then return; endif; end loop; end; ``` -------------------------------- ### Printing Data with Advanced Printer - Proprietary Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to start a document, write data, and end the document using the "ADVPRN" connection. It includes basic error handling for the StartDocument call and requires successful calls to StartDocument and EndDocument for the document to print. ```Proprietary if StartDocument("ADVPRN") = SysOk then Writeoutln("ADVPRN","String data to print"); else DisplayStatus("Printer Error"); end if; if EndDocument("ADVPRN") = SysOk then ``` -------------------------------- ### Close File (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use FileClose to close the file that was previously opened using FileOpen on any supported device. ```API Call FileClose(); ``` -------------------------------- ### Open File on SD Card for Appending (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use FileOpen to open an existing file named 'Testing.txt' on the SD card for appending data. This function is similar to USBFileOpen but includes a device parameter. ```API Call FileOpen("Testing.txt",SDCard,FileAppend); ``` -------------------------------- ### Open USB File for Appending (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use USBFileOpen to open an existing file named 'Testing.txt' on the USB drive for appending data. The internal pointer is positioned at the end of the file. ```API Call USBFileOpen(Testing.txt,FileAppend); ``` -------------------------------- ### Close USB File (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use USBFileClose to close the file that was previously opened on the USB drive using USBFileOpen. ```API Call USBFileClose(); ``` -------------------------------- ### Starting Data Streaming - Proprietary (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Initiates data streaming for a specified serial port number (P). Streaming must be pre-configured and enabled for the port in the device's configuration. Returns SysInvalidPort if the port is invalid, SysInvalidRequest if streaming is not configured, or SysOK on success. ```Proprietary (Pascal-like) StartStreaming (1); ``` -------------------------------- ### Extracting Substring Proprietary/Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This function extracts a substring from a source string `S` starting at `start` position for a specified `length`. If `start` is beyond the string length, an empty string is returned. If `start + length` exceeds the string length, characters from `start` to the end are returned. It takes a source `String`, an `Integer` start position, and an `Integer` length, returning a `String`. ```Proprietary/Pascal-like function Mid$ (S : String; start : Integer; length : Integer) : String; ``` -------------------------------- ### Example ClearAccum Call (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to call the ClearAccum function to clear the accumulator for scale number 1. ```Pascal-like ClearAccum (1); ``` -------------------------------- ### Delete USB File (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use USBFileDelete to remove the file named 'Testing.txt' from the USB drive. ```API Call USBFileDelete("Testing.txt"); ``` -------------------------------- ### Example GetAccumCount Call (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to call the GetAccumCount function to retrieve the number of accumulations for scale 1, storing the result in the NumAccums variable. ```Pascal-like NumAccums : Integer; GetAccumCount (1, NumAccums); ``` -------------------------------- ### Delete File from USB Drive (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use FileDelete to remove the file named 'Testing.txt' from the USB drive. ```API Call FileDelete("Testing.txt", USB); ``` -------------------------------- ### Declaring a Simple Variable Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example shows a basic variable declaration for 'MyVariable' using a previously defined type 'StopLightColor'. The comment indicates its purpose. ```Custom MyVariable : StopLightColor; -- Declare MyVariable ``` -------------------------------- ### Delete File from FTP Server (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Example demonstrating how to use FileDelete to remove the file named 'Testing.txt' from the FTP server. ```API Call FileDelete("Testing.txt", FTP); ``` -------------------------------- ### Example GetAccum Call (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to call the GetAccum function to retrieve the accumulated value for scale 1 in Primary units, storing the result in the AccumValue variable. ```Pascal-like AccumValue : Real; GetAccum (1, Primary, AccumValue); ``` -------------------------------- ### Getting Current Scale Number (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Documents the `CurrentScale` function signature and an example of its usage. This function provides the integer identifier of the scale currently active or displayed. The example shows declaring an integer variable `ScaleNumber` and assigning the function's return value to it. ```Pascal function CurrentScale : Integer; ``` ```Pascal ScaleNumber : Integer; ``` ```Pascal ScaleNumber := CurrentScale; ``` -------------------------------- ### Getting Scale Display Units (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Documents the `GetUnits` function signature and an example call. This function retrieves the current display units (e.g., Primary, Secondary, Tertiary) for a specified scale number `S`, returning the units value in the `VAR` parameter `U` and a `SysCode`. The example shows calling `GetUnits` for scale 1 and storing the result in a `Units` variable `CurrentUnits`. ```Pascal function GetUnits (S : Integer; VAR U : Units) : SysCode; ``` ```Pascal CurrentUnits : Units; ``` ```Pascal GetUnits (1, CurrentUnits); ``` -------------------------------- ### Enumeration Type Declaration Example 2 - iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines an enumeration type `BatchStates` representing different states in a hypothetical batch process. ```iRite type BatchStates is (NotStarted, OpenFeedGate, CloseGate, WaitforSS, PrintTicket, AllDone); ``` -------------------------------- ### Defining a Simple Record Type Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example demonstrates the basic syntax for defining a record type named 'MyRecord' with two fields: 'A' of type integer and 'B' of type real. ```Custom type MyRecord is record A : integer; B : real; end record; ``` -------------------------------- ### Defining a Database Type Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example shows how to define a database type named 'MyDB' with an alias 'DBALIAS'. It includes two fields, 'A' of type integer and 'B' of type real, demonstrating the structure for database definitions. ```Custom type MyDB is database ("DBALIAS") A : integer B : real end database; ; ``` -------------------------------- ### Using Parentheses for Grouping and Parameters in iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Provides examples of how parentheses are used to control operator precedence in arithmetic expressions and to enclose the list of parameters when calling a function. ```iRite iFarenheit := ((9.0/5.0)*iCelcius)+32 ; EnableSP(5); ``` -------------------------------- ### Handle USB Assignment Result (920i) - Proprietary Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md An example snippet showing how to check the result of `GetUSBAssignment` (`dDevice`) and print a description of the assigned device type to `OutPort`. This snippet is likely part of a larger conditional block. ```Proprietary elsif dDevice = USBPrinter1 then WriteLn(OutPort,"USBPrinter1"); elsif dDevice = USBKeyboard then WriteLn(OutPort,"USBKeyboard"); WriteLn(OutPort,"Device Unknown"); else end if; ``` -------------------------------- ### Getting Scale Display Units String (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Documents the `GetUnitsString` function signature and an example call. This function retrieves the text string representation of a specified units type (`U`) for a given scale number (`S`), returning the string in the `VAR` parameter `V` and a `SysCode`. Note that the provided example code contains a likely typo in the variable declaration type (`Units` instead of `String`) and a typo in the function name call (`GetUnitsStrin`). ```Pascal function GetUnitsString (S : Integer; U : Units; VAR V : String) : SysCode; ``` ```Pascal CurrentUnitsString : Units; ``` ```Pascal GetUnitsStrin (1, Primary, CurrentUnitsString); ``` -------------------------------- ### Template Program Structure with Declarations - iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Provides a template for an iRite program demonstrating the recommended order of declarations (constants, types, variables), followed by functions, procedures, and event handlers. Includes initialization in the main program body, which acts as the startup handler. ```iRite program Template; -- program name is always first! -- Put include (.iri) files here. #include template.iri -- Constants and aliases go here. g_csProgName : constant string := "Template Program"; g_csVersion : constant string := "0.01"; g_ciArraySize : integer := 100; -- User defined type definitions go here. type tShape is (Circle, Square, Triangle, Rectangle, Octagon, Pentagon, Dodecahedr); type tColor is (Blue, Red, Green, Yellow, Purple); type tDescription is record eColor : tColor; eShape : tShape; end record; type tBigArray is array [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 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; event handler definitions here. handler User1KeyPressed; begin DisplayVersion; end; -- This chunk of code is the system startup event handler. begin -- Initialize all global variables here. -- Increment the build number every time you make a change to a new version. g_iBuild := 3; -- Display the version number to the display. DisplayVersion; end Template; ``` -------------------------------- ### Example: Creating and Initializing a 920i Graph Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This snippet demonstrates the basic usage of GraphCreate to define a graph (graphic number 1) with a specified DisplayImage, color (Black), and type (Bar). It then checks if the creation was successful (SysOK) and, if so, calls GraphInit to set the position (x=30, y=60) and size (height=110, width=240) for a different graphic number (71). ```920i G_Graph1 : Displaylmage; result : Syscode; begin result := GraphCreate(1, G_Graph1, Black, Bar); if result = SysOK then result :=Graphlnit(71,30,60,110,240); end if; end; ``` -------------------------------- ### Loop Through File Lines (920i 1280) - Proprietary Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates a loop structure to read and process each line of an open file using `ReadLn`. The loop continues until `ReadLn` returns `SysEndOfFile`. Each line read is then printed to Port 3 using `WriteLn`. ```Proprietary while Result<> SysEndOfFile -Loops, looking at the return code until the end loop Result := ReadLn(sTempString); WriteLn(3,sTempString); -Prints each line read out Port 3 end loop; ``` -------------------------------- ### Getting Totalizer Units String in Pascal Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This snippet demonstrates how to declare a string variable and call the GetTotalizerUnitsString function to retrieve the configured totalizer resolution units for a specific scale (scale 1 in this example). The result is stored in the CurrentTotalizerUnitsString variable. ```Pascal CurrentTotalizerUnitsString : string; GetTotalizerUnitsString (1, CurrentTotalizerUnitsString); ``` -------------------------------- ### Method Signature: Get Batching Mode (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines the signature for the function that retrieves the current batching mode setting. It returns a value of the BatchingMode enumeration. ```Proprietary Pascal-like function GetBatchingMode : BatchingMode; ``` -------------------------------- ### Enumeration Type Declaration Example 1 - iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines an enumeration type `StopLightColors` with a finite set of named values representing traffic light colors. ```iRite type StopLightColors is (Green, Yellow, Red) ``` -------------------------------- ### Initializing Data Recording (Scale Language) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Configures data recording by specifying the target data array, the scale number, and the numbers of the start and stop setpoints that control recording. Note that recording will resume from the last position if setpoint conditions are met again; use CloseDataRecording followed by InitDataRecording for a continuous batch to reset the array position. ```Scale Language Function InitDataRecording (data :DataArray; scale_no : Integer; start_sp :Integer; stop_sp:nteger) :SysCode; ``` -------------------------------- ### Getting First Logical Record from DB - Proprietary Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves and selects the first logical record from the referenced database. Returns SysOK on success, SysNoSuchDatabase if the database is not found, or SysNoSuchRecord if the database is empty. Supported models: 920i, 880, 1280. ```Proprietary function .GetFirst : SysCode; ``` -------------------------------- ### Method Signature: Get Batch Status (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines the signature for the function that retrieves the current batch status. It uses a VAR parameter to output the BatchStatus and returns a SysCode for success or error indication. ```Proprietary Pascal-like function GetBatchStatus (VAR S : BatchStatus): SysCode; ``` -------------------------------- ### Basic Program Structure - iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Illustrates the basic structure of an iRite program including a variable declaration, an event handler, and the main program body. The main body serves as the program startup event handler. ```iRite program MyProgram; KeyCounter : Integer; handler AnyKeyPressed; begin KeyCounter := KeyCounter + 1; end; begin KeyCounter := 0 end MyProgram; ``` -------------------------------- ### Defining a Record Type with Enumeration Fields Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example defines a record type 'EmployeeRecord' that includes fields using previously defined enumeration types 'tDepartment' and 'tEmptype'. It shows how complex types can be composed. ```Custom type tDepartment is (Shipping, Sales, Engineering, Management); type tEmptype is (Hourly, Salaried); type EmployeeRecord is record ID : integer; Last : string; First : string; Dept : tDepartment; EmployeeType : tEmptype; end record; ``` -------------------------------- ### Declaring a Stored Variable Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example demonstrates declaring a variable 'MyCount' of type Integer using the 'stored' keyword, indicating that its value will be retained in battery-backed RAM even after power loss. ```Custom MyCount : stored Integer; --Declare a stored variable of type Integer ``` -------------------------------- ### Defining an Array of User-Defined Records Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example defines an array type named 'Employees' that can hold 100 elements of the previously defined 'EmployeeRecord' type. It shows how arrays can contain complex user-defined types. ```Custom type Employees is array [100] of EmployeeRecord; ``` -------------------------------- ### Plotting Graph Data using GraphPlot (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example demonstrates how to use the GraphPlot function to add a data point to a previously initialized graph. It first retrieves a weight value using GetGross and then plots this value as a bar on the graph with a specified width and color. ```Pascal-like result : Syscode; weight : real; begin GetGross(1,Primary,weight); result := GraphPlot(1, weight, 1, Black); end; ``` -------------------------------- ### Get Fieldbus Integer Image (Proprietary Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves the integer bus image data for a specified fieldbus. The data is returned in the 'data' variable. Returns SysOK on success or SysInvalidRequest on failure. ```Proprietary Pascal-like function GetImage (fieldbus_no : Integer; VAR data : BusImage) : SysCode; ``` -------------------------------- ### Declare and Define ShowVersion Procedure (iRite) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines a simple procedure named `ShowVersion` with no parameters. It calls the `DisplayStatus` function to display a version string. ```iRite procedure ShowVersion; begin DisplayStatus ("Version 1.42"); end; ``` -------------------------------- ### Get Hardware Configuration (Proprietary) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns an array of HW_type elements corresponding to option card slots in the indicator. This API is useful for determining the presence of required or optional option cards that could activate different options in the user program. ```Proprietary procedure Hardware(var hw : HW_array_type); ``` -------------------------------- ### Acquiring Scale Capacity (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to call the GetCapacity function to retrieve the configured capacity of a specified scale and units, storing the result in a Real variable. ```Pascal Capacity : Real; GetCapacity (1, Primary, Capacity); ``` -------------------------------- ### Checking Scale Center-of-Zero (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Documents the `InCOZ` function signature and an example variable declaration. This function checks if a specified scale (`S`) is within a defined center-of-zero range (0.25 grads), returning a non-zero integer in the `VAR` parameter `V` if true, and zero otherwise, along with a `SysCode`. The example shows declaring an integer variable `ScaleAtCOZ` intended to store the result of the `InCOZ` call. ```Pascal function InCOZ (S : Integer; VAR V : Integer) : SysCode; ``` ```Pascal ScaleAtCOZ : Integer; ``` -------------------------------- ### DBSave Method (Custom API) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Opens a file in Create mode using the name of the database and the UnitID and calls the core to process it as a database file. The file is closed when done. Example: if the UnitID was '2', it would store a file to E/Product.txt if the computer recognized the thumb drive as drive E). Parameters: - db name (String): The name of the database file to save. Returns: - SysCode: Returns SysOk on success, SysNoSuchDatabase if the database is not found, or SysNoFileSystemFound if the target file system is not available. ```Custom API function DBSave (db name : String) SysCode; ``` -------------------------------- ### Setting Graph Axis Scale using GraphScale (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example shows how to set the minimum and maximum values for the x and y axes of a graph using the GraphScale function. Although currently only y-values are used for histogram displays, x-values must still be provided. ```Pascal-like GraphScale(1,10.0,50000.0, 0.0,10000.0); ``` -------------------------------- ### iRite Hello World Program (KeyPressed) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This alternative iRite program displays "Hello, world!" in the indicator's status area whenever any key on the keypad is pressed. It utilizes the KeyPressed event handler and the DisplayStatus procedure. ```iRite program HelloWorld; handler KeyPressed; begin DisplayStatus("Hello, world!"); end; end HelloWorld; ``` -------------------------------- ### Get Setpoint Number of Samples (Proprietary Scale Language) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves the current number of samples (NSAMPLE) for a specified averaging (AVG) setpoint. Requires the setpoint number as input and a variable to store the output sample count. Returns SysOK on success, or an error code if the setpoint is invalid or lacks an NSAMPLE parameter. ```Proprietary Scale Language function GetSPNSample (SP : Integer; VAR N : Integer) : SysCode; ``` ```Proprietary Scale Language SP5NS : Integer; GetSPNSample (5, SP5NS); WriteLn (1, "Current NSample Value of SP5 is "+ IntegerToString(SP5NS,0)); ``` -------------------------------- ### Get String Length (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns the length (number of characters) of string S. Requires a string input. ```Pascal-like function Len (S : String) : Integer; ``` -------------------------------- ### Setting Background Color - Proprietary Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Sets the background and text colors. Requires strings for background color (name or HTML RGB style) and text color. Returns SysCode indicating success or specific errors like invalid type. ```Proprietary Pascal-like function SetBGColor(C : string; T : string); : SysCode ``` -------------------------------- ### Printing Net Format using Print Method (Proprietary Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to declare a variable of type PrintFormat, assign it the NetFmt value, and then call the Print method to initiate a print operation using that format. ```Proprietary Pascal-like Fmtout : PrintFormat; Fmtout := NetFmt; Print (Fmtout); ``` -------------------------------- ### Get Setpoint Hysteresis (Proprietary Scale Language) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves the current hysteresis value (HYSTER) for a specified setpoint. Requires the setpoint number as input and a variable to store the output hysteresis value. Returns SysOK on success, or an error code if the setpoint is invalid or lacks a hysteresis parameter. ```Proprietary Scale Language function GetSPHyster (SP : Integer; VAR V : Real) : SysCode; ``` ```Proprietary Scale Language SP5Hyster : Real; GetSPHyster (5, SP5Hyster); WriteLn (1, "Current Hysteresis Value of SP5 is "+ RealToString(SP5Hyster,0,2)); ``` -------------------------------- ### Get Accumulation Time Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves the time of the most recent accumulation performed by the specified scale. The time is returned as a string. ```Pascal-like function GetAccumTime (S : Integer; VAR T : String) : SysCode; ``` ```Pascal-like AccumTime : String; GetAccumTime (1, AccumTime); ``` -------------------------------- ### Acquiring and Displaying Tare Weight (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates declaring a Real variable for tare weight, calling the GetTare function to retrieve the tare weight for a specified scale and units, and displaying the result formatted to one decimal place. ```Pascal TareWeight : Real; GetTare (1, Tertiary, TareWeight); WriteLn(1, "Current tare weight is "+ RealToString(TareWeight,0,1)); ``` -------------------------------- ### Get Accumulation Date Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves the date of the most recent accumulation performed by the specified scale. The date is returned as a string. ```Pascal-like function GetAccumDate (S : Integer; VAR D : String) : SysCode; ``` ```Pascal-like AccumDate : String; GetAccumDate (1, AccumDate); ``` -------------------------------- ### Getting Pushbutton Zero Counts - Pascal Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves the millivolt value representing the pushbutton zero for a specified scale. The function requires the scale number as input and provides the pushbutton zero count via a variable parameter. A SysCode is returned to indicate the outcome of the function call. ```Pascal function GetPBZeroCounts (S : Integer; VAR V : Integer) : SysCode; ``` -------------------------------- ### Set Single Digital Output - Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines the function signature for setting the state of a specific digital output bit on a given slot. Requires the slot number, bit number, and the desired state (0 for off, 1 for on). Returns a SysCode. ```Pascal-like function SetDigout (S : Integer; D : Integer; V : Integer) : SysCode; ``` -------------------------------- ### Opening Alpha Entry Prompt (Procedural) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Opens an alpha entry box on the display and places the provided message string in the user prompt area. Returns a SysCode indicating success (SysOK) or failure (SysRequestFailed). ```Procedural function PromptUser (msg : String) : SysCode; ``` -------------------------------- ### Get Character from ASCII (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns a one-character string containing the ASCII character represented by integer I. Requires an integer input. ```Pascal-like function Chr$ (I : Integer) : String; ``` -------------------------------- ### Get Unit Identifier (Proprietary) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns the current unit identifier string for the device. Provides a unique identifier for the specific unit. ```Proprietary function GetUID : String; ``` -------------------------------- ### Method Signature: Enable Setpoint (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines the signature for the function used to enable a specific setpoint. It requires an integer representing the setpoint number and returns a SysCode indicating the outcome. ```Proprietary Pascal-like function EnableSP (SP : Integer) : SysCode; ``` -------------------------------- ### Declaring Variable and Displaying Net Weight (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Illustrates declaring a Real variable for net weight and using WriteLn with RealToString to display the acquired net weight value, formatted to one decimal place. ```Pascal NetWeight : Real; WriteLn(1,"Current net weight is"+RealToString(NetWeight,0,1)); ``` -------------------------------- ### Declaring Global Variables in iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Shows the syntax for declaring global variables in iRite. Demonstrates declarations for integer, real, and string types, including optional initialization for the integer variable. Explains the use of prefixes and the statement terminator. ```iRite 06 -- Declare global variables here. 07 g_iCount : integer := 1; 08 g_rRadius : real; 09 g_rArea : real; 10 g_sPrintText: string; ``` -------------------------------- ### Getting System Time String Pascal Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns a string representation of the time component from a specified DateTime variable. Requires the DateTime variable (DT) as input. ```Pascal function Time$ (DT: DateTime) : String; ``` -------------------------------- ### Get MAC Address (Proprietary) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns the read-only onboard MAC address of the device as a string value. This method provides access to a unique hardware identifier. ```Proprietary function GetMACAddress : String; ``` -------------------------------- ### Getting Data Record Size (Scale Language) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns the number of data points that have been recorded in the user-specified data array for a given scale number. ```Scale Language Function GetDataRecordSize(scale_no : Integer) : Integer; ``` -------------------------------- ### Opening Numeric Prompt (Procedural) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Brings up a numeric user prompt. Returns the entered string. Returns SysCode values SysRequestFailed or SysOK. ```Procedural function PromptNumeric : String; ``` -------------------------------- ### Setting Menu Bar Color - Proprietary Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Sets the color of the menu bar using an HTML RGB style string. Requires the color string. Returns SysCode indicating success or specific errors like invalid type. ```Proprietary Pascal-like function SetMenuBarColor(C : String): SysCode ``` -------------------------------- ### Defining a Single-Dimension Array Type Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example defines an array type named 'Weights' that can hold 25 elements of type Real. It illustrates the syntax for a one-dimensional array. ```Custom type Weights is array [25] of Real; ``` -------------------------------- ### Load Database File (920i) - Proprietary Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Opens a specified file in read mode, treating it as a database file based on its name and the UnitID. It calls the core system to process the file as a database. The file is automatically closed after processing. Returns SysOk on successful loading or various error codes. ```Proprietary if DBLoad("Product")= Sysok then DisplayStatus("Product Database Loaded into 920i") end if; ``` -------------------------------- ### Get ASCII Value (Pascal-like) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns the ASCII value of the first character of string S. If S is an empty string, the value returned is 0. Requires a string input. ```Pascal-like function Asc (S : String) : Integer; ``` -------------------------------- ### Release USB Assignment (920i) - Proprietary Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Returns the USB port's assignment back to the captured primary device that was active before `SetUSBAssignment` was called. Returns SysOk on success or error codes like SysDeviceNotFound, SysPortBusy. ```Proprietary ReleaseUSBAssignment; ``` -------------------------------- ### Selecting Display Screen (Procedural) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Selects the configured screen, N, to show on the indicator display. Returns a SysCode indicating success (SysOK) or failure (SysInvalidRequest if N is less than 1 or greater than 10, SysRequestFailed). ```Procedural function SelectScreen (N : Integer) : SysCode; ``` -------------------------------- ### Getting System Time Pascal Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves the current system date and time. This function returns a value of type DateTime representing the current real-time clock reading. ```Pascal function SystemTime : DateTime; ``` -------------------------------- ### Displaying Gross Weight (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Shows how to use WriteLn and RealToString to display the gross weight value previously obtained from a scale, formatted to one decimal place. ```Pascal WriteLn (1, "Current gross weight is "+ RealToString(GrossWeight,0,1)); ``` -------------------------------- ### Simulate Key Press (Proprietary) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Provides intrinsic functionality for simulating a key press (K). Certain keys have intrinsic functions in addition to front panel keys already in the Keys built-in type. This API will only function in actual weigh mode. Returns a SysCode indicating the result (SysInvalidMode, SysInvalidKey, SysInvalidRequest, SysOK). ```Proprietary function KeyPress (K : Keys) : SysCode; ``` -------------------------------- ### Setting Image Widget Path - Proprietary Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Sets the image file path for a specified image widget. Requires the widget number and the image path string. Returns SysCode indicating success or specific errors like invalid widget. ```Proprietary Pascal-like function SetlmageWidgetPath (W : Integer; C : String) : SysCode ``` -------------------------------- ### Get Last Database Error Message (Pascal) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Retrieves a description of the error from the most recent database call. If the last call was successful, the returned message is undefined. Returns a String. ```Pascal function DBErrMsg () : String; ``` -------------------------------- ### Set All Digital Outputs (Bitmasked) - Pascal-like Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Defines the function signature for setting the state of all digital outputs on a card using a single bitmasked integer. Each bit in the integer corresponds to an output, allowing multiple outputs to be set simultaneously. Requires the slot number and the bitmask value. Returns a SysCode. ```Pascal-like function SetAllDigOut (S : Integer,I: Integer) : SysCode; ``` -------------------------------- ### Declaring and Implementing Function in iRite Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Demonstrates how to declare a function in iRite, including specifying parameters and return type. Shows the function body enclosed in `begin` and `end`, the declaration of a local constant, a comment, and the use of the `return` statement to return a calculated value. ```iRite 13 function CircleArea(rRadius : real) : real; 14 crPi : constant real := 3.141592654; 15 begin 16 -- The area of a circle is defined by: area = pi * (r^2) . 17 return (crPi * rRadius * rRadius); 18 end; ``` -------------------------------- ### Opening Password Prompt (Procedural) Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Brings up a password-protected alpha user prompt. Returns the entered string. Returns SysCode values SysRequestFailed or SysOK. ```Procedural function PromptPassword : String; ``` -------------------------------- ### Defining a Two-Dimensional Array Type Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md This example defines a two-dimensional array type named 'MyArray' with dimensions of 10x10, holding elements of type Integer. It demonstrates the syntax for multi-dimensional arrays. ```Custom type MyArray is array [10,10] of Integer; ``` -------------------------------- ### Setting Softkey Text Pascal Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Sets the text displayed on a specific softkey (F1-F10). Requires the softkey number (K) and the desired text string (S). Returns a SysCode indicating success (SysOK) or an invalid request (SysInvalidRequest). ```Pascal function SetSoftkeyText (K : Integer; S : String) : SysCode; ``` -------------------------------- ### Using Relational and Equality Operators in iRite If Statements Source: https://github.com/fr4nkastro/frank-docs/blob/main/frank-data.md Provides examples of how relational operators (>, >=, <, <=) and equality operators (=, <>) are used within 'if' expressions to compare values and produce a boolean result. ```iRite if iPointsScored = 6 then if iSpeed > 65 then if rGPA <= 3.0 then if sEntry <> "2" then ```