56 October 2013
The first 16 I/O positions are dedicated to encoders,
home switches, and limit switches. I/O bits 46 and 47
are dedicated to a pair of user-programmable LEDs.
You can see the LEDs that are placed just above the
power connector (JR1) in Photo 2.
The I/O pins that make up JP4 (Aux #0) are shown in
Screenshot 4 as KFLOP I/O pins 16 through 25. The
KFLOP’s JP5 I/O pins are listed as 26 through 35. KFLOP
I/O pins 36 through 43 are part of the LV differential
connector JP5. The JP5 I/O pins are intended to be used
as high speed differential communications pins that
interface using twisted pair cable. I/O bits 44 and 45 are
located in the JP7 I/O pin cluster. All of the JP7 I/O pins
are five volt tolerant with the exception of I/O pins 44 and
45 which are restricted to 3. 3 volt logic levels.
KFLOP I/O pins can be controlled directly from the
digital I/O view or programmatically using a C program or
script command. For instance, I/O bit 16 can be forced
into output mode by simply clicking the bit 16 Output
The logical state of bit 16 is displayed in the bit 16
State check box. We can also control the direction and
logical state of I/O bit 16 from within a C program thread.
Take a look at Screenshot 5. Thread 1 now contains a
C program that will manipulate I/O bit 16. The
program is pretty easy to follow.
We set I/O bit 16’s direction to output and
alternately toggle the bit’s output state every 10
seconds. Our C program also provides a human
readable output describing the current state of I/O
The console view associated with our bit toggle
program is shown in Screenshot 6. Note that the bit
16 Output check box is checked in Screenshots 7
and 8. Bit 16 is forced logically high in Screenshot 7
and taken logically low in Screenshot 8.
As you can see, the State check box corresponds
to the information in the Console view.
■ Screenshot 4.
I/O pins listed
here can be
with the I/O
■ Screenshot 5. The example C program shows just how
easy it is to manipulate the KFLOP's I/O subsystem.
■ Screenshot 6. So it is written. So shall it be displayed.
■ Screenshot 7. This view of the KMOTION console
and digital I/O panels is displayed when the
C program sets I/O bit 16.