How to create a type of 'alarm event' based on acquired sensor data and system time?

Hello all,
I'm fairly new to LabVIEW and have successfully created a VI that reads voltage data from sensors.  Each sensor outputs 2 voltage values and I treat these values as 2 different DBL values.  I'd like to be able to record each voltage value as a base and then compare the subsequent data readings with that base.  Once the base is determined, I'd like a sort of 'variable' set as "TIME" to be recorded at the moment the base voltage is recorded.
The alarm should occur (or anything Boolean set to TRUE I guess) once the continuously read voltage remains within certain limits for about 2 hours.  I know I can compare the system time w/ the "TIME" that the voltage base value was recorded.  If the voltage readings escape those limits, I'd like the voltage base value reset and the TIME set to the corresponding system time again.
I apologize in advance if this I haven't' described my problem well, but if anyone could help me figure out the best way to create this code, I would appreciate it much!
Thanks!
Solved!
Go to Solution.

ill try to illustrate a couple scenarios:
keep in mind that i dont necessarily want the voltages in these specific ranges, but just a range of +/- 20 mV ... in an above post i refer to a "base" voltage reading, in this case that would be 200 mV for V1 and 400 mV for V2, just because the voltage has shifted to those values for an extended amount of time each (> 2 seconds)
Scenario 1
1:00 pm
Sensor readings
Voltage 1: 200 mV
Voltage 2: 400 mV
between 1:00 and 3:00 pm:
Voltage 1 does not deviate from 180-220 mV range
Voltage 2 does not deviate from 380-420 mV range
at 3:00pm I want an alert/alarm/Boolean to change to 'true'
Scenario 2
1:00 pm
Sensor readings
Voltage 1: 200 mV
Voltage 2: 400 mV
at 1:45 pm:
Voltage 1: 2 mV
Voltage 2: 600 mV
Since the voltage has shifted out of the range, i want the new base voltage to equal whatever it changed to out of the range, and also the time spent within the new range (2 +/- 20 mV and 600 +/- 20 mV, respectively for V1 and V2) would be reset, so a new 2-hour counter would begin

