Acquire generated signal with this hardware ?

Hello everyone,
I didn't really know where to post this, I apologize if it's the wrong place.
I'm very new to the LabView thing, and I have for project to trigger an injector and so to create a digital signal like this:
Due to the characteristics of the signal (110V, 10-20A, injection duration: ~20ms), someone recommended me this hardware (sorry if I'm not allowed to post these links):
- programmable power supply: http://fr.farnell.com/ea-elektro-automatik/ea-ps-9200-25-2u/alimentation-1-voie-200v-25a-prog/dp/2422474
- USB interface: http://fr.farnell.com/ea-elektro-automatik/usb-interface-ea-if-u1/interface-for-psi-el-usb/dp/1268147?ost=EA-IF-U1
I'll try to figure out on how I create (on my own for now) the signal with LabView.
My question is, will I be able to acquire the generated signal with this hardware in LabView, do I need something else ?
Thanks.
 

I have designed and built injector drivers. To get a waveform somewhat like the one you showed requires a sophisticated and fast control circuit. I would not call that a digital signal.  It may be controlled by some kind of logic signals, but that is an analog signal.  No programmable power supply I have seen is fast enough to come close.
The pull-in current does not typically go into a ring/overshoot flat-topped waveform as you have shown. It follows an exponential curve defined by the L/R rise time and the current limit set by the supply voltage and the injector coil resistance. For the injectors I have seen that current limit is much higher than the current required to generate the magnetic field required to open the valve.  That oscillatory response could be the result of a switch-mode current regulator.
Similarly, the hold-in current does not occur by magic. Either the supply voltage needs to be changed (open loop system) or the current sensed and regulated (closed loop system).  The kind of ringing you show can occur in a switch-mode current regulator.
Lynn

Similar Messages

  • Acquire a signal with mac osX

    Hello.
    I am a very beginner with LabView. 
    I would like to acquire a signal with a NI-USB 6009. I have LabView 10 on osX 10.8. I already installed the daqmx base driver.
    Could you explain me how to acquire a signal which come from the NI USB 6009 and export it as a list of numbers (the amplitude and the time).
    Thanks!

    Hello matttgic,
    What kind of signal do you want to acquire/generate?
    For exemple, if you want to acquire an analog input, you should use the architecture use in the file "Analog_input attach to this email.
    As Johnsold told you, you can find some code for your device in the "find exemple" section of LabVIEW.
    Hope this help
    Sabri 
    Attachments:
    Analog_input.PNG ‏13 KB

  • Generating signal with several frequencies - Timing issues

    Hi
    I use Labview 7.1.
    I am trying to generate a signal composed of 1000 different frequencies.
    For this purpose I am using the Multitone Generator VI .
    My problem is that the generating process is too long for my real-time
    application.
    Is there any way to accelerate (optimize) this process?
    I think about several options, such as:
    Using more powerful computer (multicore)
    Making the process parallel (is it relevant
    for Labview7.1?)
    Changing VI's properties (priority etc..)
    Please advice
    Amir

    Hi,
    Attached my problem.
    I am trying to generate signal with 100 frequency component (100 different sine waves).
    According to the timers it is taking 87mSec to produce the signal which length is 1 second.
    In my project, I need to generate 1000 frequency components. And also 20 channel of this kind.
    So it is clear that i will not be able to achieve the timing requirements
    (It will take more than 1 second to generate a signal of 1 second)
    What can you advise me ?
    Thanks
    Amir
    Attachments:
    Generate_100_freq_signal.jpg ‏156 KB

  • I have a pioneer vsx-910-k and airport express.I have a wireless network at home. What's the best arquiecture/config to do with this hardware?

    I have a pioneer vsx-910-k and airport express.I have a wireless network at home. What's the best arquiecture/config to do with this hardware?

    I would suggest that you connect the Pioneer to the AirPort Express Base Station using an optical digital audio cable that has a TOSlink connector on one end and a 3.5 mm optical connector (Mini Plug) on the other. You can then connect the Mini Plug end into the AirPort's audio port and the TOSlink end into one of the Pioneer's optical digital audio ports.

  • Having a horrible time with this hardware - VZW help very much appreciated

    This post is in regards to the HTC Droid DNA, and details my current support dilemma with VZW. If a VZW rep could please read this and comment on a way to find a solution, or if any other users have been in a similar position, your advice would be appreciated.
    It is no secret that there is a defect with the HTC DNA, which could otherwise be an excellent device. The problem: supposed firmware issues which cause the device's SIM card to dismount at random. Any calls to VZW will tell you that they released an update to fix the device. The problem: the success rate is very, very low. I suspect the problem is HTC's fault and not Verizon's, but I do feel it is up to Verizon to handle these issues with dignity.
    I have this problem, to an extent that seriously makes this phone little more than an advanced paper weight. And with it being a device used primarily for work, to have the SIM card dismount upwards of 20 times a day is simply unacceptable. The device is defected, well documented, and very much experienced by a LARGE percent of the user base. Spend 5 minutes Googling and you'll see that there is no shortage of people experiencing this problem. The worst, is looking down at my phone only to find out that again, the SIM card is dismounted, and I'm not receiving work calls and people are becoming increasingly frustrated with me. Sometimes 1 reboot fixes it (for who knows how long), sometimes it has to be rebooted 4, 5, and even as much as 10 times to correct it. Sometimes you just keep rebooting and the issue never corrects itself. I've almost thrown it at the wall several times.
    Now, here's my problem with Verizon.
    They will replace the device with a refurb, but NOT FOR FREE if there is any visual physical damage to the phone. I had an idiot crack my screen about a week ago, and while I can understand why Verizon would have policies in place to fine individuals for returning broken phones (duh, that's probably why you want a warranty replacement), it is without question that a cracked screen has anything to do with this problem. It's a VERY well documented issue. A problem that I had before cracking my screen, and one that has becoming increasingly problematic, so much so that this thing isn't even a phone anymore.
    I spoke with a Verizon rep who was happy to send me a refurb (what awesome service, I was thinking) but who at the last minute dropped on me the bit about any visual damage to the phone resulting in a non-refundable $299. The rep sympathized with me as she had the exact same problem with her DNA and had to have her phone replaced as well, but informed me that I was basically out of luck. Visual damage to phone once received by warehouse = $299, regardless of the fact that the nature of the return has nothing to do with the screen, and that it's very well understood that this is a manufacturer problem which has nothing to do with a cracked screen. Here's the kicker: I asked her if I could perhaps pay some sort of smaller fee for the broken screen - nope. I asked if I could take the phone to a professional to have the screen replaced, then send it in for replacement - nope. I asked if there was anything I could do to pay for the marginal damage of the screen crack - No, no, no. 
    This is absurd. I am not trying to cheat anyone but am left with no choice but to suffer with a defective device simply because Verizon does not care to make any sort of logical exception in this case. That is the epitome of poor customer service. There will always be exceptions, and a good company will recognize that and make sure their customers are cared for. If I did this with my customers, I'd be out of business. Too big to fail, I guess - the worst thing to happen to consumers.
    Verizon needs to step up and take responsibility for selling a faulty device. I'd be happy to pay for the OEM parts to replace the screen assembly so that my device can be swapped with one that, you know, like works and all? Why can't this be arranged?
    Comments edited as required by the Terms of Service.
    Message was edited by: Admin Moderator

        @Eliz404,
    Having a working phone is definitely a must! I understand how frustrating this whole situation has been for you and I apologize for all the inconvenience.
    You mentioned that the phone screen is cracked. Although this may have not caused the issues you are experience, it voids the warranty. If we replace the phone through the warranty you have to return your defective phone to us. Once the phone is received and physical damage is found, you are billed $299.99 for the device.
    If you have insurance you can file a claim here http://bit.ly/07CrqPK and all you will be responsible for is the $99 deductible.
    JohnB_VZW
    Follow us on Twitter @VZWSupport

  • Generate signal with variable pulsewidth and period

    Hallo,
    I want to generate a square signal where I can modify the pulswidth, period, amplitude, frequenzy, duty cycle...at the Front Panel.
    I also want to be able to generate just a a single puls/period on the one hand and a puls-train on the other.
    I´am working with a AT-MIO-16E-1(DAQ-Card), a SCB-68 and LabView 7.
    I`d be very grateful, if anyone is able to help me...
    Thanx a lot...
    Greets Daniel

    Daniel,
    It sounds like you are trying to generate digital pulses using your DAQ board.  The counter output is designed to be a digital signal.  That is, the amplitude of the signal is either 0 V or +5V.  Therefore, the amplitude cannot be controlled.
    However, there are some great examples in the LabVIEW Example Finder that will help you implement your two options.
    Access the Example Finder by navigating to Help >> Find Examples...  Then go to Hardware Input and Output >> DAQmx >> Generating Digital Pulses. There are several examples there which you can check out to get you started.  The most interesting to you are likely Gen Dig Pulse Train-Continuous.vi and Gen Dig Pulse.vi.
    I hope this gets you started in the right direction.
    Stephen Meserve
    Applications Engineering
    National Instruments
    Stephen Meserve
    National Instruments

  • Acquire 2 signals with different sampling rate?

    Hello,
    i am using first time labview signal express together with a NI pci 6251 & NI Scc 68 device.
    There are 2 signals I wish to acquire over a 2 week time period. They should be saved in several tdms files. One is a dc Voltage.(sampling rate 100Hz) The second is voltage given by an acceleration Sensor. (sampling rate 4kHz)
    When I try to acquire them I couldn't figure out how to set the sampling rate for each signal, only for all signals.
    When I created two DAQmx assistant acquire tabs. An error occurs always: "the specified resource is reserved".
    So my question is is it possible to do this?

    hello markus_umd,
    no, it is not possible to create different samplingrates for individual channels on one daq device.
    if you want to record one channel slower, you must reduce the samples for that channel in your program.
    if the channels have a common divisor, you could implement your task. you find more information here:
    Sampling Different Channels at Different Rates with NI-DAQmx
    kind regards,
    robert h
    NI germany

  • How can I generate AVI with this code?

    Here is the code which I got
    import java.io.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie implements ControllerListener, DataSinkListener {
    public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
         System.err.println("- create processor for the image datasource ...");
         p = Manager.createProcessor(ids);
         } catch (Exception e) {
         System.err.println("Yikes! Cannot create a processor from the data source.");
         return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
         System.err.println("Failed to configure the processor.");
         return false;
         // Set the output content descriptor to QuickTime.
         p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.MSVIDEO));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
         System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
         return false;
         tcs[0].setFormat(f[0]);
         System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor. Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
         System.err.println("Failed to realize the processor.");
         return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
         System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
         return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
         p.start();
         dsink.start();
         } catch (IOException e) {
         System.err.println("IO error during processing");
         return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
         dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
    * Create the DataSink.
    DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
         System.err.println("Something is really wrong: the processor does not have an output DataSource");
         return null;
         DataSink dsink;
         try {
         System.err.println("- create DataSink for: " + outML);
         dsink = Manager.createDataSink(ds, outML);
         dsink.open();
         } catch (Exception e) {
         System.err.println("Cannot create the DataSink: " + e);
         return null;
         return dsink;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         evt.getSourceController().stop();
         evt.getSourceController().close();
    Object waitFileSync = new Object();
    boolean fileDone = false;
    boolean fileSuccess = true;
    * Block until file writing is done.
    boolean waitForFileDone() {
         synchronized (waitFileSync) {
         try {
              while (!fileDone)
              waitFileSync.wait();
         } catch (Exception e) {}
         return fileSuccess;
    * Event handler for the file writer.
    public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
    public static void main(String args[]) {
         if (args.length == 0)
         prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
         if (args.equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
         if (outputURL == null || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if (!outputURL.endsWith(".avi") && !outputURL.endsWith(".AVI")) {
         System.err.println("The output file extension should end with a .avi extension");
         prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie imageToMovie = new JpegImagesToMovie();
         imageToMovie.doIt(width, height, frameRate, inputFiles, oml);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= images.size()) {
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
         String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
         System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
         RandomAccessFile raFile;
         raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
         if (buf.getData() instanceof byte[])
              data = (byte[])buf.getData();
         // Check to see the given buffer is big enough for the frame.
         if (data == null || data.length < raFile.length()) {
              data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
         raFile.readFully(data, 0, (int)raFile.length());
         System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
         buf.setLength((int)raFile.length());
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
         // Close the random access file.
         raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    when I execute this file then no error comes but the output file do not get played on any player?
    where is the error?

    here is the code with QUICKTIME
    * @(#)JpegImagesToMovie.java     1.3 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.io.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie implements ControllerListener, DataSinkListener {
        public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
             System.err.println("- create processor for the image datasource ...");
             p = Manager.createProcessor(ids);
         } catch (Exception e) {
             System.err.println("Yikes!  Cannot create a processor from the data source.");
             return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
             System.err.println("Failed to configure the processor.");
             return false;
         // Set the output content descriptor to QuickTime.
         p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
             System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
             return false;
         tcs[0].setFormat(f[0]);
         System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor.  Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
             System.err.println("Failed to realize the processor.");
             return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
             System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
             return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
             p.start();
             dsink.start();
         } catch (IOException e) {
             System.err.println("IO error during processing");
             return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
             dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
         * Create the DataSink.
        DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
             System.err.println("Something is really wrong: the processor does not have an output DataSource");
             return null;
         DataSink dsink;
         try {
             System.err.println("- create DataSink for: " + outML);
             dsink = Manager.createDataSink(ds, outML);
             dsink.open();
         } catch (Exception e) {
             System.err.println("Cannot create the DataSink: " + e);
             return null;
         return dsink;
        Object waitSync = new Object();
        boolean stateTransitionOK = true;
         * Block until the processor has transitioned to the given state.
         * Return false if the transition failed.
        boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
             try {
              while (p.getState() < state && stateTransitionOK)
                  waitSync.wait();
             } catch (Exception e) {}
         return stateTransitionOK;
         * Controller Listener.
        public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
             evt instanceof RealizeCompleteEvent ||
             evt instanceof PrefetchCompleteEvent) {
             synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
             synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
             evt.getSourceController().stop();
             evt.getSourceController().close();
        Object waitFileSync = new Object();
        boolean fileDone = false;
        boolean fileSuccess = true;
         * Block until file writing is done.
        boolean waitForFileDone() {
         synchronized (waitFileSync) {
             try {
              while (!fileDone)
                  waitFileSync.wait();
             } catch (Exception e) {}
         return fileSuccess;
         * Event handler for the file writer.
        public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
             synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
             synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
        public static void main(String args[]) {
         if (args.length == 0)
             prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
             if (args.equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
         if (outputURL == null || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if (!outputURL.endsWith(".mov") && !outputURL.endsWith(".MOV")) {
         System.err.println("The output file extension should end with a .mov extension");
         prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie imageToMovie = new JpegImagesToMovie();
         imageToMovie.doIt(width, height, frameRate, inputFiles, oml);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= images.size()) {
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
         String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
         System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
         RandomAccessFile raFile;
         raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
         if (buf.getData() instanceof byte[])
              data = (byte[])buf.getData();
         // Check to see the given buffer is big enough for the frame.
         if (data == null || data.length < raFile.length()) {
              data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
         raFile.readFully(data, 0, (int)raFile.length());
         System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
         buf.setLength((int)raFile.length());
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
         // Close the random access file.
         raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    and here is the output
    C:\>java JpegImagesToMovie -w 1024 -h 768 -f 1 -o out.mov file:/c:/images/5.jpg file:/c:/images/6.jp
    g
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file:C:\\out.mov
    start processing...
    - reading image file: file:/c:/images/5.jpg
    - reading image file: file:/c:/images/6.jpg
    Done reading all images.
    Exception in thread "JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler" java.lang.
    NullPointerException
    at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescription(QuicktimeMux.jav
    a:936)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.java:925)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.java:905)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.java:806)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.java:727)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.java:644)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.java:582)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux.java:519)
    at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
    at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
    at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:196)
    at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
    at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
    at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
    at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)

  • Acquire analog signal with NI PXI 1042 with RT

    HELLO,
    Do you have an example of this program ??
    I ACQUIRE a analog signal on the enter of the PXI and then i must to write it on the RT computer !!
    Thank you for your help!

    Hi,
    You can find examples in the LabVIEW "NI Example Finder". You can access it in the LabVIEW help menu. Click on "Toolkits & Modules" then "Real-Time" to find RT examples.
    Best regards.
    Benjamin
    Application Engineer
    National Instruments

  • Acquiring CONSECUTIVE signals with Signal Express

    How can I record multiple signals consecutively in Signal Express using the same input device and the same DAQ channel?  It seems to me that even if I have separate execution loops, the program will still try to run all the acquisitions at the same time through the same channel.   ..and I'll get an error.  I've tried one exceution loop and I can't the program to do this ..even when I have the 'run after previous step' box checked.  Any help would be much appreciated.

    Hello Sound Tech
    You do not have to put another step inorder to acquire multiple channel. In the first DAQmx Acquire step you can select multiple lines by pressing Ctrl and configure your timing and you will be all set.
    Thanks
    nAyer

  • Parallel acquire 2 signals with different sampling rate on 2 cards

    Hi NI,
    I have cDAQ-9178 and NI 9221, where sample rate is 10kHz and NI 9219, where I need sample rate about 10Hz, it's possible this confiruration for parallel acquire?
    Thank you.
    Neolker

    Hi Neolker,
    Do the tasks need to be synchronized or are totally independent tasks?
    If the tasks are independent, than you basically have to create two different tasks, even in two different loops that will run with different sampling rate.
    You can have them in the same loop the reading if you assure that the data are transfered in chunks to application memory according to tha sampling rate (Ex. for 10kS/s rate you can transfer data with 1kS chunks and for 10S/s rate with 1S chunk).
    If  you want to synchronize them, you will need a counter that will divde the sample clock from 9221 and route it to 9219.
    Let me know if you need more help.
    Best regards,
    IR

  • MOVED: How To Reach To The Maximum Performance with this Hardware ?

    This topic has been moved to Overclockers & Modding Corner.
    https://forum-en.msi.com/index.php?topic=143252.0

    If the two disabled cores are stable then unlocking them should give a nice boost. To do this, go into the BIOS and enter the 'cell menu'. Find the option that reads 'CPU Core Control' and enable it. Next, go into Windows and download the 'BIOS Code Unlocked Technology' utility from >>here<<. You'll need to run the utility, enable the cores and reboot your computer. If the disabled cores are stable you should be able to boot up and see the two extra cores being utilised in Task Manager.
    I'd advise you switch off the OC switch and see what you think of the new performance from having the two extra cores enabled, provided they're unlocked successfully.
    No point overclocking the onboard graphics. If you want to play games then it's much better just to buy a dedicated PCI-E graphics card instead.
    From an overclocking point of view, that power supply doesn't look too good so I wouldn't recommend overclocking personally.

  • Read encoder signal with 9201

    Hi
    I have a quite uncommon problem. I need to acquire the encoder signal with a NI-9201 (analogue module).
    Is this even possible? Of course I saw I that I should use a NI-9401 but my chassis is full...
    I already tryed to acquire impulse signals with such a module but they were slower.
    Thanks for any help.
    Yves

    Hi Yves,
    when you acquire data from an encoder, do you mean a quadrature encoder or rotary encoder?
    This encoder generates a binary or digital signal.
    Of course, you can always acquire a digital signal with an analog input module. This isn't recommended and necessary when you can use a pre-built api in the palettes for digital modules.
    When there is no free slot you can think about an expension chassis or a single carrier. This depense on your application.
    How did you acquired the slower signal until now?
    Kind Regards,
    Philipp K. | NI-Germany

  • Acquire and process with analogic triggering (LabView 5.1)

    This is my problem
    I would like to acquire a signal with a PCI MIO16XE10 board and when I have
    the true level for the trigger, generate a signal with my ATA0-10 board.
    I can't use the analog output channels of the PCI borad because I need 5
    anaolog outputs.
    Actually I use a software trigger but it doesn't satisfy me, and I would
    like to use the analog trigger possibility of the PCIMIO16XE10 board.
    How can I detect the trigger and immediately driving the ATA-10 board.
    I can't use the RTSI bus because I haven't the cable and I don't know how to
    programm it.
    I sorry for my english but it's not my natural language.
    Thank you all for your help

    Also, could someone touch on how forward compatible LabView applications are? In this scenario, I have the same 5.1 application which now requires some database connectivity. Since the SQL Toolkit is no longer supported, I would be left with upgrading LabView to 7.0 and using the Database Connectivity Toolkit. How well (in general) do earlier LabView applications convert to newer versions?
    Thanks again!

  • Count edges of AI signal with NI 9221

    Hi,
    I'm trying to count edges of an AI signal that are acquired with an NI-9221 on a cDAQ. The average frequency is about 1kHz.
    I'm acquiring the signal with 10kHz but don't get the right amount of edges. 
    Is
    there any solution for this problem. I know, of course it would be
    easier to use a CTR-modul but my signals doesn't fit with the specs.
    Thanks for any help
    Yves

    Yes, I know. I wanted it to be posted in the Labview forum and hadn't realized my mistake.
    But I still don't have any solution....
    Yves

Maybe you are looking for

  • Baffling MuseJSAssert error

    Hi - got this error today when loading my site at its new address. MuseJSAssert: Error calling selector function:ReferenceError: WebPro is not defined Try it yourself: thebigdivide.aaronbarn.com I'm in the process of moving my main business domain fr

  • Error when calling create and update functions on logical data service

    Hi There, I receive the following error when trying to call the createCustomerDetailResponse method from our dataservice. Note that the operation referenced in the error is createCustomerDetail rather than the actual method name 'createCustomerDetail

  • B1DE installer = signature problem

    Hi all, Sorry to bother you and I really did read dozens and dozens of entries in this forum about this already, but to no avail. I've been running a vb6 created addon for a while (it even runs nicely in debug mode and in 2004 with new license key).

  • Calendar event font too small

    New events I create in calendar have a font too small to read. How do you change the front size?

  • Images scrambled and error on PDF export since upgrade to 2014.1 / 10.1.0.71 build

    I am using a mac and just upgraded to the 2014.1 / 10.1.0.71 build.  I was working on a file and installed the upgrade (I know I shouldn't have done that while in the middle of a project.  Brain lapse), but as soon as I opened the file the images are