Omron FZ4 Series User Manual page 235

Vision sensor
Table of Contents

Advertisement

Example
Gets the length of the character string, "OMRON".
CHRLEN&=Len("OMRON")
The results are as follows:
CHRLEN&=5
Reads data of one line from a file
Line Input# <File No.>,<Character Variable>
Parameters
<File No.>
The file number (integer) of the file with the data to be read in.
<Character Variable>
The variable that will store the value that is read in (character string)
Return Value
None.
Description
Reads data that exists within the line separated by the line feed code and assigns it to a character
Variable.
<Character Variable> is less than 255 characters, which includes strings such as space, comma(,),
double quotation marks("), and numbers.
When input carriage return (chr$(13)) in <Character Variable>, null string ("") is the return value.
When character strings are enclosed within double quotation marks (" "), the double quotation marks are
also recognized as characters.
Example
Read in data until the end of the file.
dim DATA$(256)
open "/c0/input.dat" for Input as #1
for I&=0 to 255
   Line Input #1,TEMP$
   DATA$(I&)=TEMP$
   if eof(1)<>0 then exit for
next
close #1
FZ4 User's Manual
Using Custom Command
4
233

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents