Industrial Data Systems IDS Scale Basic User Manual
Page 15

Scale Basic 4.2E
Tutorial
The above function uses Memory1, 2, and 3. The memory registers used are listed in the
Parameters section of the design template. This section of the template is used to manage
resources such as memory registers, and to list parameters that need to be configured such as
Fixed registers or print labels.
Parameter
Used
for
Memory1
operator input 1
Memory2
operator input 2
Memory3
sum
Use the template above to enter the program (configure F1 key and User1 function). Upload the
program, then press the F1 key to execute the program.
1.
Invoke the EZ Link program.
2.
Click on Reset to Defaults to clear previous example.
3.
Set Keyboard Events / F1 key = User1
4.
Scale Basic / User 1 enter the following program:
Function
Instructions
Comments
User1
Get data, Memory1
Memory1 = Get operator input
Get data, Memroy2
Memory2 = Get operator input
Add, Memory3, Memory1, Memory2 Memory3 = Memory1 + Memory2
Display,
Memory3
Display
sum
End
End
of
function
6. In EZ Link select File, Save As, then type in “test2” then click OK. This saves the program
onto
disk.
7.
In EZ Link select the UP (Upload) button. Click on file “test2.sf” then click on OK.
8.
Press the F1 key on the indicator.
This program could be improved by changing the display to Gross mode after the operator
presses a key. The same Display instruction can be used to change the display from Memory3 to
the Gross register. However, if the Display Gross instruction immediately follows the Display
Memory 3 instruction, the operator will not see the sum because it will be replaced by the Gross
weight. The Get key instruction can be used to pause the program until a key is pressed.
Function
Instructions
Comments
User1
Get data, Memory1
Memory1 = Get operator input
Get data, Memory2
Memory2 = Get operator input
Add, Memory3, Memory1, Memory2 Memory3 = Memory1 + Memory2
Display,
Memory3
Display
sum
Get
key Wait
for
key-press
Display,
Gross Display
Gross
weight
End
End
of
function
Try changing the Add instruction to Sub, Mul, and Div. Also, try more complex math functions.
The math functions work on any register. Try using other registers (Gross, Tare, Net, Fixed… ).