Download Drive Programming
Transcript
6 Drive Programming Commands Command Remainder for division Argument 1 <variable 1> Argument 2 : Argument 3 <variable 2/ constant> Argument 5 <variable 3/ constant> Absolute value <variable 1> : abs <variable 2/ constant> Logical operation <variable 1> : <variable 2/ constant> and <variable 3/ constant> <variable 1> : <variable 2/ constant> or <variable 3/ constant> <variable 1> : <variable 2/ constant> xor <variable 3/ constant> <variable 1> : not <variable 2/ constant> Description Divides <variable 2/constant> by <variable 3/constant> and assigns the remainder to <variable 1>. Assigns the absolute value of <variable 2/constant> to <variable 1>. Performs a logical AND operation on <variable 2/constant> and <variable 3/constant> and assigns the result to <variable 1>. Performs a logical OR operation on <variable 2/constant> and <variable 3/constant> and assigns the result to <variable 1>. Performs a logical exclusive OR operation on <variable 2/constant> and <variable 3/constant> and assigns the result to <variable 1>. Reverses the bit of <variable 2/constant> and assigns the result to <variable 1>. Increment and Decrement Commands Command Increment Decrement Argument 1 inc Argument 2 <variable> Dec <variable> Argument 3 Argument 4 Argument 5 Description Adds 1 to <variable>. Subtracts 1 from <variable>. I/O control commands Command Input terminal variable assignment Argument 1 <variable> Argument 2 : Argument 3 X(i) <variable> : Xw Drive Programming User’s Manual (I580-E2) Argument 4 Argument 5 Description Set current state of the input terminal X(i) to <variable>. 0 off, 1 on Set the current state of the Xw to <variable> in units of words. 6-7 6-3 Command List Argument 4 mod 6