Download User manual Supervisor
Transcript
Supervisor documentation
Description :
Reads data from the communication port and assigns the data to the variables. The
execution of this instruction passed to the execution of the next task.
Remarks :
<Number> is the number used to open a communication port with OPEN function.
The read data must appear in the same order that the variables list.
Example :
OPEN "SERIAL1:"
AS #1
INPUT #1,A$,B%
CLOSE #1
See also :
OPEN, PRINT, CLOSE
8-14-71- INPUT$ - Char string reading
Syntax :
<Variable> =INPUT$ <CommNumber>, <NumberOfChar>
Accepted types :
Variable : Char string
CommNumber : #1 or #2
NumberOfChar : Byte
Description :
Reads <NumberOfChar> characters from the communication port and stores them
in a char string. The execution of this instruction launches the execution of the next
task.
Remarks :
<CommNumber> is the number used to open the communication port with OPEN
instruction.<Variable> must be a variable char string type. The task is blocked on
this instruction when the number of character received is different than this
specified in the instruction.
Example :
OPEN "SERIAL1:" AS #1
A$=INPUT$ #1,5
'Read 5 characters from the communication port
CLOSE #1
See also :
OPEN, PRINT, CLOSE
8-14-72- INPW – 16 digital inputs reading
Syntax :
INPW (<Input>)
Accepted types :
<Input> : Integer
Description :
This function gives the state of the16 digital inputs.
Remarks :
<Inputs> must represent the name of a 16 digital inputs board.Data type returns is
integer.
Example :
See also :
A%=INP(Bloc)
INP, INPB, OUT, OUTB, OUTW
8-14-73- INSTR – Search a sub-string
Syntax :
INSTR(<string1>,<string2>)
Accepted types :
string1, string2 : Char string
Description :
This function searches a sub-string in a char string and returns the position of the
first occurrence of the sub-string.
Remarks :
<String1> is the researched string <String2>.
Example :
a$="Press ENTER to start"
EnterPos%=INSTR("ENTER",a$) 'Result : EnterPos%=7
R403
- 105 -
SERAD S.A.