Table of contents |

# Digital I/O Screen

The Digital I/O Screen displays and allows changes to the current state of the KMotion digital I/O bits.

KMotion has a number of digital I/O bits that may be used as GPIO (General Purpose Inputs or Outputs) or as specific dedicated functions (encoder inputs). There are 28 bits that may be utilized as GPIO (bits 0 - 27). Each bit may be independently defined as either an input or an output. On Power UP KMotion defines all I/O as inputs by default. Any bit may be configured as an output by checking the corresponding box in the "Output" columns. Alternately, the bits may be configured by a C program running within the KMotion (See SetBitDirection()) or by Script commands (See SetBitDirection) sent to the KMotion.

The State of each I/O bit may be observed in the corresponding checkbox under the "State" columns. If the bit is defined as an output, clicking on the "State" checkbox will toggle the bit. Alternately, the bits may be read, set, or cleared by a C program running within the KMotion (See ReadBit(), SetBit(), ClearBit(), or SetStateBit()) or by Script commands (See ReadBit, SetBit, ClearBit, or SetStateBit) sent to the KMotion.

Additionally, buffered commands may change the state of Digital I/O bits. Buffered I/O commands are I/O commands that are inserted into the coordinated motion buffer. When it is required that I/O bits be changed at exact times within a motion sequence, buffered I/O commands may be inserted into the motion buffer (see SetBitBuf, ClearBitBuf, and SetStateBitBuf). In this case the I/O commands occur when they are encountered within the motion sequence. The KMotion GCode interpreter allows buffered I/O commands to be inserted within motion sequences by using a special form of GCode comment (See buffered GCode Commands).

The Digital I/O 0 - 21 are routed to connector JP3, and Digital I/O 20 - 27 are routed to connector JP4 all as LVTTL signals (which are also 5V TTL compliant and tolerant). Note that Digital I/O 20 and 21 are routed to both connectors.

Digital I/O bits 0 - 7 are wired internally to the 4 quadrature encoder inputs (2 bits - Phase A and Phase B for each encoder). For each encoder that is intended to be used, the corresponding Digital I/O bits must be defined as inputs.

Digital I/O bit 28 is dedicated as the +/-15V enable. Setting this bit activates the KMotion on-board +/- 15V generator. The +/- 15V is derived from the 5V supply and is able to source ~ 2 Watts of power on each supply (~ 130ma). This supply is required to be enable when using the +/- 10V ADC inputs or +/- 10V DAC outputs.

Caution: Shorting + or - 15V to any Digital I/O bit will cause permanent damage.

Digital I/O bit 29 is dedicated as the Fan Control bit. Applications that supply high currents (> ~ 2Amps) for extended periods (> ~10 seconds) on any axis should enable the fan to cool the output stages and avoid thermal shutdown of the output stages.

Digital I/O bit 30 is dedicated as the Aux Control Switch. The Aux Control Switch may be used to switch some medium power (< 30V @ 2A) device like a lamp or solenoid (See example).

Digital I/O bit 31 is a dedicated input of Thermal Warning Status. Any output stage that is overheating (internal junction temperature > 145 degrees C) will trigger the thermal warning and cause shutdown of all output stages.