Measurement at a repeating Trigger

Greetings:
I have a test run that has a Trigger pulse. It repeats thousands of times depending on the test run.
I need to measure ( in my example) the “Velocity FDBK” Average and compare it to the “Velocity CMD” Average signal. I would like to be able to create a channel for the measurement results for each cycle that the pulse is active.
This is my attempt at the script, but I am having trouble with the looping.
I welcome any help ….please.
Thanks Spidey
Solved!
Go to Solution.
Attachments:
FatigueProfile CK R4_02-02-2015_15-22-02-039.7z ‏972 KB
Test Script_10c_SS.SUD ‏27 KB

Philipp:
Thank you for your interest in my problem. With the help of a fellow colleague we have solved my problem.
I was using a Astromed file (.DCR) . The looping was the signal measurements within the timing "Pulse".
Thanks  
Spidey

Similar Messages

  • What could repeatedly trigger iTunes - when I'm watching some online video - despite my repeatedly closing it?

    what could repeatedly trigger iTunes - when I'm watching some online video - despite my repeatedly closing it?
    I have iTunes 11.1.3 and Lion 10.7.5

    i Founfd this exact behaviour with 1080p mivies on my machine. I redownloaded as 720p and all was fine. I think my computer is getting a little dated.
    If this is true for you then Select Preferences, Store and When downloading High Definition videos, prefer and select 720p. Then red donload form the Purchased link under Quick Links in iTunes Store

  • Measuring points tab repeating the point no for different selection.

    I have selected one entry list and enter into points tab to see the corresponding measuring point .
    Then select one equipment which already in the entry lists tab for an ad hoc entry.  In this case ‘B-781-A-001’
    Now the points tab repeating the points no (below screen shot) which should not be the case it should be sync with the existing points . Even I select one point to take reading it’s only completing the selected one not the similar point in the points tab.
    Please suggest how to solve this data repetition problem.
    Tags edited by: Michael Appleby

    Hi Ranjoy,
    I have updated your tags with the correct information (you will get more responses now).  Please use the tags in the future.  In some communities with narrowly focused topics, they are not as important as they are in SAP for Mobile.  This community receives questions on SUP, SMP, Afaria, Agentry, HWC, MBO, Kapsel, Cordova, SAPUI5, and other technologies.  While I suspected that yours was an Agentry based application, it was not too unlikely that it could have been something else.
    Thanks, Mike (Moderator)
    SAP Customer Experience Group - CEG

  • I can't trigger my E series board with PFI0 because it's resolution is too low

    Hi All,
    I am using LabVIEW 7.0 and DAQmx to configure a 6062E-Daq Card. I am
    using the DAC output to apply small voltage steps (as low as 10 mV) to
    a test system. I want to trigger the acquistion of a separate voltage
    signal on an AI channel whenever these small voltage steps are applied.
    To do this, I have sent my DAC output to the PFI0 trigger channel and
    am acquiring my measured signal on AI1. My vi is essentially the
    Acq&Graph Voltage-Int Clk-HW Trig Restarts.vi only my DAQmx Start
    Trigger is changed from Analog Edge to Reference AnalogEdge so I can
    measure 200 pre-samples.
    The vi works beuatifully when my DAC output changes are quite large
    (say 100mV). If I go to smaller pulses then the trigger never fires. I
    understand that the PFI0 has lower input resolution (usually 4 bits
    lower than AI channles) so I think this is my problem.
    I understand that I can use an AI channel to act as my trigger channel
    but in this case, because I am using an E series board, I can only
    measure one channel (my trigger channel) and still have a Reference
    trigger. Is there a way to collect my data with pre-samples, using
    these small triggering steps ?
    Ian

    Hi Ian,
    I just came across this thread and I wrote an application (Utilizing a Software Circular Buffer for Data Acquisition - LV 7.1) awhile back to help do exactly what Laura was talking about, but without taking too much processor time.
    They key to everything is to store the most recent data in a software
    circular buffer.  It works pretty well even running an application
    for hours at a time because it will only retain the last N seconds
    worth of data and no arrays are being built so it keeps memory usage
    fairly low.  You can then look at the data within the circular
    buffer, determine some sort of condition and then view the last Y
    seconds worth of data on whatever row of data you want.
    It's slightly complicated, but with a little work you can get it to
    work for what you are trying to do.  This may help you find a
    solution between now and when you can get your M-Series board.
    Regards,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments
    Attachments:
    DAQmx-ReadFromCircularBuffer.llb ‏209 KB

  • NI 6602 measure quadrature encoder with two signal edge sepearation

    Is it possible to improve the position measurement for X4 encoders,
    that the measurement starts at start trigger and stops at the stop
    trigger signal like the normal two signal edge seperation measurments.
    Everything I tried don't works. Does anyone have an idea. Thank You
    for Your trouble.

    Hello Yong,
    You have no wait time within your for loop.  This means that the loop will execute as fast as possible, but not at a constant rate.  To acheive a more constane rate, try inserting a Wait Time of 1 ms.  This will get you a loop with a 1 kHz rate.
    How fast is your PWM Signal?  It may be that you are missing some two edge measurements while waiting for the loop to iterate.
    I suggest merging your error clusters out of the DAQmx Read.vis.  Right now, you are just clearing out any errors.  Let me know if you start returning any errors once you have done this.
    Regards,
    Sean C.

  • How to measure time delayed measurement

    Hi All:
    I am using TDS3064 scope to measure time delay betwwen two channels (using IVI driver
    complience package 2.2 for scope IVI driver). I look through drivers, but not able to find
    delayed measurement function. Is there any alternate way to measure time delay betwwen two
    channels. If possible please provide me example. I am new to LV programming.
    Thanks
    DBhagat

    You have to understand something about IVI class drivers. To support portability, those functions that are common to a class are what you see in the driver. Some scopes might have the ability to measure time delay between trigger points on different waveforms but many don't. If there is such a function supported by your scope, then you can make a call to the instrument specific driver or a VISA Write/Read. Of course, you then loose the portability feature of IVI which, imho, is about the only reason to use IVI class drivers. What I would recomend is that you do a capture of both traces and then do an analysis of the raw data in LabVIEW. One way to do this is with Trigger Detection for 1 Channel (Analyze>Waveform Monitoring palette). Wire each channels data to the function and obtain the time for each trigger event. The function will return the time for each event that you can use to calculate the difference.

  • Attaching measurement point in task lists

    Hi experts
    Here we decided to go to measurment points (by valuation codes) rather than tassk lists for prev. maint. As like task list each speific measurment point has to trigger in order based on frequency required. Just user capture the valuation codes at measurment docs. then we cud see the results at IK17.
    But iam not finding the way to do , linking the task lists by prev. orders. can you suggest us

    Hi,
      If you are on ECC 6.0 with EHP4, Measurement points can actually be associated to operations as a PRT on task list or directly on the order. This functionality(Inspection rounds)  has been provided as part of Enterprise asset management continuous improvement under Enterprise Business function set. The measurement points are automatically proposed during the completion confirmation of the relevant operation.
    http://wbhelp.sap.com/ERP2005_EHP_04/helpdata/EN/48/689d3dd2613c87e10000000a42189c/frameset.htm
       if you are not at this level or not plan on getting there in the near future a custom or manual solution is your only option.
    Hope this helps.
    Narasimhan

  • Pwm measurment

    How can i measure a duty cycle & frequency of a PWM Signal with a 6014PCI usinf traditional  NI-Daq functions.
    I need to measure the pulse and the pause to calculate the PWM in percent.

    What you'll need to set up is called "semi-period measurement" and you may need it to be a buffered measurement.
    However, the last I knew, this was a little quirky under trad NI-DAQ with DAQ-STC counters.  Specifically, there was no way of specifying or knowing whether the measurement started with a high time or a low time.  So when a real signal has a duty cycle of 25%, your program had no way of knowing whether it's measuring 25% or 75%.  Sometimes you may have special knowledge of your PWM signal that will help you know which is more sensible, but other times you're just plain stuck.
    Frequency is easy enough though -- just take the reciprocal of the sum of two adjacent semi-periods.  Any two adjacent semi-periods sum to 1 whole period, and the reciprocal of that is frequency.
    DAQmx provides some additional capabilities (including triggering) that *may* help.  I vaguely recall a thread here that suggested a DAQmx bug in a particular version that would have caused a similar ambiguity -- ah yes, here it is.   It references a different type of counter, so I'm not sure if the workaround applies to your board.
    I haven't used DAQmx much for DAQ-STC counters -- I've mainly been using the 6602 and an M-series board which use different timing chips that sometimes work a bit differently than the DAQ-STC.  Nevertheless, here's a basic concept thay might also work.  As far as I know, this approach also requires DAQmx because trad NI-DAQ doesn't support triggering on DAQ-STC counters.
    You would need to configure 2 counters to be triggered by the same signal (to guarantee simultaneous start), both measuring your PWM signal.  However, one would do buffered semi-period measurement (where polarity might be ambiguous) while the other does buffered period measurement (where polarity won't be ambiguous).  If your period measurement is set to measure rising edges, then you'll be able to examing the semi-period data to determine whether that rising edge corresponds to the 1st or 2nd entry in the semi-period data.  This in turn resolves the polarity ambiguity.
    Note that even though you only need the 1st value in the buffer, the period measurement still needs to be buffered to make sure that the period measurement starts at the trigger signal.  In unbuffered mode, period measurement starts at the first active edge of the PWM signal after the trigger.
    -Kevin P.

  • Multi-line JTextPane: My SSCCE works, but not my reg. code . [LONG, sorry.]

    So, I'm trying to code this flash cards program, and it's not working. The problem is that, when I change the text of the JTextPane to have multiple lines, the text disappears, and my JTextPane acts like it's empty. I included my SSCCE as a comparison, because it works just fine. I hope you guys don't mind that I included all of the code for my Cards program, even the stuff that I know isn't relevant, but I'm at a loss, and it's bedtime, so I'm done editing for the night. If you guys can fix my code, feel free to use it for your own personal use (as a reward for having to deal with the irrelevant stuff). How do I get my text to appear when it has multiple lines?
    PS I know my button listeners aren't like they should be. I'm going to fix them after I fix the JTextPane.
    PPS If this breaks anyone's browser, I'm sorry, but I included a file that is format-dependent, so I had to include it as is. Also, I had to include tabs and not spaces because of the length limit.
    package sscce;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.GridLayout;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextPane;
    import javax.swing.WindowConstants;
    import javax.swing.text.DefaultStyledDocument;
    import javax.swing.text.Style;
    import javax.swing.text.StyleConstants;
    import javax.swing.text.StyleContext;
    import javax.swing.text.StyledDocument;
    public class SSCCE
         private final Font     bold          = new Font("Courier New", Font.BOLD, 12),
              plain = new Font("Courier New", Font.PLAIN, 12);
         JButton                    button          = new JButton("Press this button");
         final JLabel          labels[]     = {new JLabel("xyz"), new JLabel("xyz"),
              new JLabel("xyz"), new JLabel("xyz"), new JLabel("xyz"),
              new JLabel("xyz")               };
         final String          oldText          = "This text should wrap automatically because it is long.",
              newText = "This text should add height to the textPane because it is longer than the original.";
         boolean                    textSwitch     = true;
         final JTextPane          tp               = createTextPane();
         final JPanel          upperPanel     = new JPanel(new GridLayout(3, 1)),
              lowerPanel = new JPanel(new GridBagLayout());
         private SSCCE()
              final JFrame frame = new JFrame("SSCCE");
              button.addActionListener(new ButtonListener());
              start();
              frame.add(upperPanel, BorderLayout.CENTER);
              frame.add(lowerPanel, BorderLayout.SOUTH);
              frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              frame.setSize(485, 338);
              frame.setVisible(true);
         public static void main(final String args[])
              new SSCCE();
         private void addItem(final String cell, final int colSpan,
              final int rowSpan, final JPanel pan)
              addItem(cell, colSpan, rowSpan, pan, new JLabel(" "), plain);
         private void addItem(final String cell, final int colSpan,
              final int rowSpan, final JPanel pan, final JComponent c, final Font f)
              final GridBagConstraints gc =
                   new GridBagConstraints(cell.charAt(0) - 65, cell.charAt(1) - 49,
                        colSpan, rowSpan, 100, 100, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0);
              try
                   pan.setFont(f);
                   pan.add(c, gc);
                   pan.validate();
              catch (final Exception e)
                   e.printStackTrace();
                   System.exit(0);
         private JTextPane createTextPane()
              final StyleContext context = new StyleContext();
              final StyledDocument document = new DefaultStyledDocument(context);
              final Style style = context.getStyle(StyleContext.DEFAULT_STYLE);
              final JTextPane textPane = new JTextPane(document);
              textPane.setText(oldText);
              StyleConstants.setAlignment(style, StyleConstants.ALIGN_CENTER);
              textPane.setFont(new Font("Courier New", Font.BOLD, 12));
              textPane.setEditable(false);
              return textPane;
         private void start()
              upperPanel.setBackground(Color.WHITE);
              upperPanel.setLayout(new GridLayout(3, 1));
              lowerPanel.setLayout(new GridBagLayout());
              final JPanel topPanel = new JPanel(new GridBagLayout()), middlePanel =
                   new JPanel(new GridBagLayout()), bottomPanel =
                   new JPanel(new GridBagLayout());
              topPanel.setBackground(Color.RED);
              middlePanel.setBackground(Color.GREEN);
              bottomPanel.setBackground(Color.BLUE);
              upperPanel.setBackground(Color.BLACK);
              addItem("A1", 1, 1, topPanel);
              addItem("A2", 1, 1, topPanel, new JLabel("test1"), plain);
              addItem("A3", 1, 1, topPanel);
              addItem("A1", 1, 1, middlePanel);
              addItem("A2", 1, 1, middlePanel, tp, bold);
              addItem("A3", 1, 1, middlePanel);
              addItem("A1", 1, 1, bottomPanel);
              addItem("A2", 1, 1, bottomPanel, new JLabel("test2"), plain);
              addItem("A3", 1, 1, bottomPanel);
              addItem("A1", 1, 1, lowerPanel);
              addItem("B1", 1, 1, lowerPanel, button, plain);
              addItem("C1", 1, 1, lowerPanel);
              upperPanel.add(topPanel);
              upperPanel.add(middlePanel);
              upperPanel.add(bottomPanel);
         private class ButtonListener implements ActionListener
              @Override
              public void actionPerformed(final ActionEvent arg0)
                   if (textSwitch)
                        tp.setText(newText);
                   else
                        tp.setText(oldText);
                   textSwitch = !textSwitch;
    package fc;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.GridLayout;
    import java.awt.Insets;
    import java.awt.KeyboardFocusManager;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusListener;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileReader;
    import java.util.Arrays;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JTextArea;
    import javax.swing.JTextPane;
    import javax.swing.WindowConstants;
    import javax.swing.text.DefaultStyledDocument;
    import javax.swing.text.Style;
    import javax.swing.text.StyleConstants;
    import javax.swing.text.StyleContext;
    import javax.swing.text.StyledDocument;
    public class Cards implements ActionListener, FocusListener
         private Cards          allDefs[]          = null;
         private final Font     bold               = new Font("Courier New", Font.BOLD, 12),
              plain = new Font("Courier New", Font.PLAIN, 12);
         private JButton          button1               = null;
         private JButton          button2               = null;
         private final int     card               = 0;
         private final int     CE                    = GridBagConstraints.CENTER,
              E = GridBagConstraints.EAST, W = GridBagConstraints.WEST;
         private boolean          clickedWrong     = true;
         private String          course               = null, def = null, page = null,
              word = null;
         private JLabel          courseLabel          = null;
         private Cards          currDef               = null;
         private JTextArea     enterDefn          = null, enterWord = null;
         private JFrame          frame               = null;
         private JButton          invis               = null;
         private JButton          learn               = null;
         private boolean          message               = true;
         private JPanel          p[]                    = null;
         private JLabel          pageLabel          = null;
         private JPanel          panel[]               = null;
         private JTextArea     rightDefn          = null;
         private JTextArea     rightWord          = null;
         private Cards          saveDefs[]          = null;
         private JTextPane     showLabel          = null;
         private JLabel          sizeLabel          = null;
         public Cards()
              try
                   panel = new JPanel[2];
                   panel[0] = new JPanel();
                   panel[1] = new JPanel();
                   panel[0].removeAll();
                   panel[1].removeAll();
                   panel[0].revalidate();
                   panel[1].revalidate();
                   allDefs = populate();
                   button1 = new JButton();
                   button2 = new JButton();
                   learn = new JButton("Learn");
                   button1.addActionListener(this);
                   button2.addActionListener(this);
                   learn.addActionListener(this);
                   courseLabel = new JLabel();
                   pageLabel = new JLabel();
                   showLabel = createTextPane();
                   sizeLabel = new JLabel();
                   cardSetup();
                   panel[0].setBackground(Color.WHITE);
                   panel[1].setBackground(Color.WHITE);
                   panel[0].setBorder(null);
                   panel[1].setBorder(null);
                   frame = new JFrame("Flash Cards");
                   frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
                   frame.setSize(485, 338);
                   frame.setLocationRelativeTo(null);
                   frame.add(panel[0], BorderLayout.CENTER);
                   frame.add(panel[1], BorderLayout.SOUTH);
                   frame.setResizable(false);
                   frame.setVisible(true);
                   start();
              catch (final Exception e)
                   e.printStackTrace();
         public Cards(final String defCourse, final String defWord,
              final String defDef, final String defPage)
              course = defCourse;
              word = defWord;
              def = defDef;
              page = defPage;
         public static void main(final String args[])
              new Cards();
         @Override
         public void actionPerformed(final ActionEvent e)
              final Object src = e.getSource();
              if (src == button1)
                   if (button1.getText().equals("Guess"))
                        button1.setText("Right");
                        button2.setText("Wrong");
                        showLabel.setText(currDef.def);
                        showLabel.setFont(bold);
                        panel[0].revalidate();
                        panel[1].revalidate();
                   else
                        allDefs = remDef(allDefs, card);
                        if (allDefs != null)
                             button1.setText("Guess");
                             button2.setText("Skip");
                             showCard();
                        else
                             if (saveDefs == null)
                                  frame.setVisible(false);
                                  if (JOptionPane
                                       .showConfirmDialog(
                                            null,
                                            "According to you, you have guessed all the words right. Would you like to start over?",
                                            "All Correct!", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
                                       allDefs = populate();
                                       start();
                                  else
                                       System.exit(0);
                             else
                                  button1.setText("Guess");
                                  button2.setText("Skip");
                                  allDefs = Arrays.copyOf(saveDefs, saveDefs.length);
                                  saveDefs = null;
                                  if (clickedWrong)
                                       clickedWrong = false;
                                       JOptionPane
                                            .showMessageDialog(
                                                 null,
                                                 "You are now going over terms that you said you guessed wrong.",
                                                 "", JOptionPane.INFORMATION_MESSAGE);
                                  showCard();
              else if (src == learn)
                   saveDefs = addDef(saveDefs, allDefs[card]);
                   allDefs = remDef(allDefs, card);
                   if (allDefs == null)
                        allDefs = Arrays.copyOf(saveDefs, saveDefs.length);
                        saveDefs = null;
                        if (clickedWrong)
                             clickedWrong = false;
                             JOptionPane
                                  .showMessageDialog(
                                       null,
                                       "You are now going over terms that you said you guessed wrong.",
                                       "", JOptionPane.INFORMATION_MESSAGE);
                   panel[0].removeAll();
                   panel[1].removeAll();
                   button1.setText("Guess");
                   button2.setText("Skip");
                   cardSetup();
                   showCard();
              else
                   if (button2.getText().equals("Wrong"))
                        int rows = 0;
                        final int colsWord = wordWrapWidth(allDefs[card].word, 21), colsDef =
                             67 - colsWord;
                        System.out.println(colsWord);
                        invis = new JButton("");
                        invis.setBackground(Color.BLACK);
                        p = new JPanel[3];
                        p[0] = new JPanel();
                        p[1] = new JPanel();
                        p[2] = new JPanel();
                        panel[0].setBackground(Color.BLACK);
                        rightWord = createTextArea(colsWord, allDefs[card].word);
                        rightDefn = createTextArea(colsDef, allDefs[card].def);
                        enterWord = createTextArea(colsWord);
                        enterDefn = createTextArea(colsDef);
                        enterWord.setBackground(Color.WHITE);
                        enterWord.setEditable(true);
                        enterWord.setFocusable(true);
                        p[0].setBackground(Color.BLACK);
                        p[1].setBackground(Color.BLACK);
                        p[2].setBackground(Color.BLACK);
                        p[0].add(rightWord);
                        p[0].add(rightDefn);
                        p[1].add(enterWord);
                        p[1].add(enterDefn);
                        p[2].add(invis); // otherwise invis appears when the word shows
                                                 // up
                        panel[0].removeAll();
                        panel[1].removeAll();
                        panel[0].revalidate();
                        panel[1].revalidate();
                        learn.setEnabled(false);
                        rightWord.setEditable(false);
                        rightDefn.setEditable(false);
                        rightWord.setBackground(Color.GREEN);
                        rightDefn.setBackground(Color.GREEN);
                        panel[0].setLayout(new GridBagLayout());
                        panel[1].setLayout(new GridBagLayout());
                        addItem("A1", 3, 1, panel[0], p[0], bold, CE, 100, 0,
                             GridBagConstraints.BOTH);
                        addItem("A2", 3, 1, panel[0], p[1], bold, CE, 100, 100,
                             GridBagConstraints.BOTH);
                        addItem("A3", 3, 1, panel[0], p[2], bold, CE, 100, 0,
                             GridBagConstraints.BOTH);
                        addItem("A1", 1, 1, panel[1], new JLabel(" "), plain, W);
                        addItem("B1", 1, 1, panel[1], learn, plain, CE);
                        addItem("C1", 1, 1, panel[1], sizeLabel, plain, E);
                        panel[0].revalidate();
                        panel[1].revalidate();
                        try
                             Thread.sleep(50);
                        catch (final Exception i)
                             i.printStackTrace();
                        rows =
                             Math.max(wordWrapLines(rightWord), wordWrapLines(rightDefn));
                        rightWord.setRows(rows);
                        rightDefn.setRows(rows);
                        enterWord.setRows(rows);
                        enterDefn.setRows(rows);
                        enterWord.requestFocus();
         public Cards[] addDef(final Cards array[], final Cards defined)
              Cards newarray[] = null;
              if (array == null)
                   newarray = new Cards[1];
              else
                   newarray = Arrays.copyOf(array, array.length + 1);
              newarray[newarray.length - 1] = defined;
              return newarray;
         public void addItem(final String cell, final int colSpan,
              final int rowSpan, final JPanel pan)
              addItem(cell, colSpan, rowSpan, pan, new JLabel(" "), plain, E);
         public void addItem(final String cell, final int colSpan,
              final int rowSpan, final JPanel pan, final JComponent c, final Font f,
              final int anchor)
              addItem(cell, colSpan, rowSpan, pan, c, f, anchor, 100, 100);
         public void addItem(final String cell, final int colSpan,
              final int rowSpan, final JPanel pan, final JComponent c, final Font f,
              final int anchor, final int weightx, final int weighty)
              addItem(cell, colSpan, rowSpan, pan, c, f, anchor, weightx, weighty,
                   GridBagConstraints.NONE);
         public void addItem(final String cell, final int colSpan,
              final int rowSpan, final JPanel pan, final JComponent c, final Font f,
              final int anchor, final int weightx, final int weighty, final int fill)
              final GridBagConstraints gc =
                   new GridBagConstraints(cell.charAt(0) - 65, cell.charAt(1) - 49,
                        colSpan, rowSpan, weightx, weighty, anchor, fill, new Insets(0,
                             0, 0, 0), 0, 0);
              if (f != null)
                   c.setFont(f);
              try
                   pan.add(c, gc);
                   pan.validate();
              catch (final Exception e)
                   e.printStackTrace();
                   System.exit(0);
         public void addItem(final String cell, final int colSpan,
              final int rowSpan, final JPanel pan, final JComponent c,
              final int anchor, final int weighty, final int weightx)
              final GridBagConstraints gc =
                   new GridBagConstraints(cell.charAt(0) - 65, cell.charAt(1) - 49,
                        colSpan, rowSpan, weighty, weightx, anchor,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0);
              try
                   pan.add(c, gc);
                   pan.validate();
              catch (final Exception e)
                   e.printStackTrace();
                   System.exit(0);
         public void cardSetup()
              panel[0].setBackground(Color.WHITE);
              panel[0].setLayout(new GridLayout(3, 1));
              panel[1].setLayout(new GridBagLayout());
              final JPanel topPanel = new JPanel(new GridBagLayout()), middlePanel =
                   new JPanel(new GridBagLayout()), bottomPanel =
                   new JPanel(new GridBagLayout());
              middlePanel.setBackground(Color.GREEN);
              addItem("A1", 1, 3, topPanel);
              addItem("B1", 1, 2, topPanel);
              addItem("C1", 1, 1, topPanel);
              addItem("C2", 1, 1, topPanel, courseLabel, plain, E);
              addItem("C3", 1, 1, topPanel);
              addItem("A1", 1, 1, middlePanel, new JLabel(" "), bold, CE);
              addItem("A2", 1, 1, middlePanel, showLabel, bold, CE);
              addItem("A3", 1, 1, middlePanel, new JLabel(" "), bold, CE);
              addItem("A1", 1, 1, bottomPanel);
              addItem("B2", 1, 1, bottomPanel, pageLabel, plain, E);
              addItem("A3", 1, 1, bottomPanel);
              addItem("A1", 1, 1, panel[1]);
              addItem("B1", 1, 1, panel[1], button1, plain, E);
              addItem("C1", 1, 1, panel[1], button2, plain, W);
              addItem("D1", 1, 1, panel[1], sizeLabel, bold, E);
              panel[0].add(topPanel);
              panel[0].add(middlePanel);
              panel[0].add(bottomPanel);
         public JTextArea createTextArea(final int cols)
              return createTextArea(cols, "");
         public JTextArea createTextArea(final int cols, final String text)
              final JTextArea t = new JTextArea(text, 1, cols);
              t.addFocusListener(this);
              t.setBackground(Color.LIGHT_GRAY);
              t.setEditable(false);
              t.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
                   null);
              t.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
                   null);
              t.setFocusable(false);
              t.setFont(bold);
              t.setLineWrap(true);
              t.setWrapStyleWord(true);
              t.setSize(0, Short.MAX_VALUE);
              return t;
         private JTextPane createTextPane()
              final StyleContext context = new StyleContext();
              final StyledDocument document = new DefaultStyledDocument(context);
              final Style style = context.getStyle(StyleContext.DEFAULT_STYLE);
              final JTextPane textPane = new JTextPane(document);
              textPane
                   .setText("This text should wrap automatically because it is long.");
              StyleConstants.setAlignment(style, StyleConstants.ALIGN_CENTER);
              textPane.setFont(new Font("Courier New", Font.BOLD, 12));
              textPane.setEditable(false);
              textPane.setBorder(BorderFactory.createLineBorder(Color.RED));
              return textPane;
         @Override
         public void focusGained(final FocusEvent e)
              final JTextArea src = (JTextArea) e.getSource();
              src.setBackground(Color.WHITE);
              src.setCaretPosition(0);
              src.setEditable(true);
         @Override
         public void focusLost(final FocusEvent e)
              final JTextArea src = (JTextArea) e.getSource();
              boolean correct = false;
              if (src == enterWord)
                   correct = src.getText().equals(rightWord.getText());
              else if (src == enterDefn)
                   correct = src.getText().equals(rightDefn.getText());
              if (correct)
                   src.setBackground(Color.GREEN);
                   src.setEditable(false);
                   if (src == enterWord)
                        enterDefn.setFocusable(true);
                        enterDefn.setEditable(true);
                        enterDefn.requestFocus();
                   if (src == enterDefn)
                        invis.setFocusable(false);
                        learn.setEnabled(true);
                        learn.requestFocus();
              else
                   if (message)
                        if (src == enterWord)
                             int rightChars = 0;
                             for (int c = 0; c < rightWord.getText().length()
                                  && c < src.getText().length(); c++)
                                  if (rightWord.getText().charAt(c) != src.getText()
                                       .charAt(c))
                                       break;
                                  rightChars++;
                             JOptionPane.showMessageDialog(
                                  null,
                                  rightWord.getText().substring(0, rightChars)
                                       + "|"
                                       + rightWord.getText().substring(rightChars,
                                            rightWord.getText().length())
                                       + "\n"
                                       + src.getText().substring(0, rightChars)
                                       + "|"
                                       + src.getText().substring(rightChars,
                                            src.getText().length()), "Incorrect",
                                  JOptionPane.ERROR_MESSAGE);
                        if (src == enterDefn)
                             int rightChars = 0;
                             for (int c = 0; c < rightDefn.getText().length()
                                  && c < src.getText().length(); c++)
                                  if (rightDefn.getText().charAt(c) != src.getText()
                                       .charAt(c))
                                       break;
                                  rightChars++;
                             JOptionPane.showMessageDialog(
                                  null,
                                  rightDefn.getText().substring(0, rightChars)
                                       + "|"
                                       + rightDefn.getText().substring(rightChars,
                                            rightDefn.getText().length())
                                       + "\n"
                                       + src.getText().substring(0, rightChars)
                                       + "|"
                                       + src.getText().substring(rightChars,
                                            src.getText().length()), "Incorrect",
                                  JOptionPane.ERROR_MESSAGE);
                        src.requestFocus();
                   message = !message;
         public Cards[] populate()
              Cards c[] = null;
              try
                   final File file = new File("FC.txt");
                   if (file.exists())
                        final BufferedReader in =
                             new BufferedReader(new FileReader(file));
                        String line = null;
                        int badTerms = 0, goodTerms = 0;
                        while ((line = in.readLine()) != null)
                             final String lines[] = line.split("\t");
                             if (lines.length == 4)
                                  c =
                                       addDef(c, new Cards(lines[0], lines[1], lines[2],
                                            lines[3]));
                                  goodTerms++;
                             else
                                  badTerms++;
                        if (badTerms > 0)
                             JOptionPane
                                  .showMessageDialog(
                                       null,
                                       "There were "
                                            + badTerms
                                            + " bad term(s) and "
                                            + goodTerms
                                            + " good term(s). You will see only the good entries for the terms.",
                                       "There were bad terms.",
                                       JOptionPane.INFORMATION_MESSAGE);
                   else
                        JOptionPane
                             .showMessageDialog(
                                  null,
                                  "The file "
                                       + file.getCanonicalPath()
                                       + " does not exist. Please download the file or create it, and then restart the program.",
                                  "File Not Found", JOptionPane.ERROR_MESSAGE);
                        System.exit(0);
              catch (final Exception e)
                   e.printStackTrace();
              return c;
         public void printTA(final JTextArea ta)
              System.out.println("cols=" + ta.getColumns());
              System.out.println("rows=" + ta.getRows());
              System.out.println("text=" + ta.getText());
              System.out.println("getText.length()=" + ta.getText().length());
         public Cards[] remDef(final Cards[] array, final int cardnum)
              Cards temp[] = null;
              if (array.length > 1)
                   temp = new Cards[array.length - 1];
                   int defLength = 0;
                   for (int l = 0; l < array.length; l++)
                        if (!array[cardnum].equals(array[l]))
                             temp[defLength] = array[l];
                        else
                             defLength--;
                        defLength++;
              return temp;
         private void showCard()
              currDef = allDefs[(int) Math.floor(Math.random() * allDefs.length)];
              courseLabel.setText(currDef.course);
              pageLabel.setText(currDef.page);
              showLabel.setText(currDef.word);
              sizeLabel.setText("Left: " + allDefs.length);
         private void start()
              button1.setText("Guess");
              button2.setText("Skip");
              showCard();
              frame.setVisible(true);
         @Override
         public String toString()
              return "Java.lang.Cards[" + course + "," + word + "," + def + ","
                   + page + "]";
         public String wordWrap(final String string, final int w)
              String newStr = "", s = string;
              final int width = w;
              int oldSpace = 0;
              if (s.length() < w)
                   return s;
              for (int c = 0; c < s.length(); c++)
                   if (c == s.length() - 1)
                        if (s.length() > width && oldSpace != 0)
                             newStr +=
                                  s.substring(0, oldSpace).replace("(", "\\(")
                                       .replace(")", "\\)")
                                       + "<br/>" + s.substring(oldSpace + 1, s.length());
                        else
                             newStr += s;
                   else if (s.charAt(c) == ' ')
                        if (c > width)
                             newStr += s.substring(0, oldSpace) + "<br/>";
                             s =
                                  s.replaceFirst(
                                       s.substring(0, oldSpace).replace("(", "\\(")
                                            .replace(")", "\\)")
                                            + " ", "");
                             c = 0;
                        oldSpace = c;
              return newStr;
         private int wordWrapLines(final JTextArea t)
              return wordWrap(t.getText(), t.getColumns()).replaceAll("<br/>", "\n")
                   .split("\n").length;
         private int wordWrapWidth(final String s, final int w)
              final String lines[] =
                   wordWrap(s, w).replaceAll("<br/>", "\n").split("\n");
              int maxWidth = 0;
              for (final String line : lines)
                   if (line.length() > maxWidth)
                        maxWidth = line.length();
              if (maxWidth > w)
                   return w;
              return maxWidth;
    }And here is the accompanying file for Cards.java
    ET115     accuracy     the difference between the measured and accepted or "true" value of a measurement     01.04.013.2
    ET115     ampere-hour rating     a number given in ampere-hours; determined by multiplying a current in amps times the length of time in hours a battery can deliver that current to a load     03.07.093.1
    ET115     atom     the smallest element particle that possesses the unique characteristics of that element     02.01.024.1
    ET115     battery     an energy source that uses a chemical reaction to convert chemical energy into electrical energy     02.03.031.1
    ET115     charge     an electrical property of matter that exists because of an excess or deficiency of electrons     02.02.028.1
    ET115     circuit     an interconnection of a source, a load, and an interconnecting current path that are designed produce a desired result     02.06.047.1
    ET115     circuit breaker     a resettable protective device used for interrupting excessive current in an electric circuit     02.06.050.2
    ET115     colour code     a system of colour bands or dots that identify the vale of a resistor or other component     02.05.040.2
    ET115     conductance     the ability of a circuit to allow current; the reciprocal of resistance     02.05.038.3
    ET115     conductor     a material in which electrical current is established with relative ease     02.01.027.1
    ET115     coulomb     the unit of electrical charge; the total charge possessed by 6.25 * 10^18 electrons     02.02.028.2
    ET115     DMM     digital multimeter; an electronic instrument that combines meters for the measurement of voltage, current, and resistance     02.07.057.1
    ET115     electronic     related to the movement and control of free electrons in semiconductors or vacuum devices     02.01.027.3
    ET115     engineering notation     a system for representing any number as a one-, two-, or three-digit number, times a power of ten with an exponent that is a multiple of 3     01.01.007.1
    ET115     error     the difference between the true measured and best-accepted value of a measurement     01.04.013.1
    ET115     free electron     a valence electron that has broken away from its parent atom and is free to move from atom to atom within the atomic structure of a material     02.01.026.1
    ET115     fuse     a protective device that burns open when there is excessive current in a circuit     02.06.050.1
    ET115     half-splitting     a troubleshooting procedure where one starts in the middle of a circuit or system and, depending on the first measurement, works toward the output or toward the input to find the fault     03.08.096.1
    ET115     ion     an atom that has gained or lost a valence electron and resulted in a net positive or negative charge     02.01.026.2
    ET115     load     a resistor or other component that is connected across the output terminals of a circuit, draws current from the source, and has work done upon it     02.06.047.2
    ET115     metric prefix     a symbol that is used to replace the power of ten in numbers expressed in engineering notation     01.02.010.1
    ET115     Ohm's law     a law stating that current is directly proportional to voltage and inversely proportional to resistance     03.01.075.1
    ET115     orbit     the path an electron takes as it circles around the nucleus of an atom     02.01.025.2
    ET115     photovoltaic effect     the process where light energy converts directly into electrical energy     02.03.033.1
    ET115     piezoelectric effect     the property of a crystal where a changing mechanical stress produces a voltage across the crystal     02.03.034.2
    ET115     power of ten     a numerical representation consisting of a base 10 and an exponent; the number 10 raised to a power     01.01.004.2
    ET115     power rating     the maximum amount of power a resistor can dissipate without being damaged by excessive heat build-up     03.05.088.1
    ET115     precision     a measure of the repeatability or consistency of a series of measurements     01.04.013.3
    ET115     resistor     an electrical component designed specifically to have a certain amount of resistance     02.05.039.1
    ET115     round off     the process of dropping one or more digits to the right of the last significant digit in a number     01.04.015.1
    ET115     scientific notation     a system for representing any number as a number between 1 and 10 times an appropriate power of ten     01.01.004.1
    ET115     Seebeck effect     the generation of a voltage at the junction of two different metals that have a temperature difference between them     02.03.034.1
    ET115     semiconductor     a material that has a conductance value between that of a conductor and an insulator     02.01.027.2
    ET115     SI     standardised international system of units used for all engineering and scientific work; abbreviation for French Le Systeme International d'Unites     01.02.009.1
    ET115     switch     an electrical or electronic device for opening and closing a current path     02.06.048.4
    ET115     thermistor     a type of temperature transducer in which resistance is inversely proportional to temperature     02.05.046.2
    ET115     thermocouple     a thermoelectric type of voltage source that is commonly used to sense temperature     02.03.033.4
    ET115     troubleshooting     a systematic process of isolating, identifying, and correcting a fault in a circuit or system     03.08.095.1
    ET115     voltage     the amount of energy available to move a certain number of electrons from one point or another in an electrical circuit     02.03.029.Edited by: ElectrifiedBrain on Apr 12, 2011 12:08 AM

    EJP wrote:
    No way anybody in their right mind is going to look at all that. Find the salient differences between your SCCE and your non-working code.I didn't think so, but it was worth a shot. I did my best to find it last night, but I just couldn't.
    Kleopatra wrote:
    hahahaha ... you really think that'll work: "I'm tired, so going for a nap - hope you'll clean the mess and have it fixed when I wakeup"
    Dream well
    JeanetteIt was midnight, and I had to wake up at 5:30, so that was true. I didn't really think it was going to work, but I was hoping.
    Anyway, this can be locked too, I guess. I have an idea on how to find what's wrong.

  • Multiple facts with shared/non shared dimensions

    Hello All,
    I have a scenario where we are using multiple facts in OBIEE. Fact1(Inventory Onhand) is joined to all shared dimensions, and Fact2( Forecasting Values) is joined to few shared dimesnions so the joins are like:
    Fact1 with Dim1, Dim2, Dim3, Dim4, Dim5, Dim6..
    Fact2 with Dim1,Dim3, Dim5
    I have given the physical joins in the physical layer, later in the logical layer I pulled the fact2 in to to the fact1(multiple LTS) and then set the aggregattion levels for the non conformed dimensions. This was working fine for me but the customer was not happy with this. He doesnt want to have different levels of data in to a single fact.
    What are the allternate possible solutions to implement this in the busines layer?
    Any ideas/inputs are highly appreciated.
    - Abhi

    Hi,
    I have done the same as explained above. But here the issue is we are getting duplicate data.
    For Ex: if i have one common dimmension attribute and two non confirmed dimension attributes with a measure. For non confirmed dimension have different value and for all these values the common dimension attribute is same. Then the common attribute will repeat for all non confirmed dimensions.so, here automatically the Corresponding measures also repeating.
    Common Attr non-Confirm Attr1 non-Cnfirm Attr2 measure
    123 abc xyz 1000
    123 bac yzx 1000
    123 pqr mno 1000
    If you observe the above exapmple the confirm dime attr is same for both non confirm dime attrs, so the measure values also repeating here. If i see the data base i have measure data only for ABC record. For Remaining two records it is 0, but here the value 1000 is showing for remaining two records as well.
    Please let me know if any one face this issue earlier.
    Regards,
    Aari

  • How do I save a chart as a jpeg?

    How do I save a chart as a jpeg. In excel I right click, "save as picture." Not seeing anything like that in Numbers.

    Here is a script dedicated to Numbers.
    You will find explanations in French and English at the beginning.
    CAUTION :
    it requires the installation of a Unix command file which gives us the ability to check if a modifier key is depressed.
    During my tests, only shift or fn keys were correctly detected.
    Maybe it was because I did my tests in the AppleScript Editor.
    I choose the fn key which, as far as I know, is not used to define the area to save.
    --{code}
    --[SCRIPT subset_of_numbers_doc_to_jpeg]
    Télécharger getModKey.zip depuis
    http://allancraig.net/index.php?option=com_docman&Itemid=100
    Décompacter puis déplacer le fichier getModKey dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:UnixBins:
    Il vous faudra peut-être créer le dossier UnixBins.
    Détails complémentaires dans :
    http://macscripter.net/viewtopic.php?id=33652
    Enregistrer le script en tant que Script : subset_of_numbers_doc_to_jpeg.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Ouvrir un document Numbers et afficher la feuille dont une portion doit être enregistrée dans un fichier jpeg.
    Aller au menu Scripts , choisir Numbers puis choisir “subset_of_numbers_doc_to_jpeg”
    Le script affiche la feuille au format PDF dans Aperçu.
    Sélectionnez la zone à enregistrer puis pressez la touche fn.
    Le script copie la sélection dans le Presse-papiers, ferme le PDF complet,
    crée un nouveau PDF à partir du Presse-papiers
    puis ouvre le dialogue Enregistrer au format jpeg.
    Il restera à définir le nom et la destination du fichier.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Download getModKey.zip from
    http://allancraig.net/index.php?option=com_docman&Itemid=100
    Expand it then move the getModKey file into the folder
    <startupVolume>:Users:<yourAccount>:UnixBins:
    Maybe you would have to create the folder UnixBins.
    Details available in :
    http://macscripter.net/viewtopic.php?id=33652
    Save the script as a Script: subset_of_numbers_doc_to_jpeg.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Open a Numbers document and display the sheet whose a subset must be saved in a jpeg file.
    Go to the Scripts Menu, choose Numbers, then choose “subset_of_numbers_doc_to_jpeg”
    The script display the sheet in a Preview's PDF window.
    Select the area to save then press the fn key.
    The script copy the selected area in the clipboard, close the full PDF,
    create a new PDF from the clipboard's contents
    then open a dialog to Save as jpeg.
    Define the name and the storage location.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/11/15
    --=====
    on run
              local nomFenetre, nbw
    Check that the Unix command file getModKey is available in the folder <startupVolume>:Users:<yourAccount>:UnixBins: *)
              set flPth to ("" & (path to home folder) & "UnixBins:")
              tell application "System Events" to set maybe to exists disk item (flPth & "getModKey")
              if not maybe then
                        if not my parleAnglais() then
                                  error "Please, install “getModKey” in the folder" & return & "“" & flPth & "” !"
                        else
                                  error "Veuillez installer « getModKey » dans le dossier « " & flPth & " » !"
                        end if
              end if
              set flPth to quoted form of POSIX path of (flPth & "getModKey")
              tell application "Numbers" to activate
              tell application "System Events" to tell application process "Numbers"
    Get the name of the frontmost standard window
    so that we will not 'speak' to an inspector or to the Find dialog *)
                        set nomFenetre to name of first window whose subrole is "AXStandardWindow"
      keystroke "p" using {command down}
    Wait the availability of the Print sheet *)
                        tell window nomFenetre
                                  repeat until exists sheet 1
                                            delay 0.2
                                  end repeat
                                  tell sheet 1
      click first menu button
      click first menu item of menu 1 of first menu button
                                  end tell -- sheet
                        end tell -- window
              end tell -- System Events
              tell application "Preview" to activate
              tell application "System Events" to tell application process "Preview"
                        set nbw to count of every window
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
    Trigger the menu item Tools > Selection Tool *)
      keystroke "3" using {command down}
              end tell -- System Events
    Now, select the area which must be saved in a jpeg file *)
    Thanks to the command getModKey, loop until the fn key is depressed *)
              repeat
                        delay 0.2
                        if (do shell script flPth) = "131072" then exit repeat
              end repeat
    The fn key was depressed so we may copy the defined area to the clipboard *)
              tell application "Preview" to activate
              tell application "System Events" to tell application process "Preview"
    Empty the clipboard. So we will be able to check that the copy task is achieved *)
      set the clipboard to ""
    Copy to clipboard *)
      keystroke "c" using {command down}
    Loop waiting for the achievement of the Copy task *)
                        repeat
                                  delay 0.2
                                  try
      the clipboard as «class PDF »
                                            exit repeat (* Exit when the task is achieved *)
                                  end try
                        end repeat
                        set nbw to count windows
    Close the PDF window *)
      keystroke "w" using {command down}
    Wait the achievement of the Close task *)
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
                        set nbw to count windows
    Create New PDF from the clipboard *)
      keystroke "n" using {command down}
    Wait the availability of the new PDF window *)
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
    Get the name of the new window *)
                        set nomFenetre to name of window 1 --(first window whose subrole is "AXStandardWindow")
      keystroke "s" using {command down}
    Wait the availability of the Save sheet *)
                        repeat until exists sheet 1 of window nomFenetre
                                  delay 0.2
                        end repeat
                        tell sheet 1 of window nomFenetre
      -- properties of every UI elements
                                  tell group 1
      click first pop up button
                                            delay 0.2
      -- properties of every menu item of menu 1 of first pop up button
      click menu item "JPEG" of menu 1 of first pop up button
                                            delay 0.2
                                  end tell -- group
      -- click button 1  (* Click in the Save button *)
                        end tell -- sheet
              end tell -- System Events
    end run
    --=====
    on parleAnglais()
              local z
              try
                        tell application "Numbers" to set z to localized string "Cancel"
              on error
                        set z to "Cancel"
              end try
              return (z is not "Annuler")
    end parleAnglais
    --=====
    --[/SCRIPT]
    --{code}
    Of course, thanks to FastScripts, we may link a shortcut to the script.
    Yvan KOENIG (VALLAURIS, France)  mardi 15 janvier 2011 19:04:38
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • How to use niDCPower_ConfigureSoftwareEdgeMeasureTrigger in PXIe-4154 (each vi session has two active channels)?

    I am trying to use this function in my CVI code to configure a PXIe-4154 to make measurement based on software trigger.
    niDCPower_ConfigureSoftwareEdgeMeasureTrigger
    I saw this RUN TIME ERROR when I execute the code. Error code -1074118587 ... the requested function is not available when multiple channels ar present in the same session.
    But this functions is supported by PXIe-4154.
    So how do I go about telling the API that I only need to apply to say channel 0, and get over this problem?

    Hello Juswanto,
    I see that you are getting help from the AE department directly. We will continue with that method of communication. Thank you for contacting National Instruments.
    Regards, 
    National Instruments
    Applications Engineer

  • How to use TRG pine in PXI-8176 controller

    Dear All,
            I have Thermocouple data acquisition system. In which there are 2 chassis, (1) PXI 1002 with
    PXI8176 controller with RT, PXI 6071E DAQ card (2) SCXI 1001 with  SCXI 1125 card  and SCXI1327 block.
    PXI 6071E  connected to SCXI 1125 with SH1006868 cable and adapter SCXI1349.
    I am using Labview 8.6 , DAQmx9.0
    I have develop program for continuous thermocouple acquisition. Now i want to make program on trigger based data acquisition.  When trigger pulse comes system starts to acquire data ( and log in file) for userdefine time and stop acquisition. Again when trigger pulse comes   system again starts to acquire and stop at define time.
    There is one TRG pin on  PXI-8176 controller, Can i use that one and how i can use it? Or i have to use separate DIO line for trigger?
    Can you guide me how i can develop such system.
    Thank you.
    --Vishnu
    Solved!
    Go to Solution.

    Thanks Shreyas,
              Once again you help me to solve my problem. 
               As i have already mention you i have develop temperature measurement system with-out trigger. Here i am attaching my project. Now, how i can make it trigger based, means when trigger pulse comes acquisition start and target send data after some time for example 5minutes stop acquisition and restart acquisition again when next trigger pulse comes and so on.
    Thanks
    --Vishnu
    Attachments:
    host_target.zip ‏81 KB

  • Keep switch channel selected for multiple steps in a scan list

    Hi,
    I have 3 switches (PXI-2575), one to apply a source to a given line, one to apply a sink, a one to apply a DMM.  I have all three switches triggering off each other as well as a DMM (PXI-4070). I apply a source to any given line with the source switch and then cycle through other lines using the DMM switch. Problem is i want to keep the wear on the relays of the source switch to a minimum (for each cycle through the DMM lines I'm selecting same source pin multiple times!). Is there a command for scan lists or some way of setting up the switches so that this can be done?
    I thought it might be possible to use the debounce command ';' on its own to signify that i don't want to change the channel selection but this does not appear to work, the DMM times out whilst waiting for a trigger on the second reading. Simplified example scan list that i currently have:
    Break Mode: No Action
    Source Switch: ch0->com;;;;~ch0->com & ch1->com...
    DMM Switch: ch100->com;~ch100->com & ch101->com;~ch101->com & ch102->com;~ch102->com & ch103->com;~ch103->com & ch100->com...
    I've also tried selecting the same channel in subsquent scan list entries which flags up error saying explicit connection already exists between the channels.
    So is the only possibility just to needlessly wear out the relays?!

    Hi leon007,
    I can understand your desire to keep the wear on the relays of the Source switch to a minimum.  I have a few questions, but we should be able to get the application working without needlessly wearing out the relays.
    1.  Can I assume you are using NI-SWITCH to program this application?  If you are using the NI-DAQmx Switch API, please let me know.
    2.  When you state "I have all three switches triggering off each other as well as a DMM", can I assume (leaving out the Sink switch for now) the scan advanced output of the Source switch (TTL0) is sent to the trigger input of the DMM switch (TTL0), the scan advanced output of the DMM switch (TTL1) is sent to the trigger source of the DMM (TTL1), and the measurement complete destination of the DMM (TTL2) is sent to the trigger input of the Source switch (TTL2)?
    3.  If you are still having troubles after this post, I would like to know the following so I can assist in testing the issue:  What versions of NI-DAQmx and NI-SWITCH do you have installed?
    OK, that's it for my questions.  Now for yours.  Unfortunately, the debounce command ';' didn't work because it is simply a dummy entry - without creating a connection no scan advanced signal will be sent.  I've noticed this is not documented well in our help file, and I apologize for that.  However, attempting to create a connection where one already exists should be an error.  Either the user is attempting to redundantly connect channels (which shouldn't happen if niSwitch Get Relay Position is used), or there is a driver issue.
    To keep the relay wear to a minimum, I want to suggest a couple of ideas. 
    1.  Use only one trigger line for the DMM's measurement complete and one trigger line for all the switches scan advanced outputs.  To use this option, it cannot matter in your application which switch operates first, and which operates last.  The switch that always makes a connection (the DMM switch) will send a scan advanced output trigger with a set scan delay (configured in niSwitch Configure Scan Trigger) that should accommodate for all the switches.  This option may add delay in your application, but you will save relay life.
    2.  Use the DAQmx Switch API and the '&&' command between seperate switch connections.  In the DAQmx Switch API, you use just one scan list for all switch modules.  For example, we would perform the example scan list entries you provided with the following scan list:
    /Source/ch0->com && /DMM Switch/ch100->com; ~/DMM Switch/ch100->com & /DMM Switch/ch101->com; ~/DMM Switch/ch101->com & /DMM Switch/ch102->com; ~/DMM Switch/ch102->com & /DMM Switch/ch103->com; ~/Source/ch0->com & /Source/ch1->com && ~/DMM Switch/ch103->com & /DMM Switch/ch100->com...
    The above connects the Source switch CH0 to COM, waits for the relays to settle, connects the DMM switch CH100 to COM, sends the scan advanced output signal, and waits for the trigger input before executing the next scan list entry.  This method will keep an order to the madness, as you will have the power to decide which switch operates first, and which operates last.
    Let me know if I assumed anything incorrectly or if neither option works for you!
    Chad Erickson
    Switch Product Support Engineer
    NI - USA

  • Pivot table group by is not working

    Hi Gurus,
    I am using OBIEE 10g
    I have Dimension and Fact table. In fact table i have some measures and which are calculated and some are aggregated functions. The Geo dimension has Division, region and Market.
    In pivot table when i am grouping the values based on the Division & grand total the aggregate columns are showing the value proper where as the calculated columns gives wrong values.
    Example : Measure1 : Sum(tickets), Measure 2: Sum(repeat ticket), Measure 3: sum(repeat ticket) / Sum(ticktets)
    When i am grouping based on Division, i am getting the proper values for Measure 1 and measure 2 where as measure 3 is giving me different value or some time a region value.
    I am not able to figure out where grouping total will be done. i checked the log file it has the simple SQL query, but i dont no where it groups the data.
    Please help me its Urgent.
    Regards
    Ali

    Hi Deepak,
    Thanks for taking time and seeing my query.
    In Pivot table i am using the diemnsions are Division and Region. When i am making the total of based on Division it is taking random region values and stamping on the total of division where as grand total is giving correct value. In below example Measure1 and Measure 2 is Sum( Measure1), Sum(Measure 2) where as Measure 3 is Weigted average of Sum(Measure2) / Sum(Measure1). It is giving the value correct for indivual regions where as the division total is getting worng.
    Example :
    Division Region Measure1 Measure 2 Measure3
    Northeast NY 100 50 .5
    Northeast NJ 50 25 .5
    Northeast CI 100 25 0.25
    Northeast total :   250          100        .4
    i want the above value but i am getting like this
    Division Region Measure1 Measure 2 Measure3
    Northeast NY 100 50 .5
    Northeast NJ 50 25 .5
    Northeast CI 100 25 0.25
    Northeast total :   250          100       .5
    Let me know if you need any further information.

Maybe you are looking for

  • Acrobat Pro 9.2.0 - Long Startup Times?

    I did a search and did not get any relevant hits. When I start a pdf file there ia a 15 to 20 second delay before I see the open file. Why is this and how do I make opening pdf files quicker?

  • SQL Server 2008 Profiler--Templates Missing

    For some reason (even after an uninstall, reinstall and updating the the Community Update) there are no templates visible in the Profiler for SQL Server 2008. On another system it works fine but the Trace Provider Type shows "Microsoft SQL Server 200

  • Error in sql database creation

    how to solve the problem "create database  permission is denied in database "master"" in sql database creation

  • How to get download icon on toolbar?

    my toolbar is really starnge because i have lost my dowload icon from it and now i cant download anything i have also lost the icone on the far left (the very 1st icon) it still works but the image/icon is no longer there its just a space

  • Get appointments for every room

    There's any way to get all the appointments of each room? With EWS I have only found how to do this with the appointments of each calendar but i haven't found how to do it for get all the appointments divided in Rooms. I want to show the name of ever