OUTPORT        Set simultaneously output lines – Firmware version FAxx

Syntax                        

OUTPORT VAR16

OUTput VAR16 value to IOPORT

OperandsVAR16: 16-bit integer variable

PlaceTMLOnline

Binary code

OUTPORT

DescriptionThe instruction sets simultaneously the following drive/motor output lines:
Ready output (#25/READY) – set by bit 15 from VAR16
Error output (#12/ERROR) – set by bit 14 from VAR16
General-purpose outputs: #31, #30, #29, #28 – set by bits 3, 2, 1, and 0 from VAR16

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 I/O lines are numbered: #0 to #39. Each product has a specific number of inputs and outputs, therefore only a part of the 40 I/O lines is used. The I/O numbering is common for all the products; hence each product has its own list of available I/Os.

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