SCSI - Small Computers System Interface

SCSI2 medium changer devices

  • General information
  • Programming a medium changer device
  • CD disc changers
  • Juke box projects
  • General information

    A SCSI2 medium changer device is called juke box for short, because it resembles those old pop & rock 45 rpm vinyl disks changers of the '50s and '60s.

    A juke box is a robot that changes the medium into one or more removable medium mass storage drives. The medium can be a tape cartridge, a magneto optical disk, a CD, or a DVD.

    Former juke boxes dealt with tape cartridges and magneto optical disks, but as CD-ROM and CD-R became widespread, CD juke boxes started appearing on the market. Some primary manufacturers (Plasmon, Pioneer, Kodak, as far as I know) offer their fine products.

    A juke box is equipped with its embedded controller, a true computer that supersedes the following tasks:

    • remember the internal state of the juke box (a non volatile memory stores the state when power is turned off)
    • operate the robotics
    • receive and execute SCSI2 commands
    • execute commands from the front panel
    • avoid to execute dangerous or unuseful commands
    Dangerous commands would be, e.g., those that would try to load a disk into an already loaded drive. Unuseful commands would be those, e.g., that would try to unload a disk from an empty drive or pick a disk from an empty storage area. All these contingent allegiance conditions are reported as errors to the user, and you should check the sense data to discover what happened.

    Sometimes the programmer has to force an error condition to know the state of some element inside the juke box. For example consider the import/export drawer, i.e. the drawer used to load and unload (one at a time) disks into the juke box. Suppose you write a routine to unload a disk from the juke box. How would you know whether the user has actually removed the disk from the drawer ? Simple: after closing the drawer send a command to try to pick a disk from it. If you get an error the disk has been removed. If you do not get the error, send a message box to the user saying: "Hey you ! I told you to remove the disk from the drawer". Then repeat the operation until you get the error.

    Juke boxes accomodates dozens of disks, and loading them one at a time by means of the import/export drawer would be time consuming. To quickly load or unload hundreds of disks from the juke box you should open its front door. As you open the door you will see some plastic boxes used to hold disks.

    The juke box in my laboratory is a Plasmon D120-20 and, as its name says, it holds up to 120 CDs. These disks are contained into twelve plastic boxes, each containing 10 ultra slim trays. Each tray accomodates one CD. Opening the door and loading 120 disks is a matter of few minutes.

    A 120 CD juke box is worth some thousands bucks, and contains up to 76.8 GB of data. You could say that a 70 GB hard disk is faster and costs only one hundred bucks, so why buying an expensive juke box instead of an hard disk ? Well, juke boxes were born long before 70 GB hard disks appeared on the market, but anyway these are some reasons:

    • CD storage is much more robust and safe than a fragile hard disk
    • you can't implement the applications described in the section juke box projects below using a hard disk
    In any case modern juke boxes are easily expandable by changing the internal CD drives with DVD drives. It takes few minutes to extract a CD-ROM drive and insert a DVD drive. If I put a DVD drive into my 120 disks Plasmon juke box it would immediately expand from 76.8 GB to 564 GB ! Yes, because a DVD disk side contains up to 4.7 GB.

    Programming a medium changer device

    From the programmer's standpoint a juke box is composed of the following elements:
    • storage area: it is the parking area where CDs rest when not in use; it is divided into storage units; each storage unit is numbered, and can accomodate one disk
    • import/export drawer: usually only one drawer is built in a juke box; it has its own identification number
    • medium transport: it is the robot arm that actually moves CDs back and forth between the storage units, the import/export drawer, and the CD drives; it can hold one or two disks; each holder is numbered
    • disk drive: it is the data input/output device; it can be a CD-ROM reader, a CD-R writer, or a DVD unit; at least two disk drives are contained into a juke box; each drive has its own identification number

    As you can see any element inside the juke box is numbered. Numbers are assigned according to some different built in schemes. These numbers are used to refer to each individual element.

    SCSI2 medium changer devices can be operated by means of only one SCSI2 device specific mandatory command: the move medium command. Yes, managing the juke box is only a matter of moving disks between numbered locations inside it.

    I used a Plasmon D-series juke box as the mass storage device for my image optical storage and retrieval systems. As explained in this section images are usually memorized in TIFF files, and these files are stored on CD-R disks. Big archives deal with some millions image files, and nothing is better than a CD-R juke box to keep them ordered.

    I had to wrote a sort of file system management server program to get the proper disk loaded into a drive for any file required by a client application.

    The server program is lightning fast, because it relies upon a database. The requested filename is seeked into a table, and the proper disk is immediately recognized and eventually loaded. The database is managed by means of BDE.

    The juke box itself is also very fast. It takes 3 seconds for a Plasmon D-series juke box to insert (or remove) a disk into a drive. Plus it takes 6 to 7 seconds for the disk to spin up into the drive.

    The overall performance is excellent. If the required file is in the disk already loaded into a drive both the server program and the juke box do nothing, and the response time is 0 seconds. Only if the drive is stopped (after some minutes of inactivity) it takes 6 to 7 seconds to spin up again.

    If the required file is in a disk not already loaded, field measurements indicate that it takes 12 to 14 seconds for the file to become accessible. It is the result of a couple of disk changes, a spin up, and some overhead time.

    The whole system is very reliable too.

    To write an application program that deals with a SCSI2 juke box you naturally need its SCSI2 command set reference. These documents can be easily downloaded from Plasmon's site ( Command set references for Kodak's juke boxes come with the devices themselves, I was told from the italian representative. The drawback is that you have to buy a device to get its documentation.

    CD disc changers

    CD disc changers are not SCSI2 medium changer devices. Before the advent of SCSI3 these little robots were forced to appear like a few SCSI2 devices of CD-ROM device type at some consecutive LUNs of the same SCSI Id address.

    For example a Pioneer DRM-624 automatic six discs changer occupies LUNs from 0 to 5 at the same SCSI Id address. But if you send six inquiry ASPI commands at its SCSI Id, LUNs from 0 to 5, the DRM-624 responds six times it is a SCSI2 CD-ROM device. It does not respond it is a SCSI2 medium changer device. In fact it is not exactly a juke box, it is a six CD automatic changer.

    I bought a Pioneer DRM-624: attached to any PC with Win95/98/NT it is automatically recognized without the need for any driver. Its six internal disks are mapped to the first six consecutive available drive letters. It is a nice product, good to keep application software on line.

    Juke box projects

    Duplicating disks

    Duplicating disks requires a CD-R writer to be fitted into the juke box. You should first prepare a CD-ROM ISO image file using, say, Adaptec Easy CD. Then it would be easy to write a program that changes several blank disks into the CD-R writer and burns the ISO file into each of them.

    The whole job could be carried out completely unattended.

    See CD-R writers revealed to learn howto duplicate CDs.

    Automated FM radio broadcasting station

    Suppose you load dozens of CD audio disks into a juke box, and fill at the same time the records of a database table with the name of each song and its singer.

    Also suppose you create a CD audio with advertising messages, and put it into the juke box too.

    You can write two kinds of programs to automate the FM station activity. A first program would be an entertainment music program unattended generator, which randomly changes songs and programmatically playbacks the advertising messages.

    Another useful program would support the disk jockey in searching, chosing, and playing songs requested by listeners or by the disk jockey himself.