Download MotionChip II - OEM International AB
Transcript
Name Assignment instruction for 16 bits TML variables = (IO group) Syntax read input #n into VAR16D read inputs IN#25 to IN#32 into VAR16D with ANDm read input IN#33 to IN#39 into VAR16D with ANDm read IN#36 to IN#39 into VAR16D with 0xF as ANDm VAR16D = IN#n VAR16D = INPUT1, ANDm VAR16D = INPUT2, ANDm VAR16D = INPORT, 0xF Operands Var16D: integer variable IN#n : the source is input bit-port number n (0=<n<=39) INPUT1: the source is 8 input lines status of IO inputs #25 to #32 INPUT2: the source is 8 input lines status of IO inputs #33 to #39 ANDm: a 16-bit mask used to indicate which bits are read from the input ports INPORT: the source is 4 input lines status of IO inputs #39, #38, #37 and #36 The variable VAR16D must be a valid variable name, defined in the current TML application. The selection of the IN#n line is specific for each Technosoft drive. TML program X Type On-line X Binary code VAR16D = IN#n 15 14 13 0 1 1 12 0 11 0 10 0 9 0 0 0 0 0 VAR16D = INPUT1, ANDm 15 14 13 12 11 0 1 1 0 0 0 1 1 1 0 0 0 0 0 0 10 0 0 0 9 0 0 0 VAR16D = INPUT2, ANDm 15 14 13 12 11 0 1 1 0 0 0 1 1 1 0 0 0 0 0 0 10 0 0 0 9 0 0 0 0 0 0 © Technosoft 2006 8 7 6 PxDATDIR 0 8 7 0 0 1 8 7 0 0 1 143 5 4 3 2 (9LSBs of &VAR16D) 1 0 1 0 Bit_mask 6 5 4 3 2 (9LSBs of &VAR16D) 0 0 1 0 1 ANDm 6 5 4 3 2 (9LSBs of &VAR16D) 0 0 1 0 1 ANDm 0 1 1 1 0 0 MotionChip II TML Programming