Class: MIOB1

MIOB1

Provides methods and properties for accessing hardware on an MIOB1 I/O expansion board. This object can be accessed by loading the plugin 'miob1' (a.k.a. 'hw'). A single object is returned when loading the plugin, which is an MIOB1.


Example
var hw = $wat.load('hw')[0];

Members


<readonly> anInputs :Array.<miob.AnInput>

An array of the up to 4 individual analog inputs. Analog inputs are only available on version 3.0 and greater.

Type:
Since:
  • 1.4 (WAT 2.2)

<readonly> auxInputs :Array.<miob.AuxInput>

An array of the 2 individual auxiliary inputs.

Type:
Since:
  • 1.3 (WAT 1.3)

<readonly> auxOutputs :Array.<miob.AuxOutput>

An array of the 2 individual auxiliary outputs.

Type:
Since:
  • 1.3 (WAT 1.3)

<readonly> digInputs :Array.<miob.Input>

An array of the 16 individual digital inputs.

Type:
Since:
  • 1.3 (WAT 1.3)

<readonly> digOutputs :Array.<miob.Output>

An array of the 16 individual digital outputs.

Type:
Since:
  • 1.3 (WAT 1.3)

<readonly> estacklight :miob.Stacklight

Returns external stacklight.

Type:
Since:
  • 1.0 (WAT 1.0)

<readonly> hid :miob.HID

Returns an object used to access the HID reader.

Type:
Since:
  • 1.0 (WAT 1.0)

<readonly> inputs :miob.Inputs

Returns an object used to access all 16 inputs.

Type:
Since:
  • 1.0 (WAT 1.0)

<readonly> istacklight :miob.Stacklight

Returns internal stacklight.

Type:
Since:
  • 1.0 (WAT 1.0)

<readonly> leds :Array.<miob.LED>

Array of tool LEDs

Type:
Since:
  • 1.0 (WAT 1.0)

monitorMode :bool

When enabled, events will be generated when outputs (DSIO, ISIO, LEDs, and stacklights) are changed. This could be used to show the active state of the outputs.

Type:
  • bool
Since:
  • 1.0 (WAT 1.0)

<readonly> outputs :miob.Outputs

Returns an object used to access all 16 outputs.

Type:
Since:
  • 1.0 (WAT 1.0)

<readonly> serials :Array.<wat.SerialPort>

An array of the 4 individual serial ports.

NOTE: depending on the model, less than 4 serial ports may be wired out to a connector on the outside of the box. Check the documentation for the model to determine what is available.

NOTE: The serial ports on the MIOB boards have been designed to be used primarily as control ports (as opposed to data transfer). As such, 'packets' (sustained transfers) greater than 2KB could be unreliable depending on the baud rate and concurrent usage on the IO board.

Type:
Since:
  • 1.3 (WAT 1.3)

<readonly> Stacklight :object

Stacklight to select.

Type:
  • object
Properties:
Name Type Description
Internal number

0 (The built-in stacklight).

External number

1 (The optional external stacklight).

Both number

2 (Both stacklights).

Since:
  • 1.0 (WAT 1.0)
See:

<readonly> stacklights :miob.Stacklight

Returns a Stacklight that operates on both the internal and external stacklights. This is for convenience when performing an operation that changes both stacklights in the same way.

Type:
Since:
  • 1.0 (WAT 1.0)

<constant> type :number

Type of IO Board. Evaluates to 1, for MIOB1.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

Methods


auxInput(index)

Parameters:
Name Type Description
index number
Since:
  • 1.0 (WAT 1.0)
Deprecated:
Returns:
Type
miob.AuxInput

auxOutput(index)

Parameters:
Name Type Description
index number
Since:
  • 1.0 (WAT 1.0)
Deprecated:
Returns:
Type
miob.AuxOutput

input(index)

Parameters:
Name Type Description
index number
Since:
  • 1.0 (WAT 1.0)
Deprecated:
Returns:
Type
miob.Input

led(index)

Parameters:
Name Type Description
index number
Since:
  • 1.0 (WAT 1.0)
Deprecated:
Returns:
Type
miob.LED

output(index)

Parameters:
Name Type Description
index number
Since:
  • 1.0 (WAT 1.0)
Deprecated:
Returns:
Type
miob.Output

reset()

Reset all of the I/O to the default state. Useful to start with a known state when re-initializing an application.

Since:
  • 1.0 (WAT 1.0)

serial(index)

Parameters:
Name Type Description
index number
Since:
  • 1.0 (WAT 1.0)
Deprecated:
Returns:
Type
wat.SerialPort

stacklight(index)

Returns an object that can be used to control a stacklight

Parameters:
Name Type Description
index number

the stacklight to get

Since:
  • 1.0 (WAT 1.0)
See:
Returns:
Type
miob.Stacklight