KEYENCE LS-3100/3100W Series User Manual

Page 66

Advertising
background image

60

CHAPTER 4 Functions and Controls

Display digit suppress function
When the number of suppressed display digits is 0:

When the number of suppressed display digits is 3:

1st data 2nd data

0

C

R

1st data 2nd data

3

C

R

Program Example in BASIC

Program 1
Pressing the space key of the computer allows the measured values to
appear on the computer display.

100

OPEN "COM1:4800,N,8,1,RS,CS,DS,CD" FOR RANDOM AS #1

110

A$=INKEY$

120

IF A$<>" " THEN 110

130

PRINT #1, "X0"

140

INPUT #1, B$

150

PRINT B$

160

GOTO 110

Program 2
The following settings are specified through the computer: SEG (2, 3), NOR-
MAL mode, upper and lower tolerance limits (20.0000 mm and 10.0000 mm),
number of measurements for averaging (512), and simple averaging mode.
After these settings are stored under program No. 3, the measured values are
displayed.

100

OPEN "COM1:4800,N,8,1,RS,CS,DS,CD" FOR RANDOM AS #1

110

PRINT #1, "S2, 3"

Sets SEG (2, 3)

120

PRINT #1, "MN"

Sets NORMAL mode

130

PRINT #1, "H20"

Sets upper limit to 20.0000 mm

140

PRINT #1, "L20"

Sets lower limit to 10.0000 mm

150

PRINT #1, "A9"

Sets the number of measurements
for averaging to 512

160

PRINT #1, "BS"

Sets simple averaging method

170

PRINT #1, "SV3"

Saves settings into program
No.3

180

For I=1 TO 2000: NEXT I

190

PRINT #1, "X0"

200

PRINT #1, A$

210

PRINT A$

Display measured values

220

GOTO 190

08.10.1, 10:56 AM

60

Advertising