Digital, analog output file trigger

Hello

I'm trying to produce an analog output to text file. I have attached the text file with entries and file vi. When I connect oscilloscope, there is no waveform.  I'm using labview for two days. What is wrong with my code?

Everything is OK now, I had a problem with the clock on board.

Tags: NI Software

Similar Questions

  • analog output digital start trigger the api c

    Hi, I'm trying to start analogue output based on a digital trigger (either PFIO or a PXI line) I can make this easy in LabVIEW.  However with the C API (through the Python wrappers), the problem is when I call DAQmxBaseWriteAnalogF64, writing will always be timeout that the acquisition was not triggered.   However, I can't call it after the trigger occurs, because obviously, it will be too late.

    I can't find any examples of C API where the analog output is triggered a digital triggering.  I can find for the analog input, but is fundamentally different that you can CONV read anytime after the trigger occurs.

    Python code as follows (functions are equivalent ot C API, even if you have no need of ot pass the task handle such that it maintained as part of the Task object)

    # create analog output task
    analog_output = Task()
    analog_output.CreateAOVoltageChan("Dev1/ao0","",-10.0,10.0, DAQmx_Val_Volts, None)
    analog_output.CfgSampClkTiming("",outputRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, numSamples)
    analog_output.CfgDigEdgeStartTrig("/Dev1/PFI0", DAQmx_Val_Rising)
    analog_output.StartTask()
    analog_output.WriteAnalogF64(numSampsPerChan=numSamples, autoStart=False,timeout=1.0, dataLayout=DAQmx_Val_GroupByChannel, writeArray=data, reserved=None, sampsPerChanWritten=byref(samplesWritten))print("Analog output: Wrote %d samples" % samplesWritten.value)# create digital trigger dig_out = Task()dig_out.CreateDOChan("Dev1/port0", "", DAQmx_Val_ChanForAllLines)
    
    # create digital trigger function
    highSamples = 1000
    numpts = 3 * highSamples
    doData = np.zeros((numpts,), dtype=np.uint32)
    doData[highSamples:2*highSamples] =  2**32 - 1
    
    # send digital trigger
    doSamplesWritten = c_int32()
    dig_out.WriteDigitalU32(numSampsPerChan=numpts, autoStart=True, timeout=1.0, dataLayout=DAQmx_Val_GroupByChannel, writeArray=doData, reserved=None, sampsPerChanWritten=byref(doSamplesWritten))
    print("Digital output: Wrote %d samples" % doSamplesWritten.value)
    

    Hi PatrickR,

    You can review examples of code NI-DAQmx (ANSI C) text based on the production of an output using a trigger to start digital analog. If you included/checked support textual dusing your NI DAQmx driver installation, you can navigate to Windows start > all programs > National Instruments > NI DAQ > Teaxt-Based Code support > ANSI C examples > analog output > generate voltage > Mult Volt updates-Int Clk - Dig start. If you have questions/doubts about the material.

  • Trigger start analogue does not work for the tasks of the analog output

    Hello. I wonder - what someone has tested the trigger mode analog start for continuous output voltage-. example of VI under hardware input and output - analog output folder in the Labview.

    My camera's SMU-6358, who has two lines APFI and supports analog trigger. Although it is very difficult to find information on the use of analog trigger for analog output of the tasks, what I've learned so far is to connect the interested analog trigger signal (such as an external noise) on both the AI channel which is used as a source of relaxation (ai0 in my case) and a two-channel (APFI0 in my case) APFI.

    During the test the example above vi, any level of relaxation that I put (even with 0), the task of output did not work at all. No error message is returned either. Just for your information, I do physical tests, not only the software simulation, so no signal means no signal.

    Any help is appreciated!

    I have here is that the solutions to this issue, just want to say thank you to all who have helped me on this subject.

    Use the analog analog trigger output tasks, make sure that the trigger signal (input HERE) is connected to APFI0. There is no need to connect the trigger even signal to ai0 if you do not want to save the trigger signal. However, if you do not want to save the trigger signal, connect the trigger signal to both ai0 and APFI0 with a signal splitter. In the latter case, the task of the AI shouldn't take the same trigger that the task of the ao. This means that you can start your registration with or without a trigger, while leaving the task of ao wait a trigger of some signal. This is useful in a situation that you only want to generate ao task to a certain trigger event, as when a signal reaches a certain level of sound pressure.

  • Redeclenchables/continuous to a custom waveform analog output?

    Hello

    I try regular output an analog signal using the box USB-6211 and Labview2009. I looked at various examples of waveform, including the retriggerableAO.vi example, but I can't seem to understand how to send a 'waveform' custom stamp (terminology is perhaps the question). In all the examples (including waveformbuffer), I ran across the single waveform, the options are sine, square, etc.  Previously, I posted on this forum looking for hardware suggestions (link here) and explained what I try to do and got the big help. To sum up, I would like to read a 'waveform' from a text file, send it to the usb-6211 buffer and then continue to an analog channel. At the same time, I'll use the beginning of the analog task to trigger a digital signal once per cycle as well.

    I got in what concerns the establishment of the waveform, but am stuck to figure out how to get into the buffer and setting the frequency, etc.

    Thank you

    Gabe

    Hi Gabe,

    Dennis is correct that it will take some room to modify the existing screws to fit your need.  As he says, the Con Gen tension Wfm - Int Regeneration.vi Clk - no example provided with LabVIEW.  In the example, it can be shown that there is a custom VI used to explain the problems that arise when a waveform of a given frequency to a frequency of sampling and outputs analog specified.

    With all that said, it seems you want to read from an existing waveform file that you created and this waveform to an AO output channel.  There are a few things that will be needed to know before proceeding:

    -What is the waveform as you try to output (5000 samples, 10 k, 100 k, etc.)?

    -What pieces of the size of the wave you want output (100 samples at a time, etc.)?

    -you want to again and again, or simply run through once the waveform looping?

    Assuming that you already have the waveform and will only step by step, here's what I would like:

    -break the large waveform into smaller pieces of waveform of standard size

    -import the waveforms in LabVIEW and create an array of waveforms

    -bring the waveform in the example Dennis mentioned previously with automatic indexing enabled on the tunnel

    -Remove the generator of wave functions existing the while loop

    -wire your indexed table of waveform for the data of the VI DAQmx of analog output terminal

    It is possible that you will have to play with the settings of your waveform and timing of your VI, but this should be a good starting point.  Please let me know if something is not clear or if I have misunderstood your original message.  Have a beautiful reast of the day.

    Best,

  • How can I check if the counter entry is synchronized with the analog output?

    Hello

    I'm working on an application for counting photons.  I use two channels of analog output on a PCI-6713 card to send a frame model to a set of XY scan mirrors.  I then a photon count unit that emits a TTL signal when the photons are detected as a result of this raster analysis.  I then use a surfboard USB-6211 to count the edges on this TTL signal.

    I have problems that seem due to synchronization problems.  I use the sample AO on the PCI-6713 card clock like the door of my meter on the map USB-6211.  I use a trigger to start digital to analog output and a trigger of arms for the entrance to counter early. Is there a way to check that the analog output and counter entry of start of operations at the same time and are are synchronized?  I basically want to monitor and compare the ao real sample of the PCI-6713 card clock door signal used by the jury of the USB-6211.  I was able to export the sample AO clock and watch it on my oscilloscope, but not the signal from the door of the USB-6211.

    Thanks for your help,

    Brian

    Update... It turns out that there is no problem of synchronization between my meter input and the analogue output.  There was a difference of impedance when I connected my unit of counting photons to my USB-6211.  This caused an error variable count rate.  After accouting for this shift, the problem disappeared.

  • How can I pause and resume the analog output using DAQmx?

    I use a DAQ hardware to produce an analog waveform.  I would like simply to break the output of the wave and then resume where it left off.  I use DAQmx and LabVIEW 2011.

    I've seen examples that use a digital or analog break trigger, but I would take a break in the software only.  How can I do this?

    -Joe

    Hi Joe!

    I spent some time thinking about it and I realized that you can technically use a fundamental mission of the analog output, as you previously wrote that runs continuously. However, the generated output samples are controlled by the sample clock pulses, and can be manipulated to fit our needs "suspension."

    To do this, we will need another counter task that generates a pulse train (see our examples of shipping under material input and output > DAQmx > generating digital pulses > generate dig Pulse Train - Continuous.vi) that stops and starts the user to choose. This can be in another quite VI or controlled by software. We will use this as the task of our output sample clock.

    Then, the task of the AO, wire a constant to the sample clock source and select ' DevX/CtrXInternalOutput"based on the counter that you specified in the task of counter. You will need to choose "I/o name of filtration" and check the box that says "include advanced terminals' and right-click of the constant. See picture attached as a reference. In this way, the task of the AO is constantly running, but it generates only actually all data when the meter running task.

    Let me know if you have any questions!

    Have a great day!

  • 6071E analog out and trigger to the end

    Hi, I'm here a trivial question: using PCI6071E, at the end of an analog output, is it possible for a trigger to output or update a number line?  for example, we hope when the last MONOSTABLE one sample is done, a digital HIGH is generated to power a switch.  I can think of have an analog and digital task task and the digital task at the end of an analog task in the program, but I don't know how long the delay would be. The best ways to do this? Thank you!

    Analog output: finished/large size but NOT via the trigger of FIFO, internal CLK software,

    on DAQmx / C + c++ / WinXP

    eLions,

    Analog task followed by a digital task that you thought would work, but it would be a delay of small software timed as you thought it would which can cause problems. If it's an analog output of finite size (say 1000 samples), what you can do is to synchronize the digital and analogue tasks together and have a digital low for 1000 samples, with the 1001eme exit on the digital line being the maximum. It would make no delay, as analog and digital line should be sharing the same frequency. C++ examples provided show how to sync analog analog output, which can be changed by the digital output.

  • Analog output of access on fly buffer

    Hi all

    I have a X Series DAQ and made many analog inputs and output tasks. My question is that can an analog output buffer be accessed or modified during execution of the task? I have a redeclenchables analog output task, and I want to replace the buffer after a trigger is done before the next coming. Is this possible? Or put it in general, how can access us the buffer without re - create the task?

    Any comment is welcome. Thank you.

    Hi Skuo1008,

    Which development environment you use to write this code? You mentioned a textual DAQmx function above in this post. Using LabWindows/CVI or ANSI C?

    Take a look at these examples:

    Generation of analog waveform with update with DAQmx output buffer
    http://www.NI.com/example/25039/en/

    I have also attached to this answer

  • To input analog shutdown when the analog output is completed and synchronization

    Hello

    I'm trying to get my LabVIEW program to send analog output to a computer and read acceleration using the cDAQ-9184. Chassis output that I use is the NI 9263 and the chassis of entry is the NI 9234. I generate a signal of white noise using LabVIEW Express signal generator.

    The first problem I have is the synchronization. I had an old VI that has begun to measure the acceleration just about a second after the entry has been given to the machine. I used the LabVIEW tutorial on how to sync the analog input and output, only to discover that it does not work with two different hunts. Then I found another tutorial that shows how to synchronize different frames between them.

    The second problem is the cessation of the LabVIEW program. What I want to do is to generate the signal and then simultaneously send and read the input and output analog, respectively. It is because I don't want a phase difference or any shorter signal for a direct comparison. But as soon as the signal is sent to the machine, I want the entry to stop analog playback and then then the LabVIEW program must stop. I want to be able to choose any length of signal to be generated and stop as soon as the entire duration of the signal has been sent to the machine.

    I tried 'DAQmx stop', "DAQmx Timer" and 'DAQmx's task made?' and none of them have worked for me. It is also my first time on a forum posting, so I hope I gave enough information. I enclose my VI as well. The VI shows I read an entry for the analog input voltage, but I am only using this to try to get to the work programme.

    I'd appreciate any help I could get.

    Thanks in advance

    Peter

    Hi Peter,.

    I have some recommendations for you that I think you will get closer to your solution. First of all, I assumed you meant that you had 1 chassis (cDAQ-9184) who had two modules in it (NOR-9263 and NOR-9234). My next steps are based on this assumption, so if it's wrong, please let me know.

    For your first question about the synchronization, the code you provided is very close to what you need. You need to do, however, implement architecture master/slave for startup tasks DAQmx functions. To do this, you can add another frame to the flat sequence structure and put the master start task (input voltage) after the start slave (output voltage) task.

    To manage your second question and that the program ends at the point where you, the first step is to get rid of all the logic that you use with the local variable of length of time. Rather than use this logic, just wire the node "task performed?" of "is task performed?" operate to stop the loop. This will cause your loop to stop as soon as the signal is sent to the machine.

    I have some other recommendations for you that will increase the performance of your program:

    (1) rather than writing on file inside the last loop, you can use the DAQmx Configure Logging (PDM) .vi. You will place this VI between DAQmx Timing.vi and DAQmx Start Task.vi to the task of the analog input voltage.

    (2) after the last while loop, you want to stop the task and analog outputs as well with another DAQmx stop Task.vi.

    (3) rather than using a local variable for the entrance of displacement and wiring it in the DAQmx Write.vi, you can wire directly from the output waveform of the wave to build function node.

    That should help you get started in the synchronization of these tasks.

    -Alex C.

    Technical sales engineer

    National Instruments

  • How to control the two analog outputs at a time

    I'm new to LabVIEW and have some problems in DAQmx with control outputs analog multiple.

    I want to set up a platform using BNC-2110 and PCIe6363 to control two rotating mirrors. The problem that I can only give an output (AO0 or AO1) at a time and I really have no idea how revise my LabVIEW diagram to control two outputs at the same time I met. I tried to change the outputs and it keeps a mirror turning instead of the old. Could someone help me with my problem and I would really appreciate. This is my blocked diagram and front.

    Hi zrmaker,

    As mentioned by RavensFan, you should not create 2 analog outputs different tasks if you use AO0 AO1. To your façade > physical control or the channels > select the drop-down list of the control channel physical (s) > Browse > hold down the CTRL + select the AO0 and AO1 > Select OK. Once this is done, you will see that your control or the physical channels has the following input values: "Dev1 / ao0:1" which means that you will access to AO0 AO1.

    In regards to writing DAQmx, simply select Analog > multiple channels > samples multiple > 1 waveform (you should get the following: 1 d Analog Waveform NChan NSamp). Once done, you can just use table build to combine 2 different waveforms and plug in this table to DAQmx writing output. The first index will be the output for AO0 value and the other will be for AO1.

    You can check this link on how to read or write from several channels: http://digital.ni.com/public.nsf/allkb/0C1ADEF06A54AB2D862575040066FD51

    Additional reference:
    http://www.NI.com/white-paper/2835/en/

    Hope that helps.

    Warm greetings,

    Lennard.C

  • read the output of a path of analog output current voltage

    In DAQmx if you are unsure of the status of a digital output port, you can take a reading on this subject.  When I try this on an analog output, I get an error.  Is it possible to query the status of the output of an analog output?  I realize that I could follow the State with a variable, but a direct reading would be really handy.

    Hello, GIS.

    There is no way to read the output in the AO modules without wiring physically the signal to a module to HAVE.  You are able to use a variable to read the current value of the output, as you mentioned earlier.

    Channels AO multifunction boards, however, can be read through tasks of entry by rounting in-house channel to read ao vs aoground.

    Lisa

  • variable phase shift between two analog output signals

    Hey! I would drive two different piezo elements with an sine - / square signals and have a phase shifted output signals. After some trail and error, I was able to get a second analog output on my card PCI-6221 (using LabView 8.2) also allowed me to have different amplitudes for both signals. However, I could not output signal having a frequency different and most importantly to my request to have one of the signals variably shifted phase.

    Thanks for the very useful suggestion. I have attached the file .vi installation I've run so far.

    Hello!

    A way to generate waveforms is using the analog waveform Toolbox. I created an example VI that is attached and that shows you a way to use the base generating function VI. I saved for LabVIEW 8.2.

    I hope this helps!

  • Read analog output channel value internally

    According to this you can read the values of analog output of return without having to physically connect the wires.

    By using the technique described in the example given (DAQmx_Read_Output_Internal_Channels.vi) I'm reading a current area of OCCUPANCY on my compactDAQ cDAQ-9174 with a module of analog output current OR-9265.

    The output channel is created in MAX and my vi can write values to him without problems

    But when I try to create an analog input channel to read the output, an error occurs.

    What I am doing wrong?

    This is not supported by my hardware?

    Or is the example given in the above incorrect link?

    The example is 10 years old. Maybe, it does not work in LV2013.

    Hi Jocker,

    The link was not attached to your message, but I guess that's it: http://digital.ni.com/public.nsf/allkb/CB86B3B174763C3E86256FFD007A2511 as there the example of vi you mention.

    The error you are getting is due to the use of the channel for analog output and trying to configure the task as a task of entry. You must use _aoX_vs_aognd as the channel of the task rather than on the output channel. This compares to the ground for the analog output values.

    The NI 9265 is not on the list of the C Series modules that have internal channels:

    http://zone.NI.com/reference/en-XX/help/370466W-01/mxdevconsid/9211interchan/#GUID-E13ADE46-5CB8-491...

    So I guess that the module is not able to compare its output to ground. He would appear in the dropdown of the channel names if available.

    Pete

    Applications Engineer OR

  • DAC (analog output through sreapder?) on Spartan 3 FPGA

    Hello world

    I searched on LabView training exercises for the 3rd Spartan Board, specifically the DAC.vi and the DAChost.vi in the exercise 8. The screws are in the solution folder, but there no real explanation for the DAC specifically in Scripture in the exercises section. I was also watching Xilinx in the Board Manual, but I can't seem to find the answer to my question.

    My goal is to be out put an analog signal that is adjustable between 0 and 3.3V as a control to another system while the rest of my code is running. Of course, the premade DAC vi can be used to put analog voltages on the DAC pins, but I wonder is - it possible to the analog output of the signal through one of the connectors spreader (while the other digital connectors are also output)? It seems like it should be, but I don't know how to implement. If this is not possible, then well, I guess I have a big problem

    Thank you

    The only place where the DAC would release would be the pin of the DAC.  I doubt that there is other options routing so that the PIN because you can't get an analog signal by an FPGA.

    Kind regards

    Matt M.

  • Analog outputs with different time scales

    I use products AO of a card PCI-6731 for an application scan head and I have some difficulties to achieve peak performance, that I need. I am contolling the map with nidaqmx drivers in c ++

    Basically, an output controls scanning in the direction Y (which is a line of scanning and is very fast) and the other in the X (increment once per scan line, so much slower). The complication is that both exits start at an external trigger, because positioning is synchronized to a separate data acquisition card.

    Now, what I do is:

    -write the scanline for 0 output waveform

    -set output 1 to a given position

    -say next Trigger output card

    -hangs at the end and stop tasks

    What I really want to do, it is just tell him to start with on each external trigger output waveform of scanline 0 and output 1 increment to the next position. So I could do a complete 2D scanner with a minimum of control software.

    Any ideas on how I could best achieve this? My understanding of the nidaqmx drivers I don't see an elegant way to do it.

    I could potentially do some operations on the done callback, although it makes me a little nervous because the control PC running windows, it is not a real-time operating system.

    Hmm I do not know exactly but there are a couple of things (it is close)...

    The output frequency of meter in your example 5 MHz (20 MHz, 2 high ticks, weak 2 ticks), which is faster than holders 6731 for a sample clock.  I thought that this would have given a material error... are you looking for errors once the task runs (for example using DAQmxIsTaskDone)?.  There is a DAQmxCreateCOPulseChanFreq if you want to set the clock frequency directly (it will use the appropriate default internal time base).

    The task of counter generates 1000 pulses per trigger, is what determines the number of samples generated by the trigger (I assume that you want it to be 1024 aka "numSamples").

    The analog output task must either use:

    (1) calendar continuous if the output will repeat indefinitely as several triggers are acquired.

    (2) finishes pitch (N * numSamples) samples where N is the number of lines that you want to exit and numSamples is the number of samples per line.  In this case, the task will end once the lines were triggered.

    Best regards

