Using analog outputs in labview with

I have recently started using the USB personal measurement device PMD1208-LS from measurement computing with labview. I am having problems with using the analog outputs in labview i keep getting error message 41 "This function can not be used with this board" The outputs are working fine when tested with the supplied software but not when using the Aout vi in labview. has anybody else had problems with this and know how to resolve them? I have the analog inputs all working fine in labview.
Thanks

I have used the PMD12208FS and I used this vi to use the analog outputs for it.  I obtained it from Measurment Computing ftp site.  The data value is in mV.  Hope this helps.
Attachments:
PMD1208FS_AOut_lv61.vi ‏17 KB

Similar Messages

  • Issues with using the output redirection character with newer NXOS versions?

    Has anyone seen any issues with using the output redirection character with newer NXOS versions?
    Am receiving "Error 0x40870004 while copying."
    Simply copying a file from bootflash to tftp is ok.
    This occurs for both 3CDaemon and Tftpd32 softwares.
    Have tried it on multiple switches - same issue.
    Any known bugs?
    thanks!
    The following is an example of bad (NXOS4.1.1b) and good (SANOS3.2.1a)
    MDS2# sho ver | inc system
      system:    version 4.1(1b)
      system image file is:    bootflash:///m9200-s2ek9-mz.4.1.1b.bin
      system compile time:     10/7/2008 13:00:00 [10/11/2008 09:52:55]
    MDS2# sh int br > tftp://10.73.54.194
    Trying to connect to tftp server......
    Connection to server Established. Copying Started.....
    TFTP put operation failed:Access violation
    Error 0x40870004 while copying tftp://10.73.54.194/
    MDS2# copy bootflash:cpu_logfile tftp://10.73.54.194
    Trying to connect to tftp server......
    Connection to server Established. Copying Started.....
    |
    TFTP put operation was successful
    MDS2#
    ck-ci9216-001# sho ver | inc system
      system:    version 3.2(1a)
      system image file is:    bootflash:/m9200-ek9-mz.3.2.1a.bin
      system compile time:     9/25/2007 18:00:00 [10/06/2007 06:46:51]
    ck-ci9216-001# sh int br > tftp://10.73.54.194
    Trying to connect to tftp server......
    |
    TFTP put operation was successful

    Please check with new version of TFTPD 32 server. The error may be due to older version of TFPT server, the new version available solved this error. Files are getting uploaded with no issues.
    1. Download tftpd32b.zip from:
    http://tftpd32.jounin.net/tftpd32_download.html
    2. Copy the tftpd32b.zip file into an empty directory and extract it.
    3. Copy the file you want to transver into the directory containing tftpd32.exe.
    4. Run tftpd32.exe from that directory. The "Base Directory" field should show the path to the directory containing the file you want to transfer.
    At this point, the tftpserver is ready to begin serving files. As devices request files, the main tftpd32 window will log the requests.
    Best Regards...

  • How can i deliver a single pulse of varying amplitude using Analog output and USB-6251?

    I am trying to generate an analog output for the following waveform:
    Pulse width: 300 usec, Frequency 40 Hz, Amplitude is following a sine wave with a 2 second period.
    My approach is: Use an async timer with 1/[40 Hz] sec  interval. I set the DAQ output rate at 1 MHz and the approach has been to generate and write 300 samples of the amplitude I need to send out, then wait for the next async interval callback , update amplitude etc etc.  The assumption is that once the 300 samples are written and the task started , a 300 usec pulse would be sent out , task then stopped and then the analog output would be set to 0 waiting for he next pulse.  The reality is that I get a stream of pulses of 300 usec which last the whole timer interval. 
    So , trying to establish whether what I am trying to do is feasible without actually sending a large array to the USB-6251 which would write zeros for the period after 300 usec.
    Here is my timercallback code for review:
        switch (event)
            case EVENT_TIMER_TICK:
                DAQmxErrChk(DAQmxStopTask(TaskAnalog));
    Determine Voltage value algorithm here
                //Generate Waveform and start Task
                //Prepare AO arr
                for (k=0;k<300;k++)
                    AOArr[k] = 0;
                    if (k<G_PulseWidth)
                    AOArr[k] =  VOLTAGE_OUTPUT;
                if (AOArr!=NULL)
                    DAQmxErrChk(DAQmxWriteAnalogF64 (TaskAnalog, (int32) 300 , 0, DAQmx_Val_WaitInfinitely, DAQmx_Val_GroupByChannel , AOArr, &sampsPerChanWritten, NULL));
                DAQmxErrChk(DAQmxStartTask(TaskAnalog));
                break;
    Thanks

    I did resovle the issue I encountered. It was due to bad configuration of the Task.
    My initial configuration was:
    DAQmxErrChk(DAQmxCfgSampClkTiming(TaskAnalog, "",1.0E+06, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps , 300 * 1.0E+06));
    which should be:
    DAQmxErrChk(DAQmxCfgSampClkTiming(TaskAnalog, "",1.0E+06, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps , 300));      
    THis did it. works very well.
    THanks

  • Using analog output in the background

    Hi,
    I need to use the analog output channel on a NI PCIe-6351 to play an audio signal, and while the signal plays i need make some changes the UI dialog box, is it possible for me to move the playing of the audio to the background and proceed with program execution?
    Here is a simple piece of code that explains what I'm trying to do: 
    #include<stdio.h>
    #include<stdlib.h>
    #include<conio.h>
    #include<math.h>
    #include<string.h>
    #include<memory.h>
    #include<wchar.h>
    #include "sndfile.h" //include file for the sound library
    #include "NIDAQmx.h"
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    float *fWavSample;
    SNDFILE *SoundFile;
    SF_INFO SoundFileInfo;
    int iNoOfSamples=0;
    int32 error=0;
    TaskHandle AOtaskHandle = 0;
    float64* AIOSample;
    char errBuff[2048]={'\0'};
    int32 fnCreateTask(TaskHandle *AOTaskHandle)
    int32 error=0;
    DAQmxErrChk(DAQmxCreateTask("", AOTaskHandle));
    Error:
    return error;
    int ReadWavFile()
    //Open the wav file for reading
    SoundFile=sf_open("sin_10s.wav",SFM_READ,&SoundFileInfo);
    //Check if file is opened sucessfully
    if (SoundFile == NULL)
    puts("File not opened");
    return FALSE;
    //allocate memory for the buffer that is to hold the wav data&colon;
    fWavSample = new float[SoundFileInfo.channels * SoundFileInfo.frames];
    iNoOfSamples = SoundFileInfo.channels * SoundFileInfo.frames;
    //Read data into the float structure that has been copied in
    sf_readf_float(SoundFile, fWavSample, SoundFileInfo.frames);
    //Allocate memory for the structure that is to hold the sound samples
    AIOSample = new float64[iNoOfSamples+660];
    //Copy wavefile data into the new float64 array (needs to be typecasted to float64)
    int i=0;
    for(i=0;i<(SoundFileInfo.channels * SoundFileInfo.frames);i++)
    AIOSample[i] = (float64)fWavSample[i];
    //After the float64 array has been filled, release the memory used by fWavSample
    free(fWavSample);
    return 0;
    int main(int argc, char** argv)
    DAQmxErrChk(fnCreateTask(&AOtaskHandle));
    //Create an analog out channel
    DAQmxErrChk (DAQmxCreateAOVoltageChan(*(&AOtaskHandle),"Dev1/ao1","",-10.0000000,+10.00000,DAQmx_Val_Volts,NULL));
    //16 bit output resolution needed, sampling rate matched to the WAV file's
    DAQmxErrChk (DAQmxCfgSampClkTiming(AOtaskHandle,"",44100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));
    //Set the output to trigger on a rising edge on PFI6
    //DAQmxErrChk (DAQmxCfgDigEdgeStartTrig (AOtaskHandle,"PFI6",DAQmx_Val_Rising));
    //Start the task in the background
    DAQmxStartTask(AOtaskHandle);
    ReadWavFile();
    DAQmxErrChk(DAQmxWriteAnalogF64(AOtaskHandle,(SoundFileInfo.channels * SoundFileInfo.frames),true,10.0, DAQmx_Val_GroupByChannel,AIOSample,NULL,NULL));
    printf("Playing audio\n");
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuff,2048);
    //puts(errBuff);
    puts(errBuff);
    return TRUE;//DefWindowProc(hwndmon,message,wParam,lParam);
    getch();
    The program reads a 10 seconds long 1kHz sine wave signal from a WAV file and plays it over AO0.
    I want the program to  print "Playing Audio" on the console window while the audio is still playing, i.e when DAQmxWriteAnalogF64 is executing.
    I'm using Visual Studio 2005 on Windows XP and an NI PCIe6351.
    I'd really appreciate any help I can get.
    Thanks a lot!
    RaziM

    Hi RaziM, 
    It sounds like you will need to implement some sort of multithreading to accomplish playing audio in the background and also making changes in the UI dialog box in the foreground. Since DAQmx is thread safe this should definitely be possible, but it will probably take a little more work on your part.
    You may want to take a look at this page which gives a walkthrough to Multithreading with a Background component, http://msdn.microsoft.com/en-us/library/ywkkz4s1.aspx
    Here is another forum post about how DAQmx runs multiple threads, http://forums.ni.com/t5/Measurement-Studio-for-VC/DAQmx-how-does-it-multithread/td-p/221953
    I hope some of this helps!
    Rachel M.
    Applications Engineer
    National Instruments

  • I am having trouble using analog triggering on PFI0 with PCI-6110

    I am having trouble with analog triggering. I am trying to use PFI0 as an anlog input for triggering purposes and this is on a PCI-6110 card. I am outputing a 10Hz 5Vpp triangle wave signal from an analog output channel and inputing it into PFI0. I am configuring the trigger with the code listed at the bottom. When I start the data acquisition is not triggered. If I increase the frequency up to about 480-500Hz then the trigger will start and then I can actually move the frequency back to 10Hz and it will continue to trigger. Also if I leave the code the same and the waveform the same but switch the trigger type to cwaiHWdigital then it will trigger at the 10Hz level. I suspect that this may have something to do with the coupling of the PFI0 input but I am not sure if this is the case and if it is I do not know how to configure the coupling of PFI0 in measurement studio VB. Any thoughts would be appreciated.
    cwaiDAQ2.StartCondition.Source = "PFI0"
    cwaiDAQ2.StopCondition.Type = cwaiContinuous
    cwaiDAQ2.StartCondition.Type = cwaiHWAnalog
    cwaiDAQ2.StartCondition.Mode = cwaiFalling
    cwaiDAQ2.StartCondition.Level = 2
    cwaiDAQ2.Configure
    cwaiDAQ2.Start

    I tried increasing the voltage and this did not seem to have nay affect on the frequency that it started triggering. I also tried to lower the trigger level. As far as trying other PFI's I dont believe I can. As fas as I can tell PFI0 is the only one that can be used as an analog input and analog trigger.
    I looked at the article in the knowledge base 2ZD9B3W3 and it seems to be a similar problem. I tried to replicate the code in my program but I really have no experience with NI_DAQ function calls in visual basic so maybe I am doing it incorrectly. I did not get any errors but the NI_DAQ function calls are mixed in with CWAI measurement studio function calls so maybe when I configure cwai it resets what I have just changed with NI_DAQ. I could really use some specific direction on how to succesfully set PFI0 to DC coupling with the CWAI control or how to mix measurement studio and NI_DAQ functions.

  • Is any extra isolation required when using Analog output to dirve higer power circuitry?

    I want to connect the analog output of a DAQcard-1200 to a current amplifier to give 5A and a tranformer to give approx 200V, is any extra isolation required to protect the card?

    Hello;
    As long as the maximum current that the board can source is taken in consideration and the input impedance of the external circuitry is high enough to prevent signal reflections back to the DAQ board, you should be good to go.
    However, since the protection circuitry can be built with such little budget, I wouldn't take my chances. I would go ahead and include the protection circuitry anyway.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • Occasional audio 'pop' using analog output

    When watching a movie and hooked up to my fairly large speakers, the audio will give an occasional "pop". Now, this doesn't happen too often, but in the course of a long movie, it may happen two or three times. I don't seem to encounter this problem with headphones on. Now, is this a problem of the computer, or the speakers themselves?

    Is there a Terminal command ("defaults write" ...) that disables the automatic shutdown of the sound circuit after a period of audio inactivity?
    As a workaround, I made this AppleScript applet to play a silent sound file every 20 seconds, but sometimes the applet suddenly starts hogging the CPU and I have to quit it. It's an AppleScript thing, not this particular code, because I have a couple of other idle handlers that also suddenly start hogging the CPU, but I digress.
    I would rather put a stop to the auto-audio-cutoff in the first place. (It's supposed to save battery power, but there's no reason for it when plugged-in to AC. It wouldn't really matter except for the "pop" from the speakers.)
    on idle
        do shell script "afplay '/Users/[user]/Library/Sounds/Silentium.aif'"
        return 20 -- (Execute this idle handler once every twenty seconds.)
    end idle

  • How to use Analog out with a 7330/7604 motion setup.

    Hello:
    I am using a NI 7330 motion controller and a MID-7604 driver.  I would like to use the Analog Output of the MID-7604 driver.  Ideally, we would use an actual DAQ, but we don't want to purchase hardware for a one-time use kind of thing.
    The driver has Analog outputs, but I can not find any documentation on how to use them.  I understand that it may be due to the 7330 controller not supporting the functionality, but, again, I have not found any documentation to support this.  Does anyone know how to access and use the Analog outputs?  I want to be able to send a variable 0-1 V signal from an Analog output.  Any ideas?

    Well, in fact this is documented:
    MID-760x User Guide:
    The analog output terminal block provides access to four digital-to-analog converter channels with ±10V output range and analog output ground.
    With this information and the pinout of the 7330 you could tell that there are no AO channels available in this configuration but I agree 100% with you that sometimes it's quite hard to decrypt this type of information from our documentation .We should provide more explicit information about which features are implemented in the controllers and which features are part of the peripherals (MIDs, UMIs).
    Jochen

  • Buffered analog output puts out additional sample on aborting or stopping task

    I'm using DAQmx and LV 8.2
    I'm doing a buffered analog output operation where the sample clock is driven by pulses from ctr0 on the same device (PXI-6070E).  When I end the analog output task, either with the DAQmx stop task or DAQmx control task (abort option selected), the AO puts out one additional point from the buffer.  (I have checked by setting breakpoints and stepping through the code that the additional point is definitely generated when the analog ouput task is aborted)
    I need the output to remain where it was before the stop task command is issued.  How do I fix this?
    Thanks,
    Marc

    I'm watching to see if there hasn't been a sample output in a certain length of time, then terminating the task if there hasn't been.  Specifically, I have ctr0 outputting pulses to drive the task based on input from the AnalogComparisonEvent terminal.  I'm using a counter on a different PXI device to count the number of pulses and monitoring this count to determine if another sample has been output.  I'm outputting the ctr0 pulse to PFI3 as well, and I'm monitoring both the ctr0 output (which drives the ao clock) and the analog output itself on an oscilloscope.
    Basically I'm sitting in a while loop waiting for the monitoring counter to fail to increment.  Then I terminate the while loop and stop the analog output task.  I can watch the analog output on the oscilloscope while I step through the program.  Immediately before the daqmx control task - abort (or daqmx stop if I don't abort first, or daqmx clear, if I don't abort or stop) vi runs, the analog output remains outputting the last sample.  Immediately after the abort, stop, or clear, the analog output advances one sample in the buffer. 
    During this time, ctr0 does not output another pulse, so the scan clock should not advance.
    Thanks,
    Marc

  • How to freeze analog output ?

    Hi,
    In my LabVIEW program, I need to freeze analog outputs (keep the last value) when appears for example an emergency stop.
    In this program, sometimes  I use  "simples" values to write outputs and other times I use waveforms.
    Is there an easy way to freeze outputs in both cases ?  (a better solution than modifying all the VIs using analog outputs  )
    Thaks for your help !

    Hi cpit,
    when you need an emergancy behaviour in your output VIs you have to program it...
    An easy way would be: IF emergency condition is met THEN don't output values.
    So a simple case structure will do the trick...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Supplying 26 Analog Outputs and 104 Digital Outputs

    I am a graduate student in CWRU and trying to control 26 brushless DC motors independently that requires 26 analog and 104 digital outputs. I couldn't find any card that is capable of this task. Can you please suggest some solution to my application?

    Hello. I would recommend 7 NI-7344s. Each 7344 has 4 analog outputs to drive servo motors and 32 configurable digital input/output (DIO) lines. However, if you don't need the trajectory control from the 7344 (ie, you're just running your motors with a constant voltage or your feedback loop is slow enough for software), then you could use a few NI 6704 Analog Output boards (each with 16 AO lines) and a few DIO boards (such as the 6503 which has 96 static DIO lines).
    If you can give me some more details about your application (what the DIO is used for, what kind of feedback you need, etc), then I should be able to recommend exact products for you.
    Cheers,
    Kyle V

  • Four analog outputs

    I want to find a DAQ device which has four analog
    outputs and at least four analog inputs.
    Could you recommend one to me?

    Jaejeen,
    There is no daqboard with the exact specifications you request. However, I can suggest you some alternatives:
    1.- You can get a Signal Source board with at least four analog output channels; i.e., the NI 6711, and you can get an E Series board for the analog input channels. Finally, you can synchronize both of them.
    2.- You can get a regular E Series Board, and you can use the two regular analog output channels, and the counters are other two analog output channels, but with the restriction to generate square waves only.
    Hope this info is helpful.
    L Aguila
    Applications Engineer
    National Instruments

  • Using DAQ generate a 38kHz on an analog output on and off for ms using labVIEW

    I wish to generate a 38kHz pulse on an analog output of a mydaq to drive a infrared led. The 38kHz signal is not continuous but is on for 1ms and off for 1ms.

    Hi pat,
    you generate a waveform using 38kHz as sample rate and a rectangular shape of 1ms HIGH level and 1ms LOW level. Using some simple math you will notice you need 38 samples at 38Khz to output a value for 1ms…
    Then you just output that waveform on a AO channel.
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Can I use two FP-AO-210'​s and one FP-1000 to obtain 16 channels of analog output?

    Hello All,
    I'm new to both Fieldpoint and LabVIEW.
    I'm developing a control system that requires at least 9 channels of analog-only output. I have been trying to connect two FP-AO-210's to a single FP-1000 by connecting one FP-AO-210 directly to the FP-1000, and the second FP-AO-210 to the first FP-AO-210. However, Fieldpoint Explorer only detects the network interface and the first analog output module.
    Is this configuration correct? Or, do I need a FP-1001 in order to use a second FP-AO-210?
    Does anyone have any alternate suggestions on how to obtain at least 9 channels of analog output?
    Thanks,
    Eric W

    Eric,
    One FP-1000 (or FP-1001/160X/20XX) can control up to 9 IO modules. If the second FP-AO-210 is not being detected by FieldPoint Explorer there are a couple things to check. First check to make sure that all of the terminal bases and modules are firmly connected to each other.
    Next, check the Power & Ready LED of the FP-AO-210 at address 2. Both LEDs should be lit. If they are not, de-power the system, remove the modules and terminal bases and make sure that you do not have any bent pins. Re-assemble and power up the system. Use FieldPoint Explorer again.
    If the module is still not detected, take a look at the addressing of the detected modules. The system should be detecting the first FP-AO-210 at address 1 (or 1 + a multiple of 10 if you have s
    et the FP-1000 to a different address). If the FP-AO-210 is at a different address, then it is likely a problem with the addressing circuitry either in the network module or the terminal base. Try swapping the positions of the two terminal bases and try again. If it works, then the error is in the addressing circuitry of the terminal base, if not, then it is in the addressing circuitry of the network module. Note: bent pins can also cause this.
    Regards,
    Aaron

  • I am using an NI PCI 6024 E board device for an analog output application. Can I generate two independent waveforms, one on each analog output channel?

    I am using an NI PCI 6024 E board device for an analog output application. Can I generate two independent waveforms, one on each analog output channel? In attach I send a example of my vi to control one chanel, but i need to control both but with diferent waveforms.
    Is the vi correctly programed to this propose?

    Yes you should be able to do that. look at the signal generation examples shipped with LabView
    You can create a 2 D array, with each row representing a wave form per channel. The number of points of the wave form (per row of the 2 D array) represent the number of points in the output buffer
    The wave forms can have different amplitudes/shapes, and therefore they are independent in this sense.
    However, you need to set the update rate,which is the same for both channels. The update rate together with number of points per buffer determines the frequency of the wave forms. This means the two wave forms will have the same frequency.
    To have different frequencies, you need to have say, on wave form with one cycle per buffer, and the other waveform have 2 cycles
    per buffer. in a case like that the frequency of the second channels is twice that of the first channel, and so on
    The two wave forms are then not truly independent, they may have different amplitudtes/shapes, but related in frequency.

Maybe you are looking for