Output 1, 2, or 4 bytes to a port.
OUTPORT(port, value, datatype)
port |
- |
An integer, the output port |
value |
- |
An integer or real, value to output |
datatype |
- |
Optional. An integer. The type of data to input. Defaults to SBYTE, signed byte. |
An integer, the actual value written to the port.
outport(0x11, 32, SBYTE)
outputs the single byte value 32 to port 17 (0x11).
outport(0x11, 32, SINT)
outputs the two byte value 32 to port 17 (0x11).
outport(0x11, 32, LONG)
outputs the four byte value 32 to port 17 (0x11).
The datatype parameter may be SBYTE, UBYTE, SINT, UINT, LONG, FLOAT or DOUBLE.