Applies To:
  • CitectSCADA 3.xx 4.xx 5.xx

I want to display a JPG file in Citect and have heard that I can use MCI commands to do it. How do I go about it? 

The Media Control Interface (MCI) is a high-level command interface to multimedia devices and resources. Using this function, you can control multimedia devices by using simple commands like open, play, and close. MCI commands are a generic interface to multimedia devices.

An MCI Device consists of both Hardware (may be custom or generic) and Software. When Citect uses the "DspMCI" command, it passes an MCI command string to Windows which then passes the command to the appropriate MCI Device (Software).  There are many type of MCI Devices. The following is an extract from a System.INI file in Windows 95.


In the above list the Software component of the MCI Device is on the right of the "equals" and the "Type" of MCI Device is on the left.

The following is a list of some standard MCI Commands (note : Not all MCI devices support all the different MCI commands). For more information on MCI Commands, refer to the documentation on the MCI Device you are using OR see the file MCISTRWH.HLP from Microsoft.

open "Device" Open an MCI Device
alias "Name" Allows you to use a shorter name for future commands. Used with the "open" command.
type "Type" Allows you to specify the MCI Device to use (see list above). Used with the "open" command.
status "Name" Get information from the "name" MCI device.
seek "Name" Get information from the "name" MCI device.
play "Name" Play the MCI Device
close "Name" Close the MCI Device

The following shows some of the MCI Commands being used (note : it is possible to open multiple MCI Devices simultaneously).

// Display a JPG file in a new window (close the window first if it is already open)
DspMCI( "close pic" );
DspMCI( "open c:\citect\user\demo\picture.jpg alias pic type QTWVideo" );
DspMCI( "play pic" );

// Play a WAV file from start to end
DspMCI( "open c:\citect\user\demo\sound.wav alias snd type waveaudio" );
DspMCI( "seek snd to start" );
DspMCI( "play snd wait" );
DspMCI( "close snd" );