Class: MIOB2

MIOB2

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


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

Members


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

An array of the 6 individual analog inputs.

Type:
Since:
  • 1.3 (WAT 1.3)

<readonly> anOutputs :Array.<miob.AnOutput>

An array of the 6 individual analog outputs.

Type:
Since:
  • 1.3 (WAT 1.3)

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

An array of the 3 individual auxiliary inputs.

Type:
Since:
  • 1.3 (WAT 1.3)

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

An array of the 3 individual auxiliary outputs.

Type:
Since:
  • 1.3 (WAT 1.3)

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

An array of the 6 individual digital inputs.

Type:
Since:
  • 1.3 (WAT 1.3)

<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 6 inputs.

Type:
Since:
  • 1.0 (WAT 1.0)

monitorMode :bool

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

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

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

An array of the 2 individual serial ports.

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 :miob.Stacklight

Returns the stacklight (internal).

Type:
Since:
  • 1.0 (WAT 1.0)

<constant> type :number

Type of IO Board. Evaluates to 3, for MIOB2.

Type:
  • number

Methods


anInput(index)

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

anOutput(index)

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

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

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)

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