Waking up the scanner – Rockwell Automation 6008-SV2R VMEbus remote I/O Scanner User Manual

Page 131

Advertising
background image

Chapter

Starting the Scanner

7

7Ć5

Waking Up the Scanner

Only a VME master processor can wake up the scanner. The VME master
wakes up the scanner by interrupting the scanner (writing any value to the
scanner’s ID area). The scanner responds to the interrupt by moving to the
PROGRAM state.

As soon as the scanner receives the first command (usually a SETUP
command), the operating status byte gets set to 0x01 and the scanner starts
the VME master processor watchdog timer. The scanner must receive a
valid command at least every 500 msec or the scanner will reset itself. You
can adjust this time value by using the SETUP command.

The following example function shows one way to wake up the scanner.

/*

**

** WAKEUP() –– wake up the 6008–SV2

**

**

When the 6008–SV2 is first powered up, it enters the SLEEP state. Writing a scratch

**

value to the VME ID Area will assert a local interrupt on the scanner, transitioning

**

it from the SLEEP state to the PROGRAM state.

**

**

parameters:

pointer to channel structure

**

return value:

none

**

*/

void

wakeup (channel far *chan)

{

csa_data far *csa;

/* map the channel & establish pointers */

map_channel(chan);

csa

=

(csa_data far *)

chan–>ControlStatusArea;

/* wait for SV2 to complete POST */

while (csa–>cnfstat != 0x0090);

/* write the VME ID AREA of scanner */

assert_cmd(chan);

/* unmap the channel */

unmap_channel(chan);

return;

}

Advertising
This manual is related to the following products: