Initializing the ktcx card, Reset the hardware by performing the following, Wait 4 seconds for the operating state to chang – Rockwell Automation D17846.2.4 CONTROLNET KT EMULA User Manual

Page 18: Load the following sequence into the dual-port, Release the card by writing a 1 to byte offset, Monitor the offset 0012h (ktcx_alive flag until, Initializing the ktcx card -2

Advertising
background image

Publication 1784-6.2.4 - September 1997

2-2

What Your Driver Must Do at Start-up

Initializing the KTCX Card

To bring the KTCX card in KT Emulation mode and communicating
on the network, follow these steps (See Appendix B for the defines):

1.

Reset the hardware by performing the following sequence:

outportb( H186RESET, 0 );// hold the card in reset

outportb( H186RUN, 0 ); // start the card

2.

Wait 4 seconds for the operating state to change to start-up.

3.

Load the following sequence into the dual-port:

4.

Release the card by writing a 1 to byte offset 0802h.

5.

Monitor the offset 0012h (KTCX_alive flag until it transitions
from state 4 to state 2 at which time the card is online. This
process takes about 5 seconds.) If the keeper node is non-existent,
the KTCX_alive flag will stay in state 3 until a keeper node is in
the network. Once the card is online (KT alive flag = 2), PCCC
messages may be transmitted.

:0011h

Reserved

---

---

---

:0012h

KTCX_alive

STAT

02h = KTCX is
functioning

W

R/W

See KTCX Alive section in chapter one.

:0013h

KTCX_dupe_node

STAT

00h = KTCX address
Valid
01h = KTCX duplicate
found

W

R

A value other than 00h means the installed KTCX
address is the same as another station on the link.

:0014h

KTCX_off_KTCX

CMD

01h = shutdown
KTCX
Note: First write 00h
to byte :0015h.

R

W

Host command to KTCX to shut KTCX down. The
KTCX scans for 01h every 10 msec. However, if an
interrupt is used, then shutdown is preformed
immediately.

:0015h

KTCX_stopped_flag

STAT

FFh = KTCX stopped

W

R/W

This byte is responsible for shutting the KTCX card
down.

:0016h

KTCX Module State

INI

N/A

N/A

N/A

CMD = Command From Host to KTCX; DIAG = Diagnostic Counter; STAT=Status; INI = Initialization; N/A = Not Applicable

R = Read; W = Write

Offset

Value (Range)

Comments

0000h

0xC3

0001h

0x00

0002h

0x00

0003h

0x00

0004h

0x00

on-line

0005h

1-99

node address

0014h

0x00

free from shutdown

Advertising