OUT        Set one or several output lines – Firmware version FBxx

Syntax                        

OUT(n1, n2, …) = value16

OUTput value16 to I/O n1, n2, …

OUT(n1, n2, …) = VAR16

OUTput VAR16 value to n1, n2, …

Operandsn1, n2: IO line number

value16: 16-bit integer immediate value

VAR16: 16-bit integer variable

PlaceTMLOnline

Binary code

OUT

DescriptionThe instruction sets one or several output lines simultaneously with the immediate value or the value of the specified variable.

Each bit from the the output line has associated  through its number idenfie associated an control bit identified If the above bits from VAR are set to 1, the corresponding outputs are set high (1), else the outputs are set low (0).

In TML the output lines are numbered from 0 to 15. Each product has a specific number of outputs, therefore only a part of the 15 output lines is used.

Warning! Check carefully your drive/motor for the available outputs. Do not use this command if any of the above outputs is not available. You can always set separately each of the outputs using the OUT command

This instruction uses a 9-bit short address for the destination variable. Bit 9 value X specifies the destination address range:

AddressRange

 

Example

int user_var;

user_var = 0x800A;// setup user_var variable

OUTPORT user_var;//Send variable address to external output port

// The command sets high the outputs: #25/Ready, #31 and #29

// and low the outputs: #12/Error, #30 and #28