Similar Messages

  • How to create a type

    hi,
    can anybody tell me how to create a type where in we can execute a procedure, every time we call it.

    Hello,
    What is your exact product version ?
    Are you sure there is any relation woith the Oracle Forms product ?
    Francois

  • How to create SCD2 type manually in informatica?

    Please Can you describe with example how to create SCD2 type manually in infromatica?

    Hi Manoj,
    You should not delete the auto generated orchestration even do not modify it, as it is stated in msdn.
    The BizTalk WCF Service Consuming Wizard creates in your BizTalk project the BizTalk schemas and types necessary to consume WCF services. The BizTalk types such as port types and multipart message types are created in an orchestration. We recommend
    that you do not modify the orchestration that the wizard creates. Instead, you can add new orchestrations in the BizTalk project for your purposes.
    --------- MSDN
    For Refernce
    In your solution, if you are seperating your schemas project from orchestration project, in that case i personally advise to generate wcf endpoint in your schema project and after adding schema reference in orchestration
    project you manually create the multipart message and a request response port as it will not display in existing port.
    Regards

  • How to create Activity type

    How to create Activity type
    below are the details
    x sales MnF Expenses
    y FMS MnF Expenses

    dear sudhir
    KA01 - Create Primary Cost Element for the new activities type.
    KL01 - Create Activity Type tied to the primary cost element.
    regards
    rohit

  • How to create output type for GR,GI?

    Can any one explain,How to create output type for Goods Receipt,Goods Issue.?
    and How to take print out for both?

    Hi, jayant in standard u have output type for picking list, delivery doc complete, theres no output type seperately for PGI or PGR
    I am sure u need the help of tech guy to create the new output type for ur requirement
    regards
    giri

  • How to create a type table in designer 9i

    Hi
    In our company we use designer 9i. I want to create a type table using designer. Is it possible? I have a requirement where i need to create a type table and use in creating a view through designer.
    Create or replace type varchar2_ntt as table of varchar2(4000);
    [\pre]
    Please suggest.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi
    Here I am giving the step by step process.
    1. select the container in which container you are going to create the type.
    2.Go to tools then design editor and expand the container. There you will find oracle collection types. there we have to create a new one by clicking the + button on the left side.
    3. Give the name of the new collection type.
    4. And in the collection of tab, let it be scalar, give the scalar data type,and the size and click finish.
    5. then right click on that object and give generate. there you select theDDL files only and the give the path where the scripts have to go.
    This the process.
    Thanks,
    raju

  • How to create this type of Form?

    Hello ,
    I'm new to java so I would like a hint from experts on how to create such a form :
    A form that displays Customer's Codes and their name from Oracle database , so that they appear in the form as a list of 2 columns , what kind of compnents I should use to display this kind of data ? JTextField ? I dont think so .... . And also I would like to highlight each other line so that the list looks good , then at the top of the list I want a filter so that the data is filtered each time I enter a character . The last thing is how to make the data displayed have the ability to be dragged to another form in the application so that it fills the corresponding fields relative to the data dragged ?
    Too much ha? . Please just provide hints/ideas about each point as I know it can be time consuming to give details about all this.
    Thanks in advance...

    Thank you , I tried with this code to achieve what I wanted but I get no result .
    Can you please tell me whats wrong with this code ?
    package desktopapplication1;
    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    public class MainOMSWindow extends JPanel{
        public MainOMSWindow ()
            super(new GridLayout(1,0));
    JTable customerListTable = new JTable();
    customerListTable.setPreferredScrollableViewportSize(new Dimension(500, 70));
    customerListTable.setFillsViewportHeight(true);//to make the table uses the entire height of the container
        JScrollPane pane = new JScrollPane(customerListTable);
        add(pane);
        populateTable(customerListTable);
        private static Connection getConnection()
        Connection con = null;
         try
            String driverName = "oracle.jdbc.driver.OracleDriver";
            Class.forName(driverName);   //registering JDBC Driver
            String serverName = "localhost";
            String portNumber = "1521";
            String sid = "mydb";
            //jdbc:oracle:thin:@localhost:1521:ahmaddb
            String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
            String user = "fundinfo";
            String pw = "tadapps";
            con = DriverManager.getConnection(url, user, pw);
         catch (ClassNotFoundException e) {
                                        System.out.println(e.getMessage());
                                        System.out.println(e.getStackTrace());
                                        System.out.println(e.getCause());
                                        System.out.println(e.getException());
                                        System.exit(0);
         catch (SQLException e) {
                                  System.out.println(e.getMessage());
                                  System.exit(0);
        return con;
        private static ResultSet useConnAndGetData()
            Connection con = getConnection();
        try
             Statement stmt = con.createStatement();
             String select = "select title,year,price from movie order by year";
             ResultSet rows = stmt.executeQuery(select);
             return rows;
        catch(SQLException e) {
                 System.out.println(e.getMessage());
            return null;
        private static void populateTable(JTable table)
            try{
        ResultSet rs = useConnAndGetData();
        while(rs.next())
    public void setValueAt(object value, int row, int column)
    •Value: The new value to be placed in the cell
    •row: The row in the JTable to be changed
    •column: The column in the JTable to be changed
    * rows and columns start at the number "0", not "1".
    * Notice that the first column in a result set is column "1".
         int row = 0;
         table.setValueAt(rs.getString("title"),row,0);
         table.setValueAt(rs.getInt("year"),row,1);
         table.setValueAt(rs.getDouble("price"),row,2);
         row++;
            catch(SQLException e)
             System.out.println(e.getMessage());
            private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("OMS");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            MainOMSWindow newContentPane = new MainOMSWindow();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main (String [] args){
        createAndShowGUI();
    }The programe throws this :
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
            at java.util.Vector.elementAt(Vector.java:427)
            at javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:277)
            at javax.swing.JTable.convertColumnIndexToModel(JTable.java:2553)
            at javax.swing.JTable.setValueAt(JTable.java:2719)
            at desktopapplication1.MainOMSWindow.populateTable(MainOMSWindow.java:99)
            at desktopapplication1.MainOMSWindow.<init>(MainOMSWindow.java:24)
            at desktopapplication1.MainOMSWindow.createAndShowGUI(MainOMSWindow.java:119)
            at desktopapplication1.MainOMSWindow.main(MainOMSWindow.java:130)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)

  • How to create a window with its own window border other than the local system window border?

    How to create a window with its own window border other than the local system window border?
    For example, a border: a black line with a width 1 and then a transparent line with a width 5. Further inner, it is the content pane.
    In JavaSE, there seems to have the paintComponent() method for the JFrame to realize the effect.

    Not sure why your code is doing that. I usually use an ObjectProperty<Point2D> to hold the initial coordinates of the mouse press, and set it to null on a mouse release. That seems to avoid the dragging being confused by mouse interaction with other nodes.
    import javafx.application.Application;
    import javafx.application.Platform;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.collections.FXCollections;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Point2D;
    import javafx.geometry.Pos;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.StackPane;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import javafx.stage.Window;
    public class CustomBorderExample extends Application {
      @Override
      public void start(Stage primaryStage) {
      AnchorPane root = new AnchorPane();
      root.setStyle("-fx-border-color: black; -fx-border-width: 1px; ");
      enableDragging(root);
      StackPane mainContainer = new StackPane();
        AnchorPane.setTopAnchor(mainContainer, 5.0);
        AnchorPane.setLeftAnchor(mainContainer, 5.0);
        AnchorPane.setRightAnchor(mainContainer, 5.0);
        AnchorPane.setBottomAnchor(mainContainer, 5.0);
      mainContainer.setStyle("-fx-background-color: aliceblue;");
      root.getChildren().add(mainContainer);
      primaryStage.initStyle(StageStyle.TRANSPARENT);
      final ChoiceBox<String> choiceBox = new ChoiceBox<>(FXCollections.observableArrayList("Item 1", "Item 2", "Item 3"));
      final Button closeButton = new Button("Close");
      VBox vbox = new VBox(10);
      vbox.setAlignment(Pos.CENTER);
      vbox.getChildren().addAll(choiceBox, closeButton);
      mainContainer.getChildren().add(vbox);
        closeButton.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            Platform.exit();
      primaryStage.setScene(new Scene(root,  300, 200, Color.TRANSPARENT));
      primaryStage.show();
      private void enableDragging(final Node n) {
       final ObjectProperty<Point2D> mouseAnchor = new SimpleObjectProperty<>(null);
       n.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            mouseAnchor.set(new Point2D(event.getX(), event.getY()));
       n.addEventHandler(MouseEvent.MOUSE_RELEASED, new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            mouseAnchor.set(null);
       n.addEventHandler(MouseEvent.MOUSE_DRAGGED, new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            Point2D anchor = mouseAnchor.get();
            Scene scene = n.getScene();
            Window window = null ;
            if (scene != null) {
              window = scene.getWindow();
            if (anchor != null && window != null) {
              double deltaX = event.getX()-anchor.getX();
              double deltaY = event.getY()-anchor.getY();
              window.setX(window.getX()+deltaX);
              window.setY(window.getY()+deltaY);
      public static void main(String[] args) {
      launch(args);

  • How to create a vi that counts for example 3 - 10 pulses in and then give a 1 puls out

    how to create a vi that counts for example 3 - 10 pulses in and then give a 1 puls out.
    I'm working with Labview 6.1
    Running with Labview 6.1
    Fieldpoint hardware

    Hi,
    You should be more specific, what kind of hardware you are using ???
    Which kind of pulse you are measuring ?? You are saying that you want to count a number of pulses and then when you get to a limit (which will be between 3 and 10) you want to output a pulse ?
    Andre Oliveira

  • How to create a ABAP report off of SRM box for live data?

    How to create a ABAP report off of SRM box for live data?
    Thanks in advance.
    York.

    you can try infoset query:
    STEP - A:
    1. Go to T Code RSQ02 and give the InfoSet name & select CREATE.
    2. Provide the Name(Description) and Data Source i.e. for eg here i take "DIRECT READ OF TABLE" = /BIC/AODS100. Then CONTINUE.
    3. Select what to Include in the 3 options available with the POPUP, here "INCLUDE ALL TABLE FIELDS". Then Check the fields and click GENERATE(one RED and WHITE round icon).
    4. Now provide the PACKAGE for the INFOSET. Come Back(F3).
    STEP - B: optional(If u want to create a new user group)
    1. Select ENVIRONMENT -> USER GROUPS. Provide the User Group name and CREATE.
    2. Provide Description and SAVE.
    3. Provide PACKAGE and SAVE. Come Back (F3) to the Initial Screen.
    4. Click Role/User Group Assignment. Select Newly Created User Group or an existing one. Then SAVE (CTRL + S). F3.
    STEP - C:
    1. Select ENVIRONMENT -> Queries. Provide the query name and CREATE.
    2. Select the INFOSET u have created and assigned the user group.
    3. Provide the Title and Select BASIC LIST. There you have to select (check) the fields you want to display, SAVE and then TEST. It will ask for Variant, just CONTINUE.

  • How to create apple id for mac app store without using credit card and there is no any option for payment none. please tell how to download free apps from mac app store

    how to create apple id for mac app store without using credit card and there is no any option for payment none. please tell how to download free apps from mac app store

    my problem solve by me
    first create apple id
    fill credit card details
    and complete your account creating  process.
    than go to app store or itune store
    login your acount
    click right side  - account button
    than again login for account setting
    next go to payment information and click edit button
    when u enter payment infomation
    click none button in payment method and click done button.
    than ur credit card has been removed.
    but rs. 60 will deducted in your account when u doing this process.

  • HT4847 How can I change my iCloud email address without losing all my data and what not???? Please help...

    How can I change my iCloud email address without losing all my data and what not???? Please help...

    Welcome to the Apple Community.
    You can't change it but you can create an alias to use.

  • How do I have photos in iPhoto display on their face the date and time?

    How do I have photos in iPhoto display on their face the date and time? Displaying in the camera shows this. When I check edit the info is there. How do I have that displayed on the face of the photo when I view it in iPhoto?

    How do I have photos in iPhoto display on their face
    the date and time? Displaying in the camera shows
    this. When I check edit the info is there. How do I
    have that displayed on the face of the photo when I
    view it in iPhoto?
    Hi! My name is Tom from San Diego, CA. I have the exact same question as you. That is, I would like to be able to print out a photo from iphoto with the date that picture was taken displayed on the face of it. In this way, someone looking at that picture in a photo album years later would know when it was taken. Did you ever find a method to print copies of photos out of iphoto with the date displayed on the print? Thanks for your help!

  • Why is the folder strukture based on the import date, and not on the Creation date? How can i setting this?

    Why is the folder strukture based on the import date, and not on the Creation date? How can i setting this?

    What folder structure?
    If you're referring to how Aperture stores the originals in a managed library then the answer is you can't change it.
    If having the originals stored in a specific file structure is important to you you will need to switch to a referenced original setup.

  • HT1595 how do i access apple tv when screen is stuck at setting date and time

    how do i access apple tv when screen is stuck at setting date and time, have unplugged system,restarted router....

    Welcome to the Apple community.
    Assuming this is not the first time you have used your Apple TV
    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
    Also try restarting the router.
    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If this is a new Apple TV, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

Maybe you are looking for

  • How does recovery work after an online backup

    Hello, While trying to conceptually understand how backup and recovery works, I came accross a question concerning hot (online) backup. This is a conceptual question (I am trying to understand how things work), it is not a "how should I proceed/ what

  • Companion CDs for 64-bit Oracle HTTP Server for AIX5L(64 bit) required.

    I need Companion CDs for 64 bit Oracle HTTP Server for AIX5L(64 bit). I tried to install using as_ibm_aix_companion_101300_disk1.cpio & as_ibm_aix_companion_101300_disk2.cpio but when i checked the files present in <Oracle_Home>/ohs/lib , they are of

  • The absolute best case for the BB Playbook!!!

    Ok, I've tried several cases for my Playbook---even a $160 Vaja, the Rolls Royce of cases. Absolutely beautiful Austrailian leather...however it had no cut outs for camera or headphones, therefore worthless. Then I found the Blurex case on Amazon.com

  • Adobe Reader X Read Out Loud Problem

    I had the previous version of Adobe Reader, and it had a problem. About ten seconds after I opened it, it would pop-up a error window and crash. Naturally, I uninstalled and then installed Adobe Reader X, which looks great, but when I tell him to rea

  • Package Folder in Library

    I have about 500 MB of package files in the Packages Folder in the Library. None of them are newer than late 2007, can I delete these old packages? Were they placed their before (during) my leopard upgrade?