UltimaSerial Digital and SMS/Email-enabled Alarm Output

Windaq add-ons

 

WinDaq Add-on ID

7036

Menu Name Appeared under WinDaq->View->Add-ons

Digital and Alarm Output

Configuration file

C:\Windows\ultimaalarm.ini

Digital and SMS/Email-enabled Alarm Output

Digital and SMS/Email-enabled Alarm Output provides manual and auto-closed-loop control for WinDaq system, as well as Audio, SMS or Email alert when alarm is triggered

Please configure the corresponding DIOs on DI-71x to outputs if you wish to use the digital outputs with DI-71x (Latest Windaq and DATAQ activex installation is required)

  • Real Applications

    1. Robinson Helicopter company needs to conduct a rotor blade fatigue test, the normal signal is something like a sine waveform swing between 100 and 300 (real number is not used here to protect their IP), when the blade begins to show fatigue, the sine waveform will swing around a lower base line, say between 98 and 260, and at this point, the test must be stopped to prevent damage. To do that, they decide to monitor the mean value of the waveform over several cycles to determine when the test should be ended. First they establish the minimum acceptable level of the mean value using Magic Meter, which will be 200 if we use the numbers above, then equation (#min0+#max0)<0.95*200 is used to set the digital output to high, which in turn will trigger the switch to shut down the fatigue test.


         

    2. SMS/Emal alert system: The manager in charged of EOC production line needs to be informed when the temperature of his machine gets too high, but he can't stay around the line all the time, and all he has was a old flip phone. "Can your addon send me text when such alarm happens?" he contacted us. "No problem!", with Digital and Alarm Output, running along with WinDaq and his DI-718, the problem is solved!

  • Features

  • Actions
    • Push the button D0...D7 to access the logical equation for the corresponding digital output.

      • D0 and D1 on DI-148/158/71x will be used by WinDaq as inputs only, thus they are not available

    • Push the button   to access the logical equation for the SMS/Email alert.

    • Push the button to access the logical equation for the audio alert

    • Push the button under to configure the sound file and alert time interval

    • Push the button under  to configure email alarms

      • The first parameter is the keep alive interval (in minutes) for SMS/Email periodical reporting. Enter 0 to disable this feature

      • The second parameter is the hold-off time (in seconds) for the next alarm email once an alarm is triggered. Enter 0 to disable the hold-off feature.

    • Slides has three states. It controls the state of a corresponding output.

      • TRUE: assign TRUE unconditionally

      • FALSE: assign FALSE state unconditionally

      • PROG: Set the output to TRUE if the logical equation for the corresponding channel renders TRUE

      • Note

        • For digital outputs, majority of the devices' digital output is high TRUE, meaning the output is above 2.4V. One exception: DI-149/155's digital output is low TRUE, meaning it is below 0.8V, but its input is still high TRUE

        • For Audio alert, TRUE plays the sound file. FALSE stops the sound file

        • For SMS/Email alert, TRUE generate periodical report if report interval is greater than 0. FALSE stops any SMS/Email alert.

    • Keyboard operations

      • Key 1,2,3,4,5,6,7,8,9 to set D0,1,2,3,4,5,6,7 and Alarm to PROG

      • Key Q,W,E,R,T,Y,U,I,O to set D0,1,2,3,4,5,6,7 and Alarm  to TRUE

      • Key A,S,D,F,G,H,J,K,L to set D0,1,2,3,4,5,6,7 and Alarm  to FALSE

    • Global Key option, when enabled, one can force DOs to TRUE or FALSE even when DigitalOutput II is not in focus

      • Hold down Alt and Ctrl keys, then press Q, W, E, R, T, Y, U or I  to set D0,1,2,3,4,5,6 or 7 to TRUE. The key assignments are by default. See below for modificatin

      • Hold down Alt and Ctrl keys, then press A, S, D, F, G, H, J or K to set D0,1,2,3,4,5,6 or 7  to FALSE. The key assignments are by default. See below for modificatin

      • The global keys stored in c:\windows\ultimaalarm.ini can be reprogrammed

        1. Open c:\windows\ultimaalarm.ini and you will see multiple sections for different WinDaq configurations

        2. Under the section matching the device, you will see something like this
          DoutTrueKey0=81
          DoutFalseKey0=65
          DoutTrueKey1=87
          DoutFalseKey1=83
          DoutTrueKey2=69
          DoutFalseKey2=68
          DoutTrueKey3=82
          DoutFalseKey3=70
          DoutTrueKey4=84
          DoutFalseKey4=71
          DoutTrueKey5=89
          DoutFalseKey5=72
          DoutTrueKey6=85
          DoutFalseKey6=74
          DoutTrueKey7=73
          DoutFalseKey7=75
          HKey0=17
          HKey1=18

        3. The numbers are Microsoft Virtual Key codes. The HKey0 and HKey1 are the two hot keys to mark the commands, which are Ctrl and Shift by default.

        4. You can use change it to avoid conflict with other Windows application or add a new sets of command different Devices

        5. For example, if you have two 720s, assign 17  to HKey0 and HKey1  for the first WinDaq device, and 18 to HKey0 and HKey1 for the second WinDaq device. Thus, instead of using Alt+Ctrl, one can use Ctrl+QWERTYUI to set the digital output to high on device one, and Alt+QWERTYUI to set the digital output to high on device two..

  • Math Expression

    • Must read: The mystery of channel index!

    • Support various combination of alarms resulted from math expressions based on readings from any enabled WinDaq channel (see above image)

    • True math expression with many predefined operators and functions

    • Operators include: +, -, *, /, ^, %, &, |, !, >, >=, <, <=, !=, ==

    • Functions include: abs, floor, hex, round, if, avg, bin, log, sqrt, ceil, log10, sum, max, min, acos, asin, atan, sin, sinh, cos, tan, cosh, tanh

    • To use the reading from a channel, use #. For example, #0 is the reading from the first enabled channel in WinDaq

    • Support non-English (United States) Regional and Language options. 

  • Advanced Math

    • To use the data-window derived results, use #min, #max, #ave, #rms and #acrms to represent Min/Max/Ave/RMS/ACRMS in the expression, i.e, #acrms0 take the AC_RMS of channel 0.

    • The length of data window should be selected properly, especially in RMS or ACRMS mode, or wrong result may be generated. Hint, it should be multiple full cycles

  • Digital Input

    • To access individual digital input, use #dig0 to dig7 to access bit 0...7. Note, digital input must be enabled in WinDaq's channel list. For example #dig1>0

    • To access all digital inputs, use #digx0. Note, digital input must be enabled in Windaq's channel list.

      • According WinDaq convention, the digital input range is from -128 to +127

      • For example #digx0==11

  • Audio Alert

    • Allows selection of sound file (.wav)

    • Keep Alive email for periodical monitoring

  • SMS and Email Alert

    • Sends out email automatically when alarm is triggered

    • Periodical (Keep Alive) email 

      • Keep Alive email will be sent out periodically to let the user know that WinDaq is still running

      • Keep Alive email's interval is stored in c:\windows\ultimaalarm.ini, under the key of EmailAlarmInterval. The default interval is 20 seconds, to remove Keep Alive, please change this number to 0.

      • If the WinDaq add-on user has no admin privilege, the above change may not take effect, in that case, you may download www.ultimaserial.com/download/digitaloutputii.exe and replace the file with the same name under the directory where WinDaq addons are installed to (default: c:\wdqfft)

    • Allow modification of alarm re-arm interval (in minutes)

    • Three options

      1. TRUE: Only periodical SMS/Email output if it is enabled

      2. PROG: Alarm-triggered SMS/Email output, and periodical SMS/Email output if it is enabled

      3. FALSE: No SMS/Email output

    • Push the button under  to configure email alarms

      • The first parameter is the keep alive interval (in minutes) for SMS/Email periodical reporting. Enter 0 to disable this feature

      • The second parameter is the hold-off time (in seconds) for the next alarm email once an alarm is triggered. Enter 0 to disable the hold-off feature.

  • Other Features

    • All settings are retainable 

  • Special Notes

    • Channel number is a 0-based index to Windaq's scanlist. For example, if Windaq has channel 3,4,6,7 enabled, one can enter 0 for channel 3, 1 for channel 4, 2 for channel 6 and 3 for channel 7. 

    • Please configure the corresponding DIOs on DI-71x to outputs if you wish to use the digital outputs with DI-71x (Latest Windaq and DATAQ activex installation is required)

    • Due to the limitations of the hardware, when using with 720/730 USBs, please make sure Windaq's maximum sample rate doesn't exceed 100K, and the sample rate is less than 50K

    • DI-720 P/EN can have more than 8 digital inputs/outputs under certain non-standard configuration. We don't support them in this standard add-on. .

  • Notes
       
    • Not every data point is tested against the trigger condition. The add-on is paced by Windows' timer, up to 50Hz.
        
  • Example:

Requirement

  • WinDaq has five channels enabled, Channel 1, Channel 3, Channel 4, Channel 6 and Channel 19

  • Three alarms are needed:

    • Digital Output 0 needs to be at high (TTL level) when Channel 1 is greater than 3.0 and Channel 19 is less than 2.1, low if the condition is not met

    • Digital Output 1 needs to be at low (TTL level) when the sum of Channel 3 and Channel 4 is greater than 19.9, high if the condition is not met

    • Digital Output 2 needs to be at low  (TTL level) when the Digital input bit 0 is low and the RMS of Channel 3 is greater than 2, high if the condition is not met

    • Note: In the above statement regarding TTL level, we assume a high TRUE output device is what we are dealing with. DI-149's digital output is low TRUE but input is still high TRUE

Implementation

  • We assume high TRUE device is what we are dealing with. (DI-149/155's digital output is low TRUE but input is still high TRUE)

  • Three equations will be used on D0,  D1 and D2 (Digital Output 0, 1 and 2)

    • D0 : #0>3.0 & #4<2.1

      • Since channel number used in the math expression is a 0-based index to Windaq's scanlist, Channel 1 becomes #0 and Channel 19 becomes #4

      • & is the logical operator AND

      • Set is the same as forcing the output HIGH for high TRUE device (DI-149's digital output is low TRUE but input is still high TRUE)

    • D1:  (#1+#2)<19.9

      • Since channel number used in the math expression is a 0-based index to Windaq's scanlist, Channel 3 becomes #1 and Channel 4 becomes #2

      • Note: we revert the condition so that we can output a low when (#1+#2)>19.9 

    • D2: !((#dig0==0) & (#rms1>2))

      • Since channel number used in the math expression is a 0-based index to Windaq's scanlist, Channel 3 becomes #1 

      • Note: we place a NOT operator in front of the condition so that low can be output when the condition is met 

 

Last update: 08/07/14

www.UltimaSerial.com