Maybe you are looking for

  • Blocking of the appellant 'unknown '.

    I get at least three calls a day from the appellants 'unknown '.  I don't touch my phone when these calls come, because I suspect there is some malware attached when the call is answered or if I responded in kind.  I just let it ring until the call i

  • Short hard drive DST fail – HP ENVY m6-1155eo Notebook PC

    Hello I'm laptops: HP ENVY m6-1155eo Notebook PC, I use Windows 8.1 64-bitMy hard drive is causing my computer to freeze and a lot of blocking problem, which makes my computer unusable because I use it for audio work and a LIVE audio work. So I check

  • How much memory left on iPhone 5

    I am running the latest OS and software on my iPhone 5 and the iMac. When I sync the iPhone in iTunes, iThunes indicate that I'm 5.35 GB of memory left, but on the iPhone it says I have only 3.7 GB left. Why this difference?

  • Equivalent DAQmx claims NIDAQ orders

    Then I start to excavate in the VB6 code that has been written about 8 years ago by one of my engineering students.  Best I can tell, some of the first calls the NIDAQ functions are: INIT_DA_BRDS() AO_VWRITE() Basically, he checked to see if the stat

  • Upgrade to XP 7

    I heard the upgrade directly to 7 from XP is going to be super painful.  I see the Microsoft Web site meantions none of this, but seems to be forcing people to buy Vista and get a free upgrade to 7 when it is released.  Is it true that the update of