The Output Bit (OB) instruction is useful for setting or clearing outputs depending on the value of a variable, array, input or expression. Any non-zero value results in a set bit. Instruction Function OB1, POS Set Output 1 if the variable POS is non-zero. Clear Output 1 if POS equals 0. OB 2, @IN [1] Set Output 2 if Input 1 is high. If Input 1 is low, clear Output 2. OB 3, @IN [1]&@IN [2] Set Output 3 only if Input 1 and Input 2 are high. OB 4, COUNT [1] Set Output 4 if element 1 in the array COUNT is non-zero. The output port can be set by specifying an 8-bit word using the instruction OP (Output Port). This instruction allows a single command to define the state of the entire 8-bit output port, where 20 is output 1, 21 is output 2 and so on. A 1 designates that the output is on.
Digital Inputs
The DMC-18x2 has eight digital inputs for controlling motion by local switches. The @IN[n] function returns the logic level of the specified input 1 through 8. For example, a Jump on Condition instruction can be used to execute a sequence if a high condition is noted on an input 3. To halt program execution, the After Input (AI) instruction waits until the specified input has occurred.Motor X must turn at 4000 counts/sec when the user flips a panel switch to on. When panel switch is turned to off position, motor X must stop turning.
Input Interrupt Function
The DMC-18x2 provides an input interrupt function which causes the program to automatically execute the instructions following the #ININT label. This function is enabled using the II m,n,o command. The m specifies the beginning input and n specifies the final input in the range. The parameter o is an interrupt mask. If m and n are unused, o contains a number with the mask. A 1 designates that input to be enabled for an interrupt, where 20 is bit 1, 21 is bit 2 and so on. For example, II,,5 enables inputs 1 and 3 (20 + 22 = 5). A low input on any of the specified inputs will cause automatic execution of the #ININT subroutine. The Return from Interrupt (RI) command is used to return from this subroutine to the place in the program where the interrupt had occurred. If it is desired to return to somewhere else in the program after the execution of the #ININT subroutine, the Zero Stack (ZS) command is used followed by unconditional jump statements.
Common problem
We have this product in stock, and we can deliver it to you at any time when you need it badly.
*The warranty period of all products is 1 year, which has passed the professional test certification.
*If you need to order more than one product, please contact us, and we can offer you a discount.
*We only use HDL UPS and other express delivery methods to deliver spare parts.
*If you find that other suppliers offer lower prices for the same products, we are also willing to offer you further discounts based on their prices.
If you have any other questions, please feel free to contact us via email.
*Please let us know if you need any spare parts, we can give you further assistance, and we are waiting for your inquiry.