Copy [to] [from] 206 [to] [from, Dec [r] 205 [r, Display [r] 218 [r – Industrial Data Systems IDS Scale Basic User Manual
Page 22: Div [r] = [a] / [b] 203 [r] [a] [b

Scale Basic 4.2E
Reference
Test for Net >= Fixed43
Compare,
Net,
Fixed43
If not, Negative
If Net >= Setpoint Fixed43
Relay off, 1
turn off relay 1
End
if
End
if
Copy
[To]
[From] 206
[to]
[from]
Purpose: copy the contents of register [from] to register [to]
Remarks: copy does not affect the condition codes.
Example: copy, Memory1, Gross
Copy the gross weight into memory register 1
Example: copy, Memory1, Time Copy the time and date to memory register 1
Example: copy, Stime, Memory1 Copy the stored time and date to stime register for printing.
For more on time and date storage see page 49.
Dec
[r]
205
[r]
Purpose: subtract 1 from a register. Set condition codes Positive, Negative, and Zero to reflect
results.
Remarks: the decimal point is ignored. If Memory1 = 0.05, then Dec Memory1 = 0.04 This
instruction is useful in creating loops that must be executed a fixed number of times.
Example: the following is an example of using the Dec instruction to implement a For/Next
loop
Set, Memory1, 25
For loop count = 25
Loop1
Do
:
:
Dec, Memory1
loop count = loop count - 1
If, Positive
While loop count > 0
Next1
Next
loop
End if
End of For/Next loop
Display
[r]
218
[r]
Purpose: to display the contents of a register. The registers contents continue to be displayed
until another Display command is issued or the Gross/Net key on the keyboard is pressed.
Remarks: If the Gross/Net key is re-programmed to some function other than the Gross/net
function, then the Gross/Net key will not clear the Display [ ] command.
Example:
Display, Id1
Display ID register 1 (normally used for totals)
Div [r] = [a] / [b]
203 [r] [a] [b]
Purpose: divide register [a] by register [b], put results into register [r].