How Do I ... ?

Control an Infrared Device

 

 

Almost any device that has an infrared remote control, such as a DVD Player, Plasma screen or satellite set-top box, can be controlled from Stardraw Control using an attached infrared port.

 

Online Resources

There is a multimedia walk-through of these techniques in the online Technical Resources.

 

You Will Need...

To send remote control commands, you will need an infrared transmitter that your control PC can send the command data to, and you will need to know the make and model of the device you wish to control.

 

The hardware you will need is:

 

Typically, you will need a separate converter (or a converter with multiple IR outputs) for each infrared device you wish to control.  There are different types of converters available that use RS232, USB or Ethernet connections from your control PC, and have varying numbers of IR outputs.

 

Examples of Ethernet to IR converters that are supported by Stardraw Control are:

 

Notes

The infrared port found on many laptops, tablet PCs and UMPCs is usually an IrDA A common term for infrared wireless communication, the IrDA is the "Infrared Data Association" standards body that defines specifications and protocols. port, which is used for short-range wireless communication between portable computers, mobile phones and PDAs, etc.  Because IrDA operates at a different frequency from handheld remote controls, you cannot control IR devices directly from your PC: you will require an external infrared emitter.

The devices mentioned above are not specific recommendations; please refer to Manufacturers and Equipment for more information.

 

CCF Codes

Stardraw Control has a large built-in library of manufacturers and products and their remote control codes, however if your device is not listed or a specific function you require is not included in the Stardraw library, you will need to obtain the device's CCF Control Code File: a text file that represents an infrared remote control command for a particular device, represented by a series of hex codes. codes from the manufacturer.

 

Note

A CCF code (such as the example below) represents a single remote control function, such as Play, Mute or Channel Up.  You will need to obtain CCF codes for all of the remote control functions you wish to perform.

 

A typical CCF code looks like this:

 

 

0000 0067 0000 0022 0155 00ac 0016 003f 0016 003f 0016 0015 0016 0015 0016 0015 0016 003f 0016 0015 0016 003f 0016 0015 0016 0015 0016 003f 0016 003f 0016 003f 0016 0015 0016 003f 0016 0015 0016 0015 0016 003f 0016 003f 0016 003f 0016 003f 0016 0015 0016 0015 0016 003f 0016 003f 0016 0015 0016 0015 0016 0015 0016 0015 0016 003f 0016 003f 0016 0015 0016 0597

 

 

If the CCF codes cannot be obtained from the device's manufacturer, you could:

 

Tip

Global Caché's GC-IRL receiver device and software can be used with a PC to learn infrared remote control codes.  The utility software displays the captured codes, which can be copied to the Windows clipboard as a CCF format code.

 

Please refer to the Support section for additional assistance.

 

Configuring Infrared Devices

To add support for infrared remote control, the first step is to add an Infrared Device to your project and connect it to your converter device.

 

To add an Infrared Device

  1. In the Topology View, locate the Infrared Device in the Stardraw Control Products List.

  2. Click and drag the device to add it to your topology.

  3. In the Choose Infrared Device dialog that appears, first select the device manufacturer from the Manufacturer list.

  4. Select the device's model number from the Model Number list.

  5. In the Functions list will appear all of the remote control functions that are supported.

 

If the functions you wish to use are not listed in the Functions list you can add them easily; please refer to Modifying Infrared Devices below.

 

If the manufacturer or model number is not listed in the Choose Infrared Device dialog, you may need to create a custom infrared device; please refer to Creating Infrared Devices below.

 

To connect an Infrared Device

  1. In the Topology View, locate the serial converter in the Stardraw Control Products List.

  2. Click and drag the device to add it to your topology.

  3. Connect the IR input port of your infrared device to the corresponding IR output of your serial converter.

 

Controlling an Infrared Device

All the functions for your IR devices appear as callable methods from within the Actions editor.  Any IR function can be called in response to any event.

 

In the Actions Editor, all the remote control functions for an IR device are listed when the device is selected.  Even if you add extra functions to the device, the list will automatically update when next viewed.

 

The following procedure illustrates how to create an Action that calls the Play command on an IR device named "Infrared Device (1)" in your topology.

 

To create an Action that calls an Infrared function

To call an IR function in response to any device or control Event:

  1. In the Forms View, locate the form or control that fires the Event you wish to capture.

  2. Add the following Action to call the Play command:
    Devices
    Infrared Device (1)IRPlay

  3. Click Ok to close the Actions dialog.

 

Modifying Infrared Devices

You can easily add, modify or delete infrared remote control functions for any device in either the My Libraries list or the current project's Topology View.  This may be necessary if the standard Stardraw library for your device does not include the functions you need.

 

Notes

For this procedure you will need the CCF Control Code File: a text file that represents an infrared remote control command for a particular device, represented by a series of hex codes. codes for all of the remote control functions you wish to add.

Modifying an infrared device in the Topology View will alter only that copy in the current project.  Alternatively you can modify the device from the My Libraries list, which will make your changes available for any project.

 

To add an Infrared Command

  1. In the My Libraries list or Topology View, double-click the infrared device you wish to modify.

  2. In the Product Properties, click Edit: in the Port dialog that appears, click Edit to view the IR Codes list.

  3. Double-check that the function is not already listed: it may have a different name to what you expect.

  4. To add a new remote control function, click Add: the IR Function editor dialog will appear.

     

    The IR Function editor

     

  5. Specify an appropriate Function Name, e.g. "Play", "Mute", "Channel Up" etc.

  6. Paste the CCF Code from the IR capture software or from your manufacturer's documentation into the box provided.

  7. Click Ok: Stardraw Control will validate the code and, if accepted, the IR Function dialog will close.

  8. Repeat steps 4 to 7 for each function you wish to add.

 

In the IR Codes list you can edit or delete any existing code.

 

Note

This should be done with great care, especially if you are modifying the device directly from the Topology View, as it will affect any existing Actions that may use those functions.

 

Creating Infrared Devices

Creating new infrared devices is similar to modifying an existing infrared device, as detailed above, but with a few extra steps.  This may be necessary if the standard Stardraw library does not include the device you need.

 

Note

For this procedure you will need the CCF Control Code File: a text file that represents an infrared remote control command for a particular device, represented by a series of hex codes. codes for all of the remote control functions you wish to create.

 

To create a new Infrared Device

  1. In the Topology View, click the Add New Product button on the toolbar, press F8 or click the Tools menu and select Add New Product.

  2. Select the device manufacturer from the Manufacturer list: if the manufacturer is not listed, click New to add the manufacturer.

  3. Supply the relevant Model Number and Description, then click OK.

  4. In the Product Properties dialog, the Shared option can be cleared if you do not wish to share your new device driver with other Stardraw Control users; otherwise leave this option set.

  5. Click Add to create a new port: specify "IR" as the Port Name, and select "InfraRed Input" as the Port Type.

  6. Click Edit: the IR Codes list will be displayed.

  7. To create a new infrared function click Add: the IR Function editor dialog will appear.

  8. Specify an appropriate Function Name.

  9. Paste the CCF Code into the box provided.

  10. Click Ok: Stardraw Control will validate the code and, if accepted, the IR Function dialog will close.

  11. Repeat steps 7 to 10 for each function you wish to create.

 

When you have finished, the new infrared device will appear in the My Libraries list: you can now use the new device by clicking and dragging it onto your topology.

 

See Also

Infrared Drivers

Support

Global Caché

Xantech