link: Mananging Consultant

Cari Blog Ini

Rabu, 08 Februari 2012

USB I/O Modules





for Local Area Networks (LAN)


 
 
 
 
 

User Manual

Version 6.106/15/11
Copyright (C) 2001 - 2011
All rights reserved
 
 
 
 
 
 
 

Kadtronix
web: www.kadtronix.com
email: info@kadtronix.com


 

Table of Contents

  1. Introduction
    1.  
    1. System Requirements
    2. Email Client Compatibility
    3. Features
    4. Ordering
    5. Demo
    6. Installation
      1.   
  2. Program Operation
    1.  
    1. License Registration
    2. I/O Database
    3. Properties
      1.  
      1. Global Properties
      2. Email Properties
      3. Network Properties
        1.  
    4. Configuring I/O Signals
    5. Mapping Devices
    6. Virtual LED Panels
    7. SPI Control
    8. Remote Network Monitoring
    9. Attaching Events
      1.  
      1. Single-Bit Trigger
      2. Multi-Bit Trigger
      3. SPI Trigger
      4. Time Trigger
      5. Notifications
        1.  
        1. Display Message
        2. Send Email
        3. Set Output
        4. Play Wav Sound
        5. Run Application
        6. Write SPI Slave
        7. Perform System Action
        8. X10 Automation
          1.  
    1. Copying Attributes
    2. Testing
    3. Importing
      1.  
  1. USB I/O Modules
    1.  
    2. U401
    3. U421
    4. U451
      1.  
  2. Legal
    1.  
    1. License
    2. Warranty

    3.  
 



 
 
  1. Introduction

  2. The USB Digital I/O Commander, herein referred to as simply "Digio", provides a simple yet powerful means of interfacing your computer to external devices via digial I/O signals.  Compatible with desktop and laptop systems, Digio allows a Windows PC to set digital outputs and/or read digital inputs.   Versions  4.0 and later have SPI capability for communicating with devices such as EEPROMs, real-time clocks, shift registers, data converters, etc..  Using 4 signal lines (MOSI, MISO, SCLK, and SS), one Digio module can communicate with up to 10 slave devices.  You can use Digio as a simple means of controlling external devices.  Great for hardware designers, Digio requires no microcontroller, firmware, or programming experience.In addition, versions beginning with 5.0 include optional remote monitoring capability over local area networks (LAN).  Now one or more users can remotely monitor device, data acquisition, and/or equipment operation.   Even receive text messages when trigger events occur.  Also compatible with wireless networks for even greater flexibility.
    Versions 5.1 and above also include virtual LED panels with configurable colors.
    While Digio can perform simple "set" and "get" operations, its real strength lies is its ability to define notification event(s) when input signals, also referred to as "trigger signals" or "input triggers", change state.  This is particularly useful in situations where you may want to monitor digital inputs or SPI slave devices autonomously.  For instance, you can specify that an email message is sent to a designated recipient when bit #12, device #0 changes to a HIGH (1) state.  Or specify a digital output to be set when a SPI temperature controller indicates a high threshold.  You could also indicate that a pop-up message appear on the monitor and/or a sound (wav) file is played.  Even  activate a relay (U451) if desired.  The possibilities are limit-less.  You'll find Digio an important tool for use in a variety of applications including industrial process control, robotics, hardware design, and prototyping.
    Digio uses a USB I/O interface module that connects to an available USB port on your computer.  The module provides 16 I/O signals configurable in any combination of inputs and outputs.  The system is easily expanded by simply using additional USB modules.  (Note:  Version 2 and below of the USB Digital I/O Commander use an ActiveWire USB I/O interface.  Versions 3 and higher use a USBMicro device.)  
    1. System Requirements

    2. Digio requires a Windows laptop or desktop PC with the following minimum capabilities:
          1. Pentium CPU
          2. 8 MB RAM
          3. 1 MB Available Hard Disk Space
          4. VGA Monitor
          5. 16-bit sound-card (optional)
          6. Network interface card/adapter (for L'AN versions w/ remote monitoring)
          7. USB port
          8. Windows 98/2000/XP

          9.  
      1. Email Client Compatibility

      2. If you wish to use the optional Email notification feature, you will need a SMTP/POP3 compatible Email client program such as:
           
          1. Eudora (Lite & Pro)
          2. Microsoft Outlook
          3. Pegasus
          4. Calypso
          5. PM Mail 98
          6. Actif Mail
          7. Lotus Notes
          8. Netscape

          9.  
      3. Features

      4. Digio features include the following:
             
          1. Configure input(s) as single-bit or multiple-bit event triggers
          2. 7 different notifications including email, WAV file, pop-up message, set output, run application, write SPI output, and perform system action (version 5.11e and above)
          3. Attach events and perform test preview
          4. Virtual LED panels
          5. USB I/O interface module included, providing 16 I/O signals
          6. I/O signals configurable in any combination of inputs and outputs
          7. Expandable up to 160 I/O signals by adding more modules
          8. Read/write up to 10 SPI slaves, expandable to 100 slaves by adding USB modules
          9. Send SPI data from tx file and capture receive data to rx file (version 5.11c and above)
          10. Configure notification delays (filters) to limit the number of notifications over a period of time
          11. Compatible with multiple email client programs including Outlook, Eudora, Netscape, and others
          12. Remote monitoring over local area networks

          13.  
      5. Ordering

      6. Digio is available at the following source:    Kadtronix
            web: http://www.kadtronix.com
            email: sales@kadtronix.com

      7. Demo

      8. A trial version of the program is available for download.  This version is fully operational, but may lack some functions.  It allows you to examine the features of Digio.   Visit the Kadtronix website for download details.
         
      9. Installation

      10. Before installing the application, you may need to uninstall any earlier version that already exists.  If you would like to maintain earlier version(s), you must install the new version to a different  location on your hard drive.  To start the installation process, locate and run  the self-extracting setup file (setup.exe) on the install media.Digio uses a USB I/O module card to interface digital signals.  Using a compatible cable, plug the device into an available USB port on your computer or into external USB hub.  The first time you perform this procedure, the Windows operating system will detect the new hardware and attempt to locate a driver.  The required drivers should be already installed as part of your Windows operating system.  If your PC has difficulty locating them, browse to your Windows system drivers folder and to find them.
        If you are using more than one USB I/O module, plug the additional module(s) into available USB port(s) on your computer.  If there are not enough ports, you may need to purchase an external USB hub.  Available at computer stores, this device expands the number of available USB ports.
        Important:  You should plug in your device(s) before starting Digio.  While the program is running, you should not attempt to add or unplug USB interface modules as this could hamper Digio's ability to properly index them for proper control and monitoring.
       
    1. Program Operation
      1.  
      Activate the program by selecting:Start Menu -> Programs -> USB Digital I/O Commander for LAN
      When the program begins, the main display dialog appears as shown below:


      The toolbar at the upper right consists of 7 large buttons.  These controls are convenient quick-select items for choosing some of the more commonly accessed functions.  Most of these selections are also available from the menu.  From left to right, they are: remote monitoring, global properties, SPI control, digital I/O control, attach events, copy attributes, and help.  To show the function of a toolbar button, simply move the cursor over it and its description will appear.

      The large white area shows the signal list.  The signal list presents a summary of I/O properties associated with a selected device.  "Device" simply refers to a USB module.  To select a device, choose it from the "Select Device" combo-box near the top of the dialog.  Note that the data in the list is not necessarily valid unless the selected device exists.  The status line at the bottom of the dialog indicates the number of USB modules detected.  Devices are designated by virtual port assignment DEV_nn, where nn indicates a two-digit device number.  If, for instance, the status line indicates 1 device was detected, it will be assigned to virtual port DEV_00.  Additional devices will be identified with successive port number ID (e.g., DEV_01, DEV_02, etc.)  (Note:  Due to the nature of USB enumeration performed by Windows and the means by which USB modules are identified, it is important that if multiple devices are used, that they are all attached before starting the program and that they are not unplugged during program operation, as this could adversely affect device identification.)

      1. License Registration

      2. On first-time start-up, you will be asked to register.  Registration is required to properly enable the software and for product support eligibility.  Registered users will receive a registration license key-code by e-mail.  The license key will be derived based on your computer's node ID.  (On most machines, the node ID is the hard disk's volume ID.  The register dialog's disk ID field will be automatically populated with this information.)   Once assigned, the application will only run on the designated computer.   To register, select the following application main menu item:
         
          Tools -> Request License Key...
        (Note:  Remote (client) users of the multi-user edition need not register their software.  Only the local (server) user must register.)  When the "Register" dialog appears, fill in the requested information as shown in the example below.  When complete, click "Send" to transmit the information to Kadtronix.  (A valid e-mail account and  internet connection are required to perform this operation.):

        When you receive the license key from Kadtronix, select the following main menu item:

          Tools -> Enter License Key...
        A dialog image will be shown on your display.  Enter the encoded key string as shown in the example below.  Click "OK" to accept the new key and enable the application.

       
       
      1. I/O Database
        1.  
        An important feature of the program is the I/O database.  This proprietary structure contains properties and data associated with the program.  Global program properties are stored as well as information associated with each device and I/O signal.  The database stores the following types of information:
         
          1. Global notification enable flags
          2. Email settings
          3. Signal I/O properties
          4. Internal program parameters

          5.  
        After changing program properties, you can save these settings to the database using the "Save" feature.  To save your settings, choose the following menu item:    File -> Save...
        You may also delete the database if desired.  To perform this operation, make the following menu selection:
            File -> Delete...
        (In some cases, you may need to delete the database before installing new versions of Digio.)
         
         
      1. Properties
        1.  
        To examine or change program properties, make the following menu selection:Tools -> Properties
        A properties dialog will appear containing global properties as shown below:

        The properties page contains several groups of information:  global program properties, email properties, and network properties as described below:

          1. Global Properties

          2. The Properties dialog page contains configurable parameters that affect charactersistics of program operation.  The Global Enable Flags enable or disable one or more notification types, providing a convenient method of activating or deactivating all flags, rather than selecting them signal-by-signal.Notification delay provides a means of limiting notifications on signals that are expected to be particularly active.  Imagine a scenario in which a signal input being monitored is continually changing states.  Without some type of filtering capability, the computer would be bombarded with notification events.  The notification delay specifies a minimum time period between successive notifications on any given signal input.  Therefore, when an input trigger occurs and generates a notification, this timer will temporarily disable further notification on the signal until the time period elapses.  (Note that the delay is imposed only on the trigger signal.  All other signal inputs may still be triggered.)
            Versions 5.11d and above allow you to select the type of notification delay:  "Universal" or "Individual".  Select "Universal" when you wish to have all signal notifications use the same delay value.  Choose "Individual" when you want to specify different delay values for each signal.  Refer to the I/O Signals section for more information.
            Also new in version 5.11d are "Auto-Reset" and "No Re-Trigger" check-boxes.  Select "Auto-Reset" to clear the delay counter when a triggered signal returns to the normal, pre-trigger state.  This feature is useful in situations where you desire to allow a new re-trigger as quickly as possible.  Use "No Re-Trigger" when you want to prevent re-triggers on a signal that has not yet returned to its normal, pre-trigger state.  This feature is useful in applications when you want to limit each signal change to cause only one trigger such as security alarm systems.  Additional triggers will not be allowed until the signal returns to normal state.
            The device poll rate defines the rate at which the attached USB I/O modules are polled.  A faster poll rate yields better response, but also has the disadvantage of requiring more CPU resources.  A slower rate is recommended where possible.

          3. Email Properties
          4. Email properties define parmeters essential for sending email as shown below:

             The following parameters are required for email notifications:
            • Your email address (e.g., jimmy@att.net)
            • Outgoing (SMTP) mail server (e.g., mailhost.worldnet.att.net)
             
            The program is compatible with systems where e-mail is implemented on networked servers.  In this instance, simply enter the server name in the "Outgoing Mail Server" field.Specify the following parameters only if SMTP authentication is required:
            • SMTP user name
            • SMTP password
            Important:  Automatic event notification emails may fail on some platforms due to Windows security measures.  In particular, SMTP error code 49 could be an indicator that the firewall has denied the email attempt.  Your IT representative or system administrator should be notified of this condition as Windows firewall settings may require adjustment.  A possible alternate solution is to generate a manual email using the Registration feature ("Help -> Registration"). This results in the following Windows security message pop-up: 
    A program is attempting to send the following email on your behalf. 
    Would you like to send the message?
            Click "Yes" to allow the email to proceed. The Windows firewall may now permit subsequent automatic event notification emails.
           
          1. Network Properties

            1. The bottom ritght section of the page provides a field for supplying a network port number.  This value is required for allowing remote machines to connect to your computer.
      1. Configuring I/O Signals
        1.  
        This operation involves configuring the properties of individual I/O signals on the selected device.  To configure a device, select the following from the menu:Tools -> I/O Control...

        To choose a device, use the "Device" combo-box near the top of the dialog box.  Remember that although you can configure any device, only those device(s) that are actually plugged in and detected will respond to your configuration.
        The check box determines whether internal pull-up resistors will be used.  Pull-up resistors are applicable only to signals which have been configured as inputs and are useful for external devices including switches and relay contact closures where a logic low (0) signal is the active state.  They ensure that the non-active input state will be HIGH.  Pull-up resistors also help ensure that unused signal inputs have a defined state and are not floating.
        You should now configure the direction (input/output) and states (high/low). (Note:  It is not necessary to configure the states of input signals since their states are read from the device.)
        Next, assign an optional label for each signal.  The label should be a descriptive word or phrase to help you remember its purpose.  Note the following examples:

          Input label examples:  "Water level overflow", "Smoke alert", "Device on"
          Output label examples:  "Close valve", "Activate motor", "Turn off light"

        Notification delay is used to prevent an overload of notifications on very active inputs.  There are two columns of numbers under the heading labelled "Notification Delay".  They are titled:  "Value Now" and "Default".  "Value Now" provides an indication of when the next allowable notification can occur.  Notification on any given signal is temporarily disabled until this countdown timer reaches "0".  The "Default" column defines the beginning countdown value when a trigger event occurs.  You may define individual default values if the "Individuall" setting has been chosen in theGlobal Properties page.  Otherwise, all counters will be assigned an identical, universal value.
        To see the current value of the timers and input states, click the "Apply" button.
        The remaining controls on the dialog are convenience buttons aimed at simplifying operations.  Without these buttons, you would have to select each signal individually.  Of course, it might still be necessary to select signals individually if you are not setting them as all outputs or all inputs.  The "Set All Direction" buttons will set all 16 I/O signals as outputs.  The "Set All State" buttons set all signals states high or low.  Note that state changes, while applied to all signals, only have meaning for signal outputs and have no lasting effect on input signals.  The "Notifiy Timers" reset button provides a convenient means of resetting all notification delay timers, re-enabling notification(s).  This button should only be used in test situations when you wish to recycle a delay quickly to re-enable notification(s).  Use the "LED Colors" button to configure virtual LED panel colors.
        Click the dialog's OK button to save changes and exit.  Or, click "Apply" to save changes and without exiting the dialog.  Press "Cancel" to abandon changes.
         

      2. Mapping Devices
        1.  
        Digio versions 6.0 and above include a device mapping tool.  Mapping is useful when there may be multiple U4x1 devices you wish to use with your Digio software.  (One or more of these device(s) may be actually connected and in use on your computer.)  Mapping allows you to assign a specific device to a virtual port slot (e.g., DEV_00).  Similar in concept to now-defunct serial COM ports, mapping ensures that the intended device will be properly selected and assigned for use by your defined I/O and event notifications.

        Every U4x1 device is factory-programmed with a unique serial number.  It is this serial number which permits selective assignment.  For instance, you may assign U4x1 device having S/N = 060408111811 to virtual port DEV_00.
    To create, change, or review your mapping assignments, select the following menu option:
    Tools -> Map Devices...

    Convenience controls are provided for configuring device I/O and/or event notifications.  Click the button labelled "I/O..." to configure I/O signals.  Click the button labelled, "Events..." toconfigure event associations.

    Additional buttons are provided as shown below.  The buttons labelled, "OK" & "Cancel" exit the device mapping tool.  "Apply" updates your mapping selections, saving them to the internal database.  "Detect" forces a re-detection of available U4x1 devices.

    To create or modify a device mapping, click a combo-box in the column titled, "U4x1 Device" for the desired virtual port.  

    "ANY" will be shown if you have not made a prior selection. This indicates that Digio will assign any available device at the chosen virtual port slot.  Click the button on the combo-box to see a drop-down selection list of available device(s).  (Note:  Only device(s) which are currently plugged in to your computer will be shown in this list.)  Click on the desired device item in the list to assign it to the virtual port slot.  Then, click "Apply" to update your selection.  The right-most column, titled "Status" will show the new assignment.  If the selected device is connected and available, the status string will show the device type (i.e., U401, U421, or U451).  It will also show the last 4 digits of the device serial number.  If the device is not connected or unavailble, the status string will indicate "none".
    Repeat the above procedure for additional device(s) you wish to assign.  Click "OK" to exit the mapping tool.

      1. Virtual LED Panels
        1.  
        Digio versions 5.1 and above  include virtual LED panels for easily viewing digital input and output states.  A single panel of 16 LEDs exists for each active device.  To view the panel(s), click the LED check-box in the upper right section of the main display:  To extinguish the panels, click again to clear the check-box.  All panel(s) will be removed.
        There will be one panel for each active USB device that has been plugged into your PC and recognized by Digio. The following picture shows a typical LED panel:

        You may remove a LED panel by clicking its "Hide" button, located at the bottom of the panel display.  Each LED indicator has a defined color for high and low states.  Configure the colors by clicking the "Config" button.   This will activate the color definitions dialog as shown below:

        To change a signal's color, choose the appropriate combo-box and make the desired selection.  There are 4 colors to choose from:  blue, green, red, and yellow.  In addition, you can instruct Digio to flash a LED if the signal caused an event trigger.  Enable LED flashing by clicking the appropriate "Event Flashing" check-box.

         
      2. SPI Control
        1.  
        This selection allows you to configure and control the serial peripheral interface of selected master device(s).  You may even test attached slave devices by performing simple read/write transactions.  Select the following menu item:Tools -> SPI Control...

        First, choose the desired master device.  This is simply the USB module attached to your PC.  If there is only one USB module attached, your selection should be DEV_00.  Then, select the desired slave device.  There can be up to10 selections per master.  The slave assignment ranges from 0 to 9 and is somewhat arbitrary.  Assign any number to the slave you choose.  You may also assign an optional label to each device.  The label should be a descriptive string or phrase that helps you remember your assignments.  For instance, you could specify "Temperature Sensor, Board 1".
        You may now configure the SPI master.  When configuring the master, you must select several key attributes.  The "Clock" selection specifies the clock rate.  For most applications, the slowest clock rate (62Kbits/sec) will be fine.  If desired, you may choose a higher rate for time-critical applications.
        The "Phase & Polarity" field further defines the clock by specifying the state at which the clock starts (high or low) and on which edge the data is valid.  In many instances, the default selection ("Clock starts low, data valid on rising edge) will be correct.  However, you should consult the datasheet of the slave device for the correct setting.
        Also select the data-width.  This field determines the size in bytes of each data transaction with the slave.  Choose 1, 2, 3, or 4 bytes.  (Note that some devices may not be byte-oriented and may require a transfer that is not aligned to a byte boundary.  In these instances, select the next higher byte size.  For instance, a device requiring a 6-bit transfer can be defined as 1-byte (8-bits).  The two leading or trailing bits should be ignored by the slave device.  (Consult the device's datasheet for details.)
        The slave-select field determines which digital signal of the master (USB module) will be used to select or enable the slave device.  A single digital output must be designated by the master for each slave device exclusively.  Choose any available digital signal except those defined for the SPI interface (PA5, PA6, PA7).  Note that the slave-select must be defined an output signal.  If it is defined as input, you may re-define it using the "..." button.  The activation state defines whether the slave device is selected by active-low or active-high signal.  In most instances, the selection will be "Low".  (Consult the device datasheet for this information.)  The mode field defines whether the slave-select should behave as a chip-select or latch-enable.  A device defined for chip-select will be selected differently than a latch-enable device.  If chip-select, the master will enable or select the slave device, perform the data transaction, and then disable or de-select the device.  If latch-enable, the master will perform the data transaction, and then "latch" the data by toggling the signal line.  Devices such as shift-registers typically require latching operation.  Consult the datasheet for the proper selection to use.
        You may also specify an optional data-conversion operation to convert read data from a raw value to something more meaningful such as degrees, amperes, volts, etc.  To specify a modifier, select one from the combo-box and enter a value.  Then click "->" to transfer it to the edit field at the right.  To specifiy additional modifiers, repeat the process.  You may choose up to 10 modifiers.  Each will be performed in the sequence you have defined them.  Modifiers include:
          1. Add
          2. Subtract
          3. Multiply
          4. Divide
          5. Shift Right / Left
          6. Bitwise And / Or / Xor
          7. Modulus
        You may also specify a data format from the combo-box list.  These include:
        1. Unsigned (hex)
        2. Signed (integer)
        3. Decimal (float)

        4.  
          Choose the format that suits your application.  If you want to work in raw units, choose "Unsigned".  For signed numbers (positive and negative), select "Signed".  For decimal (floating-point) data select "Decimal".  Note that signed and decimal formats require appropriate modifier(s) for conversion from raw units.As an example, consider an analog-to-digital converter whose purpose is to determine the amount of current flowing through part of a circuit.  Rather than dealing with raw readings, we'd like to use amperes instead.  To make the conversion, we determined the following example equation:  Current = (((value >> 2) * 0.15) + 5.0).  To effect the conversion, specify a decimal data format and the following modifiers:
            RSHIFT  2.00
            MULT     0.15
            ADD       5.00
          Once you have configured the SPI master and selected modifier(s), you may test your configuration in the "Test" region.  Specify an optional write value by clicking the "Write" check-box and entering a value.  To read a value, click the "Read" check-box.  Then, click the "Go" button to perform the operation.  Choose "Repeat" to perform repitive reads/writes.
          You may also choose to send a pre-configured file containing SPI data.  To use this feature, click the "Send a File..." button.  The following dialog image will appear on your computer's monitor:

          This function will send and receive SPI data using the parameters you have configured on the SPI Control page.  You may designate files for transmit and receive.  The format of a transmit file may be ASCII or Binary.  An ASCII file may contain optional delimiters (such as carriage returns and/or linefeeds) for easy viewing.  Delimiters, if used, will be ignored and not sent in the SPI transmission.  All file values are in hexadecimal format.  Sample content is shown below:
          0001
          0002
          0003
          0004
          F001
          DE02
          C56B
          If desired, binary format may be specified.  Use the appropriate radio button to select the transmit file format.  Use the file browser ("...") button to locate the transmit file.

          To specify receive-capture, select the "Save Rx to File" check box and specify the desired  file format:  Formatted ASCII or Unformatted Binary.  Use the "..." button for file browsing.

          When you have configured the parameters for transmit and receive, click the "Send" button to begin the transmission.
           
           
      3. Remote Monitoring
        1.  
        This selection allows you to connect to a networked host computer and monitor its USB digital I/O.  The "host" is designated as the computer having the digital I/O hardware you want to monitor remotely.  (Note that a remote computer may only monitor the host.  Remote command and control are not permitted at this time.)  Before you may remotely connect, the application software must be running on the host computer.  At the host, open and run USB Digital I/O Commander for LAN.  Then, choose the "Local Control" radio button.  At the remote computer(s), choose the "Remote Monitoring" radio button as shown below:

        Then, click the "Remote Connect..."  toolbar button:
        The following dialog box will appear on the screen:

        Choose the desired network port number or use the default value.  The port number defined for the host computer must match that of the remote(s).  Also, enter the I.P. address of the computer you want to connect to.  Click the "Find..." button to obtain a list of detected network computers.  If you wish to select a computer from the list, simply open the combo-box and choose the desired entry.  Your selection's I.P. address will be automatically populated in the fields above.  Click "Apply" to store your settings.  Click "Connect" to attempt a connection to the host computer.  A successful connection will result in the following appearance:

        (You may terminate or cancel the connection by clicking the "Disconnect" button.)  Once connected, you may close this dialog and return to the main screen display.  The I/O list will now show identical contents to that of the host machine.  You can view the host's I/O direction (input/output), state (high/low), event trigger conditions, etc.  New screen updates occur at the rate of approximately 2 seconds.
        A status bar is positioned just below the I/O list as shown:
        The status bar provides information and statistics regarding the connection.  The left-most field tells the number of USB interface devices detected at the remote machine.  The next field to the right provides network communication statistics in terms of the numbers of packets sent (w = written) and received (r = read).  The next field to the right defines the amount of elapsed time (hours:minutes) since the connection was established.  The next field to the right tells the number of established connections.  It is shown disabled (grayed) above.  This field is only enabled on the local host machine (i.e., the PC having the attached USB interfaces being monitored).  There are two numeric parameters within this field having the format: x/y.  The first parameter  indicates the number of established connections.  The second parameter indicates the maximum allowed connections.  Therefore, "0/5" indicates there are currently no established connections and there are 5 maximum allowed.  The next control to the right is a message button and allows you to view received text messages.  Each trigger notification at the host computer results in a text message to all remote(s).  When new message(s) arrive, the indicator (at the far right end of the status bar) flashes.  You may also optionally configure an audible alert.  Click the "Msg" button to view the messages as shown below:

      4. Attaching Events
        1.  
        This process associates signal inputs and notifications.  A notification occurs when the input is triggered (or changes state).  To do this, select the following menu item:Tools -> Attach Events

          An event trigger is an action that causes one or more notification(s) to occur.  There are two types of event triggers:  signal triggers and time triggers.  A signal trigger, also known as an input trigger, refers to a change in signal state, resulting in one or more notification(s).  There are several types of signal triggers: single-bitmulti-bit and, SPI triggers.To configure an event trigger, you must first select the device and input signal you wish to designate as the input trigger signal.  Choose these using the "Device" and "Signal" combo-boxes near the top of the dialog.  If you want to use a discrete digital signal trigger, select the bit-length of the input.  Typically, this value will be 1, but there may be instances when you have an input that is characterized by a multi-bit field.  An example of this might be a 4-bit binary-coded decimal (BCD) input.  In this case, you would select a bit-length of 4, resulting in a multi-bit trigger definition.  Otherwise, use the default bit-length of 1 to define a single-bit trigger definition.

        1. Single-Bit Trigger

        2. A single-bit trigger is associated with 1-bit signal inputs, as described above.  To configure a single-bit trigger, select the "Single-Bit Trigger" trigger event combo-box.  Select one of the following from the drop-down list:

          • HIGH
          • LOW
          • PULSE (L-H-L)
          • PULSE (H-L-H)
          • DISABLED

          Select "HIGH" if you want a trigger notification to occur when the specified signal changes to the HIGH (1) state.  Choose "LOW" if you want trigger notification when the signal changes to the LOW (0) state.  Use one of the two "PULSE" selections when a trigger is to occur when the signal changes state and then returns to the normal state.  Select "PULSE (L-H-L)" when the signal's normal state is LOW, then changes to HIGH, and returns back to the LOW state, invoking the trigger.  Select "PULSE (H-L-H)" when the signal's normal state is HIGH, then changes to LOW, and returns back to the HIGH state, invoking the trigger.  Choose "DISABLED" if you want no single-bit triggers to occur.
           
        1. Multi-Bit Trigger

        2. A multi-bit trigger is associated with signal inputs that are 2 or more bits in length.  Note that a multi-bit input may not span a device boundary.  For example, consider the following example settings:
           
          Incorrect Multi-Bit Example
          Device=0 Signal=14 Bit-Length=4

          This multi-bit setting is invalid because, beginning at signal 14, there are only 2 signals remaining on the device, not 4.
          Shared inputs are allowed.  Shared inputs occur when 2 or more definitions share 1 or more input signals, as indicated in the following example:

          Shared Inputs Example
           
          Device
          Signal
          Bit-Length
          1
          0
          5
          4
          2
          0
          6
          2
          3
          0
          7
          1

          The above example indicates that all three definitions share 1 or more signals.  Definitions 1 and 3 share signal #7, definitions 1 and 2 share signals #6, & #7.  And definitions 2 & 3 share signal #7.
          To configure a multi-bit trigger, you must first select the bit-length.  Then choose the trigger event.  Select one of the following:
              1. EQ (=) Value
              2. NEQ (!=) Value
              3. LT (<) Value
              4. GT (>) Value
              5. DISABLED

              Choose "EQ" if you want notification(s) to occur when the input signals are equal the trigger value.  Choose "NEQ" if you want notification(s) to occur when the input signals are not equal the trigger value.  Choose "LT" if you want notification(s) to occur when the input signals are less than the trigger value.  Or, choose "GT" if you want notification(s) to occur when the input signals are greater than the trigger value.  Enter the trigger compare value in the "Value" field.  Otherwise, you may disable notifications on the signal.  (The current state & direction of discrete digital signals are shown in the "State" and "Direction" columns of the main display.  The trigger compare value will be shown in the "Signal Trig." column of the main display.)

            1. SPI Trigger

            2. A SPI trigger allows you to define an event that occurs when a slave device yields a predetermined read ("Trigger") value.  (This value will be shown in the "SPI Read" column of the main display.)  Note that the input signal selection mentioned above does not apply in the same way as for other triggers.  Instead, the input signal selection selects a virtual SPI channel.  Using this virtual SPI selection, you can create up to 16 different SPI events per master USB device.  Specify the desired SPI mode from one of the following combo-box selections:
               
                  1. Read
                  2. Write
                  3. Write/Read
                  4. Disabled

                  If the device requires a setup or initialization value, choose one of the write modes.  Otherwise, choose "Read".  Next, define the trigger value in the "Trigger" field.  This value will be compared against the value retrieved from the slave device.  Finally, specify the compare condition.  Choose one of the following selections:
                      1. EQ (=) Value
                      2. NEQ (!=) Value
                      3. LT (<) Trigger
                      4. GT (>) Trigger

                      Select "equal", "not equal", "less than", or "greater than".  (The trigger compare value will be shown in the "SPI Trig." column of the main display.)  You may also specify an optional "Setup" value.  Many slave devices require this value.  For instance, the setup value might specify which channel of a multi-channel analog-to-digital converter to read.  Note that SPI operation must be enabled for the USB module before you can specify a trigger event.  To do this, click the button labelled "..." in the SPI trigger region of the display.

                    1. Time Trigger
                      1. A time trigger is a special type of event trigger configured to automatically occur at specified times of day.  It is useful when you desire notification(s) to occur at known and/or regular intevals.  For instance, you could configure a trigger to set an output associated with activating a night-camera each evening at 6:00PM.  To use a time trigger, select the time(s) of day you want it to occur.  Make the desired "Time/Day Trigger" selection as follows:
                         
                          1. Daily
                          2. Quarter Hourly
                          3. Half Hourly
                          4. Hourly

                             
                          A daily trigger occurs each day at a specified time.  Use the "Hour" and "Minute" fields to indicate the desired trigger time.  (Note that military format is required.  For instance, to indicate a time of 5:15PM, specify Hours=17 and Minutes=15.)The remaining time trigger selections are repetitive in nature and occur at regular intervals.  Select a quarter-hourly trigger when you wish notifications to occur each 15 minutes, ie.,  00:00,  00:15,  00:30,  00:45,  01:00,  01:15,  01:30,  01:45, etc.
                          Half-hourly triggers occur at the following intervals:  00:00,  00:30,  01:00,  01:30,  02:00,  02:30, etc.
                          Hourly triggers occur each hour:  00:00,  01:00,  02:00,  03:00, etc.
                          You may further specify a time trigger by selecting which day(s) of the week they may occur.  To include day(s) of the week, check them.  To exclude, uncheck them.  Time triggers will only occur on those days that are checked.  (Time triggers are shown in the "Time Trig." column of the main display.)
                           
                      2. Notifications

                      3. A notification occurs in response to a trigger event as described above.  There are 8 different types of notifications that can occur.  You may select any number or combination of notifications for a given input signal.  To choose a notification, you must first enable the selection by choosing the check-box associated with it.  You may then select, configure, and preview the notification.  The "Select" and "Preview" buttons appear in the "Select Notifications" section of the dialog.  The "Select" button allows you to configure a notification or examine its current settings.  The "Preview" button allows you to preview or test the notification.  Each type of notification is described below.
                         
                        1. Display Message

                        2. This notification displays a pop-up dialog message on your computer's monitor.  To configure, choose the "Select" button.   The following dialog will appear:

                          Type the message you want displayed and select whether you want an automatic message.  An automatic message is displayed for a selectable period of time and then is automatically extinguished.  Click "OK" once you've finished configuring the message.  You may now preview the message by selecting the "Preview" button.

                        3. Send Email

                        4. This notification sends an email to a designated recipient.  To configure, choose the "Select" button.  The following dialog will appear:

                           Type the name of the recipient for this notification.  Use the format "name@domain.com".  (Note:  Previous versions of Digio required surrounding brackets:  '<' and '>'.  These brackets are no longer required.)  You may indicate multiple recipients in this field with comma separators.
                           Enter an optional subject for the message.  Also specify a body, the actual message you want to send.  Instead of typing the message, you can also specify a text file to use.  To specify a file, press the "..." button.  The contents of the file you specify will be used in the message body.  (Note that this is not an attachment.)
                          If you haven't yet done so,  configure email properties.  These parameters specify the email account and outgoing mail server.  To configure email properties, press the "Properties" button.

                        5. Set Output

                        6. This notification sets an output signal to the desired state when a trigger event occurs.  To configure, choose the "Select" button.  The following dialog will appear:

                          Then select the signal output you want to use.  Configure the desired output state that you want set when the trigger event occurs.  If necessary, use the "Configure Signal" button to configure an output signal.  You may also choose to have the signal automatically toggle back to its original state after the specified time period.  To do this, click "Enable Toggle" and choose the time period using the "Minutes" and Seconds" combo-boxes.

                        7. Play Wav Sound

                        8. This notification plays a sound file.  To configure, press the "Select" button.  The following dialog will appear:

                          Use the browser to locate and select a wav file to be played when the trigger event occurs.  Once selected, you may preview the sound by pressing the "Preview" button.

                        9. Run Application

                        10. The notification activates an application that you specify.  To configure, press the "Select" button.  The following dialog will appear:

                          Use the "..." button at the upper right to locate the executable (.exe) file.  Enter any command arguments that might be needed.  Use the lower "..." button to locate and select a file parameter if needed. Select "Run the application minimized" if you don't wish the application to appear on your computer screen.
                          The configuration shown above will play a video using the Windows Media Player.  You may also find it necessary to run other types of videos and presentations.  The following dialog demonstrates the configuration for playing a PowerPoint slideshow presentation:

                          Note: Use these steps when converting a PowerPoint presentation (.ppt) into a slideshow (.pps):
                            1. Start PowerPoint and open the presentation (.ppt) file you wish to convert.
                            2. Go to "Tools"  ->  "Options..." and select the "View" tab.
                            3. Uncheck the box titled "End with black slide".
                            4. Close the dialog by selecting "OK".
                            5. Save the presentation to a slideshow (.pps) file by selecting:
                            6.    "File" -> "Save As..."
                            7. Locate the combo box titled, "Save as type" and choose "PowerPoint Show (*.pps)"
                            8. Enter the desired file name and save the new slideshow.

                           
                        11. Write SPI Slave

                        12. The notification writes a pre-specified value to a SPI slave device.  To configure, press the "Select" button.  The following dialog will appear:

                          Choose the desired SPI master.  This is simply the active USB module the slave is attached to.  Also select the slave device.  Choose the hexadecimal value to be written and enter in the "SPI Write Value" field.  If necessary, click the "Configure..." button to configure the USB master for SPI operation.  When complete, click "OK" to save your changes.  Then, click the "Preview" button on the previous dialog to view and/or test.

                        13. Perform System Action

                        14. The notification performs the specified system action.  Select from the following possible choices:
                           
                          • Screen saver
                          • Shutdown
                          • Logoff
                          • Reboot
                          • Standby (suspend)
                          • Hibernate

                          To configure, press the "Select" button.  The following dialog will appear:

                          To specify screen saver action, click the "Screen Saver" radio button.  Then, using the combo-box titled, "Choose desired action", make the desired selection.  Choosing the activate option will cause the screen saver to be displayed when the defined trigger event occurs.  Choosing the deactivate option will cause the screen saver to extinguish (if it is being displayed).  You may optionally choose to send the screen saver back in its original state after the specified time period.  To do this, click the "Toggle" check-box and select the time period using the "Minutes" and "Seconds" combo-boxes.
                          To specify an alternative system action, click the "Logoff / Shutdown" radio button.  This will enable the associated combo-box control, allowing any of the following selections:
                          • Shutdown
                          • Logoff
                          • Reboot
                          • Standby (suspend)
                          • Hibernate

                          In addition, you may choose the "Keyboard / Mouse" option to emulate a keyboard or mouse event.  You may specify one of the following options:
                          • Keyboard characters
                          • Mouse left-click
                          • Mouse right-click

                          If you choose keyboard characters, the associated edit control will be enabled, allowing you to specify one or more characters and/or key-codes.


                        1. X10 Automation

                        2. X10 automation allows you to control and monitor powerline devices using X10 signals.  There is a wide array of available X10 modules for just about any application.  The following X10 interface device is required:
                           
                            PowerLinc 1132U Computer Interface (USB)

                          (It is not necessary to install the software that is included with the device since it uses existing Windows drivers.  Simply plug one end of the included USB cable into the device and the other end into an available USB port on your computer.)
                          This device communicates over existing A/C building wiring and allows your computer to send and receive X-10 signals.  You can obtain this device from companies such asSmartHome which carry a wide array of compatible X-10 hardware including:

                          • Controllers
                          • Motion detectors
                          • Plug-in modules
                          • Receptacles
                          • Relays
                          • RF Receivers
                          • Timers
                          • Wall switches

                          To configure X10 notification, click the "Select" button.  The following dialog will appear:

                          The dialog is divided into two main sections, titled: "Notification" and "Trigger Event".  Use the notification section to configure an X10 command to perform when a trigger event occurs.  Configuring a command requires selecting an address and a command function.  The address is a two-part identifier that specifies a house-code and unit-code.  The house code is a one-letter field ranging from 'A' to 'P'.  The unit-code is a numeric field ranging from 1 to 16.  When the two fields are combined, you can specify any of  256 possible addresses.  The address you choose must match the address you've chosen for the X10 module.  For instance, using a lamp module, you could turn on a light in your home when a trigger event occurs.
                          Use the optional "Reset" selection to specify a follow-on command to perform after a notification command has occurred.  This is useful in situations where you would like to reset or de-activate a device after a specified amount of time.  For instance, you could command a light to turn off after one hour.  To use this feature, specify the device address, command function, and timer period.
                          Use an optional trigger event when you want to specify an X10 trigger condition.  X10 triggers are similar to other Digio event triggers and can effect similar results.  An X10 trigger condition is a powerline transaction that is received via the PowerLinc device and causes one or more specified notifications.  These notifications are not limited to X10, but can be any of the available Digio notifications.  This powerful feature allows you to perform an action based on a received X10 signal.  For instance, you could play a .WAV file or set a U4x1 output signal when an X10 motion sensor detects activity.
                          If desired, you may store all received X10 signals to a text log file for later review using a program such as Windows Notepad.  To activate logging, simply click the check box titled "Log X10 activity to text file", located near the bottom left segment of the dialog display.  Each stored record contains the timestamp, module address, and function of the received transaction as shown below:
                             09/17/2005  07:43:32   Addr. = A3,  Function = On
                             09/17/2005  07:44:33   Addr. = A3,  Function = Off
                          A new log file is automatically created each new day.  The log file name has the following format:
                            _x10_MMMDDYY.txt
                          MMM is a 3-character month specifier, DD is a two-digit day indicator, and YY is the two-digit year.  For example, a log file created on January 4, 2005 would have the following name:
                            _x10_Jan0405.txt
                          For additional information about X10, visit this online resource:
                            http://www.answers.com/topic/x10

                       
                    2. Copying Attributes

                    3. You may find it necessary to configure many I/O signals with similar attributes.  Rather than configure each signal individually, you can use the "Copy Attributes..." feature to copy the properties of a signal to one or more destination signals.  To use this feature, select from the menu:Tools -> Copy Attributes...

                      First specify the source signal.  This is the signal having the attributes you want to copy.  Then, specify the destination signal(s).  If you want to copy to a single destination, indicate identical starting and ending destination signals.  To copy to multiple destinations, specify the range appropriately.  For instance, suppose we had configured device 0, signal 0 as an input with an activated single-bit trigger and an email notification.  If we desired to copy these attributes to all devices, all signals, we could use the copy feature and specify the following:
                       

                      Source Signal
                      DeviceDEV_00
                      Signal00

                       
                      Beginning Destination Signal
                      DeviceDEV_00
                      Signal01

                       
                      Ending Destination Signal
                      DeviceDEV_09
                      Signal15

                       
                       
                    4. Testing

                    5. Digio provides a feature for testing output signals on all detected USB modules.  The operation tests each output by changing its state from low to high and vice-versa.  This feature is particularly useful in situations where you need a quick and easy method of determining the operational status of your hardware.  To perform the test, select the following from the menu:    Tools -> Test Outputs

                      Note that this test requires at least one configured output on the specified device.  If no outputs are found, select another device or re-configure the current device.  You may wish to use the "Config. I/O.." button to configure one or more outputs.
                       
                    6. Importing

                    7. At some time you may find it necessary to import a data file ("digio.dat") from an outside source.  Importing allows you to retrieve a new configuration or to replace an outdated or corrupted data file.  To use this feature, select from the menu:    Tools -> Import...

                      Before you can perform an import, you must be supplied an import file, titled "digio.dat".  Use the "..." button to navigate to the folder containing the import file.  (Note:  If the import file is compressed and contained in an archive (e.g., .zip, .rar, .etc), it must be uncompressed and extracted to a suitable location on your computer's disk drive.)  Once you have located the import file., click the "Import" button to retrieve the new file.
                       
                  1. USB I/O Modules
                    1.  
                    The USB I/O Module provides the interface between external hardware and your PC.  Made by USBmicro (www.USBmicro.com), these modules provide 16 signals, configurable in any combination of inputs and outputs.  U401 and U421 devices are functionally identical and only differ in physical board size. 

                    The U451 is functionally similar to U401 and U421 devices except that it provides two onboard relays for direct control.  Relays are controlled using signals PB0 and PB1 which are dedicated exclusively for this purpose and are not available for general purpose I/O.  To activate a relay, set the corresponding signal HIGH.The following tables present pinout information:
                      
                  U401 Interface Connector Pin Out
                   
                  Pin NumberUSB Interface Signal
                  7+5V USB from PC
                  9GND
                  15PA.0 - Port A bit 0
                  16PA.1 - Port A bit 1
                  17PA.2 - Port A bit 2
                  18PA.3 - Port A bit 3
                  19PA.4 - Port A bit 4   [SPI SS (slave-mode only)]
                  20PA.5 - Port A bit 5   [SPI MOSI]
                  21PA.6 - Port A bit 6   [SPI MISO]
                  22PA.7 - Port A bit 7   [SPI SCLK]
                  23PB.0 - Port B bit 0
                  24PB.1 - Port B bit 1
                  25PB.2 - Port B bit 2
                  26PB.3 - Port B bit 3
                  27PB.4 - Port B bit 4
                  28PB.5 - Port B bit 5
                  29PB.6 - Port B bit 6
                  30PB.7 - Port B bit 7


                  U421 Interface Connector Pin Out
                   
                  Pin NumberUSB Interface Signal
                  14+5V USB from PC
                  9GND
                  1PA.0 - Port A bit 0
                  2PA.1 - Port A bit 1
                  3PA.2 - Port A bit 2
                  4PA.3 - Port A bit 3
                  24PA.4 - Port A bit 4   [SPI SS (slave-mode only)]
                  23PA.5 - Port A bit 5   [SPI MOSI]
                  22PA.6 - Port A bit 6   [SPI MISO]
                  21PA.7 - Port A bit 7   [SPI SCLK]
                  5PB.0 - Port B bit 0
                  20PB.1 - Port B bit 1
                  6PB.2 - Port B bit 2
                  19PB.3 - Port B bit 3
                  7PB.4 - Port B bit 4
                  18PB.5 - Port B bit 5
                  8PB.6 - Port B bit 6
                  17PB.7 - Port B bit 7

                  U451 Interface Connector Pin Out
                   
                  Pin NumberUSB Interface Signal
                  J1-10+5V USB from PC
                  J1-9GND
                  J1-1PA.0 - Port A bit 0
                  J1-2PA.1 - Port A bit 1
                  J1-3PA.2 - Port A bit 2
                  J1-4PA.3 - Port A bit 3
                  J1-5PA.4 - Port A bit 4   [SPI SS (slave-mode only)]
                  J1-6PA.5 - Port A bit 5   [SPI MOSI]
                  J1-7PA.6 - Port A bit 6   [SPI MISO]
                  J1-8PA.7 - Port A bit 7   [SPI SCLK]
                  n/aPB.0 - Port B bit 0   [Relay 1]
                  n/aPB.1 - Port B bit 1   [Relay 2]
                  J4-1PB.2 - Port B bit 2
                  J4-2PB.3 - Port B bit 3
                  J4-3PB.4 - Port B bit 4
                  J4-4PB.5 - Port B bit 5
                  J4-5PB.6 - Port B bit 6
                  J4-6PB.7 - Port B bit 7


                  1. Legal
                    1.  
                    By purchasing this product, you agree to terms of licensing and warranty.  Please read the following sections carefully.
                  1. License

                  2. Kadtronix, Inc. grants the registered user of the USB Digital I/O Commander, herein referred to as "the application",  the right to use one copy of the application software on a single computer. The user may not use the application on more than one computer at the same time unless expressly intended for this purpose (such as network applications).  The application may NOT be distributed without our express written permission.
                     
                  3. Warranty

                  4. KADTRONIX, INC. DISCLAIMS ALL WARRANTIES RELATING TO THIS PRODUCT, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. NEITHER KADTRONIX, INC. NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS PRODUCT SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE SUCH PRODUCT EVEN IF KADTRONIX, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO EVENT SHALL KADTRONIX' LIABILITY FOR ANY SUCH DAMAGES EVER EXCEED THE PRICE PAID FOR THE PRODUCT, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON USING THE PRODUCT BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE PRODUCT.

                  USB motion detector,






                   
                   

                  Tutorial Instruction


                  Version 1.12
                  06/16/09
                  Copyright (C) 2005 - 2009
                  All rights reserved
                   
                   
                   
                   

                  Kadtronix / Delahoussaye Consulting
                  web: www.kadtronix.com
                  email: info@kadtronix.com



                  Table of Contents

                  1. Introduction

                  2.  
                  3. Wiring and Hookup

                  4.  
                  5. Start Digio Software

                  6.  
                  7. Adjust System Properties

                  8.  
                  9. Configure I/O Signals

                  10.  
                  11. Define Events

                  12.  
                  13. Test

                  14.  
                  15. Appendix I:  USB I/O Module

                  16.  
                  17. Appendix II:  Virtual LED Panels
                    1.  
                  18. Appendix III:  Legal

                  19.  



                   
                  1. Introduction
                    1.  
                    The purpose of this tutorial is to provide hands-on instruction for using the USB Digital I/O Commander software.  This powerful tool can be configured for any number of applications including process control, robotics, automation, etc.  The intent of this tutorial is to provide instruction on how to configure the software and tailor it to suit your specific application.  It describes a real-world example, namely, a USB security system, featuring Kadtronix USB Motion Detector.

                  USB Motion Detector Kadtronix USB Motion Detector 
                    The USB Digital I/O Commander, herein referred to as simply "Digio", provides a powerful means of interfacing your computer to external devices via digial I/O signals.  Compatible with desktop and laptop systems, Digio allows a Windows PC to set digital outputs and/or read digital inputs.   You can use Digio as a means of controlling external devices.
                    While Digio can perform simple "set" and "get" operations, its real strength lies is its ability to define notification action(s) when input signals, also referred to as "trigger signals", change state.  You'll find Digio an important tool for use in a variety of applications including industrial control, hardware design, and prototyping.
                    Digio is compatible with the USB Motion Detector which is comprised of an infrared detector and internal USB I/O module (U4x1).  The USB I/O module has integrated cable which connects to an available USB port on your computer.  The module provides 16 I/O signals configurable in any combination of inputs and outputs.  The system is easily expanded by simply adding more USB modules.
                    Becoming familiar with a new tool can sometimes be a daunting task.  Many times a real-world example provides the insight needed to gain confidence and understanding.    This tutorial describes how to use Digio to configure a real-world USB security system consisting of PIR motion sensor, 10 door/window sensors, horn/siren relay, and USB interface (U4x1). (For details on purchasing a USB motion detector plus Digio software, refer to the USB Motion Detector page at the Kadtronix website.)   For details on Digio software including system requirements,  installation, and descriptions, you can view the Digio User Manual online.

                       
                  1. Wiring and Hookup
                  2.  
                    The following diagram shows the USB security schematic including motion detector, door/window sensors, and U4x1 interface.  Also included is a reed relay for horn/siren activation.   (Note: For proper operation, be sure to enable internal U4x1 pull-up resistors using Digio software.)
                     
                     
                    The following image shows how to wire a standard PIR motion detector.  An external source is required for powering the detector.  (Note:  The Kadtronix USB Motion Detector is pre-wired and requires no external power source as it derives its power directly from the USB cable.  No additional wiring or assembly is required.)

                  3. Start Digio Software
                    1.  
                    Before beginning, you should plug your U4x1 device into an available USB port on your computer.  If all ports are occupied, you should obtain a USB hub which will expand the number of available ports.  Now, activate the Digio program by selecting:
                     
                      Start Menu -> Programs -> USB Digital I/O Commander for LAN

                    When the program begins, the main display dialog appears as shown below:



                    On first-time start-up, you will be asked to register your software.  Fill in the requested fields and click "Send" to submit your registration data.

                    Your software may require a license key for activation.  If so, a key will be provided to you via e-mail after purchase.  The license key is an encoded string consisting of a series of alpha-numeric characters.  When you receive the license key, select the following main menu item:

                      Tools -> Enter License Key...

                    Enter the encoded key string in the "Enter key:" field as shown in the example below.  Then, click "OK" to accept the new key and enable the application.
                       
                       
                  4. Adjust System Properties
                    1.  
                    For proper operation of  the security system application, you will need to make some settings adjustments within the properties page.  To open the properties page, make the following menu selection:
                     
                      Tools -> Properties

                    Make the settings adjustments as shown below:


                      Of particular importance are the notification delay settings shown below.  Be sure to activate the "No Re-Trigger" check-box.   This will ensure that alarms do not re-trigger falsely.


                      If you plan to use the automatic e-mail feature, you must configure e-mail properties.  Click the E-mail "Properties" button located at the bottom left section of the page.  The following dialog image will be shown:
                       
                      The following parameters are required for email notifications:

                      1. Your email address (e.g., jimmy@att.net)
                      2. Outgoing (SMTP) mail server (e.g., mailhost.worldnet.att.net)

                      The program is compatible with systems where e-mail is implemented on networked servers.  In this instance, simply enter the server name in the "Outgoing Mail Server" field.
                      Specify the following parameters only if SMTP authentication is required:

                      1. SMTP user name
                      2. SMTP password
                       
                      Click the "OK" button to save your e-mail settings and return to the global properties page.  The bottom ritght section of the page provides a field for supplying a network port number.  This value is needed to allow remote machines to connect to your computer for monitoring purposes.  (This field is required only if you have purchased the multi-user LAN product.)

                      Now that you have completed the properties settings, close the dialog by clicking "OK".
                       
                       
                  5. Configure I/O Signals
                    1.  
                    It's time to configure your I/O signals.  This step is required for defining which of the U4x1 signals are inputs and which are outputs.  There are 16 total signals provided by the U4x1, each individually configurable.  Your USB security system will use 12 signals in all: 1 output plus 11 inputs.   To configure the device, make the following menu selection:
                     
                      Tools -> I/O Control...

                    Use the "Device" combo-box to select the device as shown.  Digio can accommodate multiple U4x1 devices, but our security system application uses only 1 device and it will be designated  DEV_00.  Additional USB devices would be designated DEV_01, DEV_02, etc.  You should establish directions (input/output), states (high/low), and label descriptions as shown.  (Note:  It is not necessary to set the high/low state on inputs since they will be determined by the software automatically.)
                    Also enter default notification delay values as shown. Notification delays are used to prevent an overload of notifications on very active inputs.   The "Default" column defines the beginning countdown value when a trigger event occurs.   For instance, a value of 30 indicates that a minimum delay of 30 seconds is required between successive alarm trigger notifications.


                      An important setting to note is the check-box located in the upper left region of the dialog.
                      Use this check-box to enable internal pull-up resistors within the U4x1.  This setting is required for proper operation of the USB security system.  It ensures that when the motion detector senses activity, a logic high signal will be received at the U4x1 device.
                      After completing the fields, click "OK" to save your selections, exit the dialog, and return to the main display.  It should now contain a summary of your recent settings changes as shown below:

                  6. Define Events
                    1.  
                    Now that you have configured the inputs and outputs, you can create events and attach them to your signals.  These event associations define alarm ("trigger") conditions and the action(s) to perform.  You can also think of these actions as notifications.  To define notifications, select the following menu item:
                     
                      Tools -> Attach Events...

                      You will notice that most of the fields have been grayed (disabled).  This is because the selected signal ("00") is configured as an output for horn/siren activation.  Since events are defined for inputs only, you will bypass this signal and go to signal "01" instead.  To do this, left-click the mouse on the "Signal" combo-box and select "01" as shown below:

                      The following display will be shown whose contents represent the PIR motion detector:

                      First, ensure that the defined bit length is "1" as shown in the image below:

                      Next, locate the region titled "Single-Bit Trigger" and select "HIGH" as shown below.  This assumes the normal pre-trigger state is LOW and that detected motion will cause the signal to become HIGH.

                      Since you will not be using SPI triggers or Time/Day triggers, you should keep them disabled.  It's now time to define some notifications.  Remember that these are the actions to take when the PIR motion detector "triggers", i.e., detects movement.  There are 8 possible notification types. You will define four actions to perform:  display a message on the monitor, send an e-mail message, set a signal output, and play a sound file.  Left-click each check-box to enable the four events as shown below:

                      You will notice two rows of buttons to the right labelled "Select..." and "Preview".  Use the select buttons to define events and the preview buttons to test them.

                      Now, left-click the first (upper) "Select..." button associated with the "Display Msg" selection.   Enter the message text, "Motion detected in front lobby" as shown.  This text message will be displayed on your computer's monitor when the event occurs.  Use "Auto" to automatically extinguish the message after the specified number of seconds.  Click "OK" to save the selections, close the dialog, and return to the previous page.

                      Left-click the "Select..." button associated with the "Send E-mail" selection.  This allows you to designate an e-mail message to occur in response to an event.  Choose the desired e-mail recipient(s), message subject, and body.  If you have not already dones so, be sure to specify e-mail properties using the "Properties..." button.  Click "Send" to send a test e-mail message.  Click "Close..." to save the selections, close the dialog, and return to the previous page.

                      Next, left-click the"Select..." button associated with the "Set Output" selection.   This will allow you to activate the horn/siren relay in response to detected motion.  Make the selections as shown, being sure to choose output signal "00".  Also check the "Enable Toggle" box and specify a time delay.  This will cause the siren to automatically de-activate after the defined time period.  Click "OK." to save the selections, close the dialog, and return to the previous page.

                      Now, left-click the "Select..." button associated with the "Play Wav" selection.   A file browser dialog will appear, allowing you to choose the desired sound file.  This file will be played when the alarm event occurs.  Click "Open" to save the selection, close the dialog, and return to the previous page.  Use the "Preview" button to play the selected sound file.

                      Now that you have defined the four alarm notifications for signal "01", your events page should resemble the following:

                      Next, define event associations for the remaining inputs:  02 through 11.  Follow the same procedures as described above, beginning with input signal selection as shown below:
                         

                      Since signal 02 corresponds to the "Front Entrance", you should define messages that appropriately describe this input.  You have the flexibility to define any subset of the 8 available notification types.  If you choose to remove or disable a notification, simply left-click the box to remove its check-mark.
                       
                  7. Test
                    1.  
                    You're now ready to perform a test.  Before starting, close the Digio application, being careful to save your program settings.  Next, plug the U4x1 device into an available USB port on your computer.  Apply power to the motion detector and then start the Digio software once again.  You should see a status message near the bottom left segment of the Digio display that reads, "1 U4x1 device(s)!", indicating the U401 was found.There is a small red indicator light on the front of the detector unit that illuminates when movement is detected.  While viewing your computer's monitor, walk in front of the detector or have an assistant do so.  You should notice a pop-up message on your monitor as shown below:

                    If you configured this message as suggested earlier in the tutorial, it will be shown for several seconds and then automatically extinguish.  If you have designated audio (.wav sound) and/or e-mail notifications, make sure they also trigger.  If they do not, check the Digio configuration to determine if they are properly defined and enabled.  Test the horn/siren relay with a multi-meter.  Attach leads to the unsoldered contact connections and check for continuity.   The relay will be activated for 20 seconds before de-activating automatically.
                       
                  8. Appendix I:  USB I/O Module
                    1.  
                    The USB I/O Module provides the interface between your external hardware and the PC.  Made by USBmicro, this module is available in two form-factors and provides 16 signal lines, configurable in any combination of inputs and outputs.The following tables present pin-out information:
                       
                    U401 Interface Connector Pin Out
                    Pin NumberUSB Interface Signal
                    7+5V USB from PC
                    9GND
                    15PA.0 - Port A bit 0
                    16PA.1 - Port A bit 1
                    17PA.2 - Port A bit 2
                    18PA.3 - Port A bit 3
                    19PA.4 - Port A bit 4   [SPI SS (slave-mode only)]
                    20PA.5 - Port A bit 5   [SPI MOSI]
                    21PA.6 - Port A bit 6   [SPI MISO]
                    22PA.7 - Port A bit 7   [SPI SCLK]
                    23PB.0 - Port B bit 0
                    24PB.1 - Port B bit 1
                    25PB.2 - Port B bit 2
                    26PB.3 - Port B bit 3
                    27PB.4 - Port B bit 4
                    28PB.5 - Port B bit 5
                    29PB.6 - Port B bit 6
                    30PB.7 - Port B bit 7

                     
                    U421 Interface Connector Pin Out
                    Pin NumberUSB Interface Signal
                    14+5V USB from PC
                    9GND
                    1PA.0 - Port A bit 0
                    2PA.1 - Port A bit 1
                    3PA.2 - Port A bit 2
                    4PA.3 - Port A bit 3
                    24PA.4 - Port A bit 4   [SPI SS (slave-mode only)]
                    23PA.5 - Port A bit 5   [SPI MOSI]
                    22PA.6 - Port A bit 6   [SPI MISO]
                    21PA.7 - Port A bit 7   [SPI SCLK]
                    5PB.0 - Port B bit 0
                    20PB.1 - Port B bit 1
                    6PB.2 - Port B bit 2
                    19PB.3 - Port B bit 3
                    7PB.4 - Port B bit 4
                    18PB.5 - Port B bit 5
                    8PB.6 - Port B bit 6
                    17PB.7 - Port B bit 7
                       
                       
                  1. Appendix II:  Virtual LED Panels
                    1.  
                    Virtual LED panels provide easy viewing of digital input and output signal states in a color-coded display.  A single panel of 16 LEDs exists for each active device.  To view the panel(s), click the LED check-box in the upper right section of the main display:  To extinguish the panels, click again to clear the check-box.  All panel(s) will be removed.
                     
                    There will be one panel for each active USB device that has been plugged into your PC and recognized by Digio. The following picture shows a typical LED panel:
                         
                  1. Appendix III:  Legal
                    KADTRONIX, INC. DISCLAIMS ALL WARRANTIES RELATING TO THIS PRODUCT, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. NEITHER KADTRONIX, INC. NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS PRODUCT SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE SUCH PRODUCT EVEN IF KADTRONIX, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO EVENT SHALL KADTRONIX, INC.'S LIABILITY FOR ANY SUCH DAMAGES EVER EXCEED THE PRICE PAID FOR THE PRODUCT, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON USING THE PRODUCT BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE PRODUCT.