Chapter 6 - IDeal
™
Command Reference
77
Example:
IF14,1 GO EB
If input 14 equals 1 Go
IF12,010 GO EB
If inputs 12-14 equal 010 Go
IF110 GO OT3,1 EB
If inputs 1-3 equal 110 Go and turn on
Output #3
IF(A19)<5500 OT11 GO EB
If analog input 9 is less than 5500,turn on
output 1 and 2,then GO
IF(TEMP)>50 OT1 EB
If temperature variable >50 turn on Output 1
IF(PARTS)=25 GS20 EB
If PARTS variable = 25 Gosub to Program 20
IV
Input Variable
syntax - IVi,(variable),
min,max
Units:
n/a
Range:
i - 1-40 display position in character s
variable = any legal variable name
min = the minimum range value (optional)
max = the maximum range value (optional)
Default:
n/a
This command allows an operator to input variable information under program
control.It is typically used with the message command,MS,to prompt for operator
input of the variable specified in IV.The cursor is placed on the display at character
position "i".The program waits until a number is entered before continuing execu-
tion.The command will not allow you to type past the end of either line on the dis-
play.Variables will store 4 digits to the right of the decimal place.
When minimum and/or maximum range values are specified,the IV command will
not accept inputs from outside this range. When a value outside the range is
entered,one of the following messages is displayed on the k eypad:
• "Input below minimum,Press ESC to resume"
• "Input above maximum,Press ESC to resume"
These variables can then be used in a math equation,conditional expression,or to
set any command parameters (Example: DA,DC,VE, AC,LP, IF,TD, etc.).A variable
can be used anywhere in a program where a real number or integer could be used.
Due to the nature of converting decimal numbers to binary and back,care must be
taken in performing math on variables used in LP statements.LP will truncate the
non-integer portion of the varia ble. For example:(COUNT)=25*.2 LP(COUNT) will
only loop 4 times because (COUNT)=4.9999.A small offset can be added to vari-
ables used in LP statements to avoid this problem.(COUNT)=(COUNT)+.1 will
guarantee that (COUNT) will be greater than 5,so the program will loop 5 times.
Example:
MS1,””
Clears the Display
MS1,"How many?: ”
Writes string beginning at character 1,top line
IV12,(PIECES),1,15
Waits at 12th character for the # of pieces in
the range 1-15.
MS1,””
Clears the Display
MS1,”How long?: ”
Writes string beginning at character 1,top line
IV12,(LENGTH)
Waits at 12th character for the # of pieces.
LP(PIECES) Loops the number of pieces entered
DI(LENGTH)
Defines the desired move length/distance.
GO
Moves the length commanded
EB
Ends the loop.
Содержание B8961
Страница 111: ...109 Chapter 7 Programming with Serial Communication...
Страница 132: ...B8961 and B8962 User Manual 130...
Страница 136: ...B8961 and B8962 User Manual 134 B8961 and B8962 Hardware Connections...
Страница 137: ...135 Chapter 8 Hardware Reference B8961 and B8962 Input and Output Schematics...
Страница 138: ...B8961 and B8962 User Manual 136 Connecting IDC Limit Switches to the B8961 2...
Страница 156: ...B8961 and B8962 User Manual 154...