Agilent 33500 B configuration of duty cycle

I use the function generator to Agilent/Keysigt 33511 B to produce a square wave with offset, amplitude and frequency specified. However, I'm unable to set the duty cycle. Is there a VI to control this setting?

Hi jmountney

If you use this driver , I think that there is a function named .vi configures signals Standard Advanced (square) and it has an entry for the duty Cycle, so I think this could help you.

Tags: NI Hardware

Similar Questions

  • Create a waveform using PCI-6723 AO with various time intervals on the trailing edge of the sample of 200 Hz clock and 0.1% duty cycle

    I use the PCI-6723 card and I am trying to produce a model of waveform using the analog output channel. The wave consists of 5 different voltage levels. The main problem is that the first 4 voltage levels are supposed to have 926 microseconds time intervals and the time interval the last voltage level is supposed to be 1,296 milliseconds. In addition, the waveform must be triggered on the trailing edge of a sample clock of 200 Hz with a 0.1% Duty Cycle. Is it still possible? If so, any help would be greatly appreciated. Thanks in advance!

    Here is what I currently have, but it does not fulfill my purpose.

     int32   written;
        float64 data[5] = {-0.23, 0.38, 1.12, 1.78, 0.10};  //volts
        //long  time[5] = {  926,  926,  926,  926, 1296};  //microseconds
    
        // DAQmx Configure Clock
        DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
        DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,200,0.001));
        DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,1));
    
        // DAQmx Start Code
        DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));
    
        // DAQmx Configure Code
        DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
        DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev3/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev3/Ctr0Out",1000.0,DAQmx_Val_Falling,DAQmx_Val_ContSamps,5));
    
        // DAQmx Write Code
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,5,0,10.0,DAQmx_Val_GroupByChannel,data,&written,NULL));
    
        // DAQmx Start Code
        DAQmxErrChk (DAQmxStartTask(taskHandle));
    

    Bingo. This code seems to work much better. Looks like I had to reduce my number of samples per 1 to fit the waveform desired in 5 milliseconds of the sample clock delay.

    However, if someone knows a better way to achieve these results, I am open to all ideas.

    void CDevDlg::OnRdr1e1()
    {
        float64     data[4000];
        float64     volt[5] = {-0.23, 0.38, 1.12, 1.78, 0.10};  //volts
        int x=0,d;
    
        for(int v=0; v<4; v++)
        {
            for(d=0; d<741; d++)
            {
                data[x++] = volt[v];
            }
        }
        for(d=0; d<1036; d++)
        {
            data[x++] = volt[4];
        }
    
        // DAQmx Configure Clock
        DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
        DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,200,0.001));
        DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,800000));
    
        // DAQmx Start Code
        DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));
    
        // DAQmx Configure Code
        DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
        DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev3/ao0","",-0.5,2.0,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",800000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,4000));
        DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandle,"/Dev3/Ctr0Out",DAQmx_Val_Falling));
    
        // DAQmx Write Code
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,4000,1,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL));
    }
    
  • Strict &amp; Duty cycle value changes - every time

    Hi all

    IM using pcie 6320 to measure the frequency and the use of a signal.i factor tied my vi & data measured for reference. Values in red, is my frequency and duty cycle but values real changes for all the 1 sec. Please correct me if I am wrong.

    You must set the CI. Pulse. Freq.DigFltr.Enable and CI. Pulse. Freq.DigFltr.MinPulseWidth.

    You have selected CI. Freq.DigFltr.Enable CI. Freq.DigFltr.MinPulseWidth.

    These are two different types of task meter entry (although they are called unfortunately very similar to the other).

    Best regards

  • Duty cycle issues update

    I use a counter that is generated by a PCI-6110 to switch a relay to solid state that enables or disables a heating unit. I update the duty cycle based on the output of a PID controller (0 - 100 output of PID VI gets scaled to a cycle of 0.001 to 0.99). The question is after two iterations, the written property node is no longer the output of PID on the scale to the task and it seems 0 as the default value.

    Many meter generation examples use event structures to detect a change in the duty cycle and pass that to the task. But structures event detect changes in values if the value is written in a local variable and not typed in a CNC? I feel that the answer should be 'Yes'... but in the case I tested it seems to be 'no '.

    Don't adjust the precision of a digital indicator / control limits the number of significant digits does a calculation? I would limit my duty cycle to 2 decimal places - i.e. 0.3342 and 0,3313 the two would be 0.33. In this way the cycle is not unnecessarily updated.

    The temperature is read by a PCI-4351... which may arise under? blocks if you have not installed the drivers.

    arcranda wrote:

    Many meter generation examples use event structures to detect a change in the duty cycle and pass that to the task. But structures event detect changes in values if the value is written in a local variable and not typed in a digital control?.

    To have a triggered event when a value is changed programmatically, create a Value property node (signaling) and the new value of wire to it.  This will trigger a change of value for this variable event.

    arcranda wrote:

    Don't adjust the precision of a digital indicator / control limits the number of significant digits does a calculation? I would limit my duty cycle to 2 decimal places - i.e. 0.3342 and 0,3313 the two would be 0.33. In this way the cycle is not unnecessarily updated.

    .

    Changing the properties of display to show only 2 decimal places does not change the numeric value stored in memory.  You would have to round up the digital to two decimal places.  To do this is to multiply the number by 100, change of an integer (this will lose the remaining decimals), then divide the result by 100 to get again the two decimal places.  When changing to an integer, you will need to round to the nearest integer to make 0.3299 0.33.

  • How to generate the digital output of the variable duty cycle and clock source being contrary?

    I want to generate a digital pulse every front amount of my pulse counters. He must have a variable duty cycle. until now, I've been able to generate a digital output, but I can't change its duty cycle.

    pls tell how I should proceed?

    Thank you in advance...


  • Get the duty cycle of DAQ to analog voltage input module

    Hello.

    I'm new to labview. I have an analog voltage input data acquisition module. I try to get the duty cycle of a square (generated from a function generator). What is the best way to go about this? When I use the vi to acquire an analog wave cyclical report, the values are incorrect.

    Post your VI as well as real data of your signals so we can see what is happening.

    Lynn

  • duty cycle PWM of PID.

    I'm trying to find examples of PID controlling the duty cycle of PWM. Is there a simple example? Helps share if you have.

    I coundn't find this topic in the viewfinder of the example


  • Frequency of signal and pulse duration varying as to reduce the duty cycle

    To sum up my problem, I am creating a period and the controlled voltage pulse sequence, but as I decrease my cyclical report, the distance between each pulse begins to become irregular. More precisely:

    I want to have three pulses, each a positive amplitude specified, long, with 23 ms between each 80 microseconds. After these three impulses, I would have a negative pulse of 3 * than amplitude, followed again by Ms. 23 this cycle must be repeated 260 times.

    I tried first of all to create the positive impulses to help simulate Signal VI, assigning a square wave with a frequency of 43.327556, an offset of 0.5 and the amplitude of 0.5. And the operating cycle as the default value of 50%, the signal seems to be normal (constant frequency and the duration of each pulse is equal;) "I'm in a position with an oscilloscope).  However, when you set the duty cycle for. 3466%, the time between each pulse varies and some legumes are longer than others. I wrote the data able to file directly from fake Signal VI to ensure that he was not only a problem of scope, but it seemed that writing to a file of measure has not sample enough points for me to accurately measure. Even decrease the market barely 10% factor, I see the question arise already.

    So my question is, I'm doing something wrong here? It is a kind offset of Labview to try to perform a duty cycle that small? And are there any alternatives to the way I have this set up? I thought I would try to use a train of pulses instead, but I'm not very familiar with this and I know, you can't control the amplitude of the pulses.

    Any help is appreciated! Thank you very much.

    My guess is that you are limited by the sample rate. If the difference between the two signals time is less than the sampling period (1 frequency / sampling), you will not be able to generate the signals you want.

    Please tell us the sampling rate, you use and the settings that work and those that do not. If your data file is not too big, please post so that we can see some data. Post your VI can help too. Check the default settings before you save the VI.

    Lynn

  • measure PWM duty cycle

    Hi all

    I have never done in time real before LabVIEW and have a pretty simple question.

    I know that there is a measure of pulse width as VI in the palette of waveform and it can be used to measure the duty cycle and frequency of the PWM. My question is, is it necessary to use this measure of vi on a platform time pulse width real (compactRIO, compactDAQ etc...) so that it works? In other words, can I just use normal LabVIEW to measure the duty cycle and frequency of the PWM?

    Is there an alternative to the duty cycle and frequency of measurement without using compactRIO or compactDAQ platform? My concern is because I did no real time programming and the deadline is tight and there is not a lot to invest in learning programming in real time.

    I just want to know the experiences of others who have done it before.

    Thank you

    Yours sincerely,

    chati

    Oh yes RT is not really necessary for sample DAQ of things like that.  If you have a condition like assess each cycle of a PWM, and if the signal falls then to send a command within the period of a cycle, then you want RT or FPGA to respond deterministically.  But if you agree with a bunch of samples taken, then evaluate the data after having been taken then a cheap DAQ card probably will work fine.

    Speed can be a matter of concern.  Lets say you have a square wave of 1 kHz at 50% duty cycle.  If you enjoy at 2 kHz, then you should be able to see that the signal is weak for a sample, then up for a sample and you can determine that the signal is at duty cycle of 50%.  But if you have your wave to the duty cycle of 10%, while most of the time, you will see two samples of low, thinking that it's 0% duty cycle, but then from time to time you will get a top and a bottom and get 50% of reading, who don't agree.

    This is why it is recommended that you enjoy at a rate at least 10 times faster than your input signal.  So if you have an example of signal of 1 kHz to 10 kHz.  Then, if your duty cycle is 10%, you will see a small sample of top and 9.  But even that might not be enough if you need to have more precision to your measurement.  Fortunately, NEITHER sells cheap and expensive material for that.  The hardware cheaper that might work for you is the following:

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/212383

    or perhaps cela

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/212384

    But you probably want to call OR and describe your situation and they can recommend the best material to use if you are not familiar with their offers.  Depending on your situation, you may be able to use an Arduino too.  NOR has a toolbox where it can collect samples and send them via USB.  The sent message can be the rated frequency and the duty cycle, but once again it is quite limited and does not have any help from NEITHER a material point stand, they provide just the box tool.

  • Waveforms digital output duty cycle glitches

    I try to use a square wave converted to digital output to operate some solenoids but seeing some problems with the cycle on the digital waveforms. The output frequency will always be of the order of 1 Hz and duty cycle must be adjustable to integer values. I have attached a simplified below, demonstration that shows the digital/analogue output VI I used initially. the problem with this VI, is that if I choose a cycle that is not a multiple integer of my samples for waveform I get seeds. If I use the Boolean digital VI table this problem disappears in my simplified code, but in my real program the problem reappears.

    This image shows the waveform analog generated as well as the digital output that results.

    In the digital waveforms, you can see that the duty cycle of 50% is sometimes applied during the single loop (~.2us) instead of more than 1 sec iteration, although the curve of actual load indicated in the table at the bottom seems to suggest that LV ignores this glitch (somehow). As I said, the problem disappears if the duty cycle is an integer multiple of the sample/loop. Timing of the loop is torn apart by other e/s to 2 000 Hz/400 samples per loop and 100 Hz/20 samples per loop (large enough VI otherwise I would include it). Obviously, I could change them to get 50% as a multiple, but this does not solve the problem if user needs to adjust from there.

    Can someone point me in the right direction here? I'm sure that there is a stupid/easy solution, but I can't seem to get.

    Thank you!

    You might try turning the inputs A and B of waveform of the VI of the digital samples append.  It seems that A should be the fate of the shift register data (the original data) and B should be added (the new waveform) data anyway, at least conceptually.

    Paul P.

    Engineering applications

  • Duty cycle of measurement using digital inputs DAQ

    Hi all!

    My system has a PXI-8269 card and I want to measure the duty cycle of the Digital PWM signal generated by a device.

    To acquire this signal, I'll use a digital DAQ (PFIx) instead of a counter of data acquisition (CTRx) (they are already used for other applications).

    The search of the database of examples, I found live who use meters. So I wonder if it is possible to do that and how could I.

    Thank you!

    Sorry, the correct reference is PXI-6289.

    I was determined to acquire a digital waveform, converting it to an analog waveform and then using the correct function in the range of functions->-> Analog wave.

    Thank you!

  • How to read the duty cycle of a Boolean 1 d array

    I'm reading a digital signal using a single line of a card PCI-6503. The entry I want to enter will be 1 Hz with a 50% cycle. Otherwise, it will be always on or always off the coast. So I need to be able to tell if he's going in the flashing, constant on or regular offshore.

    I tried different ways to convert the signal to a digital wave, then to an analogue, I can use the vi measures pulse that will tell me the duty cycle, but not luck. Threw everything and I cry for help.

    A starting point:

  • Changing the duty cycle of PWM on during the race

    Hello

    I am trying to generate a my C Code PWM signal.

    It works fine except for the fact that I can not change the operating factor during execution of the generation of PWM signals.

    Here's what I do:

    //Init DAQmxCreateTask("masterP",&task_pwmout);
    DAQmxCreateCOPulseChanFreq(task_pwmout,taskchans1,NULL,DAQmx_Val_Hz , DAQmx_Val_Low , 0.0,freq,duty);
    DAQmxCfgImplicitTiming(task_pwmout,DAQmx_Val_ContSamps,1000);
    DAQmxStartTask(task_pwmout);
    
    ...//Stop DAQmxStopTask(task_pwmout);
    

    It works well, but the duty cycle is fixed.

    I tried to change the cyclical report but it seems that the only way it works is like this:

    //Init DAQmxCreateTask("masterP",&task_pwmout);
    DAQmxCreateCOPulseChanFreq(task_pwmout,taskchans1,NULL,DAQmx_Val_Hz , DAQmx_Val_Low , 0.0,freq,duty);
    DAQmxCfgImplicitTiming(task_pwmout,DAQmx_Val_ContSamps,1000);
    DAQmxStartTask(task_pwmout);
    ...
    //Change Duty Cycle DAQmxStopTask(task_pwmout);
    DAQmxSetCOPulseDutyCyc(task_pwmout,taskchans1,duty);
    DAQmxStartTask(task_pwmout);
    ...
    //Stop DAQmxStopTask(task_pwmout);
    

    I have to stop the task, set the new cycle and restart the task.

    Unfortunately, it takes some time (~ 100 ms) which means that during this time, the PWM is turned off.

    Is there a way to change the smoother operating factor, so there is no gap between?

    Thanks in advance.

    Christian

    Hi Christian,

    You are right. Stop a restart of the task is a very slow way to adjust the pulse width. This page describes the option adjust the factor of market during execution by using the function "DAQmxWriteCtrFreqScalar". By calling this function in a loop, after the start of your task, you will be able to adjust the frequency and factor use of your task, simply by changing the settings.

    I would like to know if it works for you.

    Concerning

  • Agilent a54845a scope configuration

    Hi all

    I am configuring the Agilent 54845 a scope in LabView. I installed the necessary driver (hhttp://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E9118659CE034080020E74861) and placed the instrument on LAN. Successfully NI MAX sees the instrument, and I can send commands to the range through the NI VISA test.

    When I try the test "put hp54xx started.vi" LabVIEW present with the driver, then problems arise. I put the correct entry of the IVI (the name of scope recognized by NI MAX) successfully but I can't set option string (the VI runs only in Simulation = 1 mode); If I try to put the Simulation = 0, I get different types of errors, such as:

    1073807339 error has occurred hp548xx read Waveform.vi

    Possible reasons:
    Driver status: (Hex 0xBFFF0015) timeout expired before the operation is complete.

    Otherwise, same with the predefined settings:

    1074135024 error has occurred in hp548xx configuration Channel.vi

    Possible reasons:

    Driver status: (Hex 0xBFFA0010) invalid value for the parameter or property.

    Secondary error: (Hex 0xBFFC0003) parameter 3 out of reach, or an error occurred when setting setting 3.

    Development: range

    Am I facing some known problems? Can it be linked to the fact that I connect via LAN, while the pilot only mentions GPIB?

    Thanks in advance.

    The alternatives are to write your own driver or make changes to existing ones. The others are very viable if you have an understanding of the manual instrument and LabVIEW experience. The query id in the initialize function is a simple string comparison. Have you even looked at the block diagram?

  • duty cycle of 98% on myDAQ OR using LabVIEW?

    I am trying to output a square wave with a frequency of 100 Hz and a cycle of 98%, but when I do that with labview I just read a flat 5v and don't see all the edges. I can output the square using NI ELVIS(and having it work) wave, so I figure it must be doable with labview. Any sudjestions on how to make this work would be thank you much. I'm going to atach my file vi.


Maybe you are looking for