Syntax
SetAsOutput(n1, n2, n3,…)
|
SetAsOutput I/O lines numbered n1, n2, n3
|
Operands | n1, n2, n3: IO line number. It specifies the position of the control bit associated to the I/O line in the IO_mask. |
Binary code
Description | Some drives/motors include I/O lines that may be used either as inputs or as outputs. Before using these lines as outputs you have to use the SetAsOutput command having as argument the output lines numbers. The output lines numbers identifies the control bit from the IO_mask, i.e. output number 7 has associated bit 7 in the IO_mask, setting to 1 bit 7 the IO line will be used as output. In TML the output lines are numbered from 0 to 15. |
Remarks:
• | Check the drive/motor user manual to find how are set, after power-on, the I/O lines that may be used either as inputs or as outputs. Each product has a specific number of inputs and outputs, therefore only a part of the 15 output lines is used. |
• | You need to set an I/O line as output, only once, after power on |
Example
SerAsOutput(7); //Set IO line 7 as output
Out(4,7)=0x0090; //Set I/O lines 4 and 7 to High.
|