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

Page 134

Advertising
background image

Chapter

Starting the Scanner

7

7Ć8

/*
**
** ASSERT_CMD() –– touch scanner channel location monitor
**
** This function does a word–write to the base of a 6008–SV2 channel VME–ID/Scanner
** interrupt area. This triggers a local interrupt on the 6008–SV2, alerting it
** that a command has been placed in the channel’s control/status area for processing.
**
** parameters: pointer to channel structure
** return value: none
**
*/

void
assert_cmd (channel far *chan)
{

unsigned short far *vid;

/* map channel & establish pointers */
map_channel(chan);

vid = (unsigned short far *) chan–>VmeIdArea;

/* touch the scanner’s channel location monitor */
*vid = (unsigned short) 0x0000;

/* unmap the channel */
unmap_channel(chan);

return;

}

After you wake up the scanner, the scanner write 0x10 to the command
status byte. Now the scanner is ready to accept commands. For example,
send these commands:

SETUP to configure the scanner

AUTOCONFIGURE

or to create a scan list
SCAN LIST

SET MODE to put the scanner in run mode

If the VME master processor interrupts the scanner after waking the
scanner up but without having a command ready to send to the scanner, the
scanner ends up resetting itself. This is because there is no command for
the scanner to execute, so the scanner’s watchdog timer, which defaults at
500msec, runs out.

The programming examples in chapter 8 show how to use the scanner
management commands. Each command description ends with a
recommended procedure for using the command to avoid interrupting the
scanner without having commands ready for the scanner to execute.

After Waking Up the

Scanner

Advertising
This manual is related to the following products: