All BASIC commands
Section 4-2
95
4-2-24 AIN
/i
4-2-25 ALL
/i
Type
I/O command
Syntax
AIN(analogue_chan)
Description
The
AIN
reads a value from the
AIN
array. The CJ1W-MCH72 does not
provide any analogue input. The contents of the
AIN
array may be
mapped to PLC memory to get values from e.g. PLC analogue input
units.
Arguments
analogue_chan
.
Analogue input channel number 0..31
Example
MOVE(-5000)
REPEAT
a=AIN(1)
IF a<0 THEN a=0
SPEED=a*0.25
UNTIL MTYPE=0
The speed of a production line is governed by the rate at which material
is fed onto it. The material feed is via a lazy loop arrangement which is
fitted with an ultra-sonic height sensing device. The output of the ultra-
sonic sensor is in the range 0V to 4V where the output is at 4V when the
loop is at its longest.
Note: The analogue input value is checked to ensure it is above zero
even though it always should be positive. This is to allow for any noise
on the incoming signal which could make the value negative and cause
an error because a negative speed is not valid for any move type except
FORWARD
or
REVERSE
.
See also
N/A
Type
Slot modifier
Syntax
ALL
Description
The ALL modifier is used with the commands
DEL
and
NEW
. It indi-
cates that these commands are applied to all items in the directory
structure of the controller.
Arguments
N/A
Example
DEL ALL
This deletes all programs of the controller.
See also
DEL
,
NEW
.
Содержание trajexia CJ1W-MCH72
Страница 69: ...Specifications Section 2 4 58...
Страница 83: ...FINS commands Section 3 4 72...
Страница 147: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...All BASIC commands Section 4 2 266...
Страница 278: ...267 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 371: ...360 Index...
Страница 373: ...362...