Generate digital signal for 6722 or 6221

 Hi,
first thanks for the help I already got on this board.
Now I've got the following problem:
I like to generate a digital signal: high for 300µs, low 300 µs, high 300µs, low 300µs, high for about 2ms.
I am looking for a solution how to generate this digital sequence. At the same time I will read the information back via an analog input (hopefully I have now a solution for this problem).
I tried to find examples but I wasn't successful. At the moment I was not able to produce any digital sequence which worked.
My hardware is either 6722 or 6221 - which should be OK regarding the timing.
Thanks
Solved!
Go to Solution.

Find attached example.
I am not allergic to Kudos, in fact I love Kudos.
 Make your LabVIEW experience more CONVENIENT.
Attachments:
Digital Waveform [LV 2009].vi ‏14 KB

Similar Messages

  • Generating digital signals (T/F) continuosly at certain frequency

    Please help me in generating digital signals continuously (TRUE/FALSE alternatingly) in LABVIEW 7.1. I want them to be crreated at frequency which can be controlled by myself. Kindly help its urgent. Contact me at [email protected] Thanks Rahul

    Have you looked at the shipping examples for DAQmx? What kind of DAQ card do you have?
    p.s. since all questions are answered here, posting your email does no good except put you on a list of spammers.

  • How do i split the digital signal for PIP?

    My tv requires 2 separate A/V inputs to use PIP. How do I split the incoming signal without affecting the signal strength to STB? Everytime I connect a slpitter, the signal looses stregth and I can't HD out of my STB only digital, not HD. Is there a fix or solution for this problem?

    DcmFD wrote:
    My tv requires 2 separate A/V inputs to use PIP. How do I split the incoming signal without affecting the signal strength to STB? Everytime I connect a slpitter, the signal looses stregth and I can't HD out of my STB only digital, not HD. Is there a fix or solution for this problem?
    It is just the nature of beast in that when you add a 2:1 splitter, you will lose 3.5dbm of signal strength (more loss per leg the larger the splitter.. IIRC a 4:1 splitter a is 7 or 7.5 dbm loss.)
    How many splitters do you currently have from the ONT to that STB? Do you have any 4:1 splitters in the path that you could swap with a 3:1 or 2:1 (leaving no open legs)? 
    I will leave it to someone else to recommeand a MOCA amplifier, but that may be you only possible solution. It would have to be a MoCA amplifier, as the STB requires 1150Mhz to receive guide info, etc.. A traditional signal booster typically does not pass frequencies higher that 850-950Mhz. 

  • How do i generate any signal for very small frequency

    Hi,
    I want to generate a sinusoidal waveform at f=0.01 Hz, which is a quasi-steady regime in pipe flow and is very important to generate such a small frequency-flow for me. However, when I enter the value of 0.01 to the related frequency blank and run the program, it always fails and give the same error which can be seen in the attachment "f=0.01.jpeg". When I go through the place where the error generates, I can not see any problem???
    My other problem is that:    For frequency range between f=0.05 Hz and f=0.1 Hz, I can generate the waveform, but the vi always detect the same frequency as 0.1 Hz. For all entering frequency values of 0.05, 0.06, 0.07 Hz,the program detects the same frequency of 0.1 Hz. But, after f=0.1 Hz, the program detect the correct frequency which is entered. i.e.,if I enter 1 Hz, the program detect 1 Hz after executation of the program or for f=10 Hz, it can detect the same frequency of 10 Hz.
    Could you please help me for my two problems?
    Attachments:
    Unsteady Pipe Flow AnalysisDEMO.zip ‏50 KB
    f=0.01.jpg ‏346 KB
    f=0.05.jpg ‏278 KB

    Hi Kyle A.,
    How can I eliminate the small vibration/perturbation on the sinusoidal signal as shown in the jpg file that I now attached? Could you please help me? I think it is due to electrical noise (power line noise of 60 Hz). Thank you again.
    Attachments:
    perturbation.jpg ‏308 KB
    Unsteady Pipe Flow AnalysisDEMO.vi ‏104 KB

  • Using a digital signal for home sensing on NI9512

    I have the following setup.
    cRIO -> NI9512 -> P7053
    I'm using an optical sensor and a flag for doing home sensing.  The sensor outputs high (~4.5V) when the sensor is inactive and Low (0V) when the sensor is active.
    In the axis configuration I have the option for syncing and sourcing only for my home sensor and do not have access to TTL/CMOS for digital logic.
    Is there something I am missing, or does my hardware setup require me to use limit switches for home detection?
    thanks in advance.

    Hi,
    On the MDR connector of the 9512 you have access to the forward, reverse, and home limits on pins 1, 11, and 2, repetitively.  You can see this on page 10 of the manual here: http://www.ni.com/pdf/manuals/374555d.pdf
    What do you mean when you say "TTL/CMOS for digital logic"?  Page 5 of the manual indicates that the limits work off of +5 VDC.  So your sensor should work, the device is not going to be able to tell what the voltage is coming from, whether is be a optical sensor or limit switch.
    Regards,
    Greg H.
    Applications Engineer
    National Instruments

  • Digital signal generation in cDAQ- 9477 with 1ms resolution.

    I am using cDAQ -9477 Digital card with 9178 chassis (USB) .I have to generate some digital signals for 2 seconds. The signal should be
    0 (3ms)  -   1(1ms)  -    1  (2ms)   & repeat the sample 0 (3ms)  -   1(1ms)  …….  upto  2 seconds.
    I had generated samples for 2seconds with 1ms duration of each sample.
    I am unable to do that with 1ms resolution in cDAQ -9477 Digital card.
    Is the above signal generation is possible (each sample -1ms) ?
    I am using LabVIEW2009 .I attached the code.
    Kindly let me know the suggestions .
    Attachments:
    Digital Signal.JPG ‏7 KB
    Digital.vi ‏40 KB

    cDAQ chassis do not currently support hardware timed tasks for digital modules with >8 lines.  The DAQmx help defines these devices as "static digital I/O modules".  The "Digital I/O Consideration for C Series Devices" section in the DAQmx help describes the capabilities of digital modules on different chassis.
    Unfortunately this means you are stuck with static (software timed) generation.  Over USB this will affect the accuracy of your signal.  You won't be able to achieve the signal you are trying to generate with the current support.  Static generation will max out at roughly 1kHz, but Windows can introduce a large amount of jitter.  What you really need is a hardware timed task.
    This is a feature that could be added in the future.  I recommend submitting a feature request, though I know that doesn't solve your problem now.

  • How to input/output a digital signal and acquire an analog signal at the same time?

    Dasylab, version: 8.0.04
    Acquirement Card: PCI1002L
    When I use DasyLab to acquire the analog signals is no problem without digital inputs and outputs,
    and when I use DasyLab to input or output a digital signal is no problem also, but when I do that at the
     same time, DasyLab tell me the rate is too high and stop.
    so, I searched the manual book1 (user guide) for that, it showed me :
    To internally equalize measurement time and system time in the analog input, digital input and counter
    hardware modules, use the following settings:
       Synchronization: PC Clock
       Sampling rate: <= 5Hz
       Block size: =1
    the problem is, if I set the Sampling rate to 5Hz, the speed of the acquirement datas is not enough for my
    application.
    so, how to improve it? who can give me a example programm for me. thanks!
    by the way, I come from China, my English isn't good, I'm sorry.
    Allen, China.

    Hi,
    Have things changed over the years?
    I need to syncronise a digital output (Modul NI9474) and an analoge input (AI-Modul NI9203) module. I need to measure time intervals from a flank in signal A to a flank in signal B. I would like accuracies of the order of 1 ms. Currently, the signals are not synchronised, with errors of the order of 2 times the block length (block size x sample rate), sometimes much higher. The best I got so far was a block size of around 20 with a sample rate of 1 kHz.
    If I use the master and slave settings on the RTSL settings, my program doesn't run properly.
    If I use digital signals for input and output, I can syncronise them with RTSL settings and everything is good, but I can't always do that.
    Also, if I do anything in the GUI (such as scrollowing something or going to another window), my output gets screwed up properly.
    1. What can be done to synchronise AI with DO?
    2. Is there something that can be done to avoid messing up the output when something happens in the user interface? (I know that I am messing up the outputs as they make some valves switch and that is loud).
    Thanks in advance!

  • How to get digital signature for Google Map geocoding V3 in PL/SQL?

    Hi, Gurus:
        Could anyone provide me an example about how to generate digital signature for Google Maps service v3 in PL/SQL? We tried to upgrade our program using Google maps service from v2 to v3. We are using PL/SQl on background to send request to Google for geocoding. We found some sample code to register with digital signature, but none of them is based on PL/SQl. Notice I used Google business client ID "gme-XXX" and wallet.
    https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures
    Google Maps API - more URL signing samples
    Here is my code for V2. I notice in order to get signature, I need to use HMAC-SHA1 algorithm.
    procedure Get_Geocoding(P_s_Address in varchar2, P_s_Geocoding out varchar2, P_n_accuracy out number, P_b_success out boolean) is
      l_address varchar2(4000);
      l_url varchar2(32000);
      l_response varchar2(3200);
      n_first_comma number;
      n_second_comma number;
      n_level_length number;
    BEGIN
      /* TODO implementation required */
      l_address:=APEX_UTIL.URL_ENCODE(P_s_Address);
      l_address := replace(l_address,' ','+');
      l_url := 'http://maps.google.com/maps/geo?q='||l_address||'&'||'output=csv'||'&'||'client=gme-XXX';
    l_response := utl_http.request(l_url, APEX_APPLICATION.G_PROXY_SERVER, '/u02/app/oracle/admin/apexsb/wallet', 'XXXXXXXX');
      n_level_length:=0;
      n_first_comma:=instr(l_response,',',1,1);
      n_second_comma:=instr(l_response,',',1,2);
      n_level_length:=n_second_comma-n_first_comma-1;
      P_n_accuracy:=0;
      if n_level_length>0 then
      P_n_accuracy:=to_number(substr(l_response,n_first_comma+1, n_level_length));
      end if;
      l_response:=substr(l_response,instr(l_response,',',1,2)+1);
      --dbms_output.put_line('In function: l_response ='||l_response);
      P_s_Geocoding:=l_response;
      if (P_s_Geocoding<>'0,0') then
      P_b_success:=true;
      --dbms_output.put_line('true');
      else
      P_b_success:=false;
      --dbms_output.put_line('false');
      end if;
    END;
    Thanks!

    Hi, guys:
        I tried to generate digital signature for Google map service
         Maps for Business: Generating Valid Signatures - YouTube
        Generating an HMAC-SHA-1 Signature Using Only PL/SQL
          OAuth and the PL/SQL | Data Warehouse in the Cloud
       but I got error message from Google:
    Unable to authenticate the request. Provided 'signature' is not valid for the provided client ID. Learn more: https://developers.google.com/maps/documentation/business/webservices/auth
       I think there is something wrong with my code to generate signature, as if I remove the part regarding client and signature, it will work, can anyone help me on this problem?
    /*Procedure Get_Geocoding is used to get geocoding with accuracy level for V3 business account, you can find Google map digital signature descrirption from
    https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures
    if geocoding is 0,0, procedure returns false to indicate failure of get geocoding*/
    procedure Get_Geocoding2(P_s_Address in varchar2, P_s_Geocoding out varchar2, P_n_accuracy out number, P_b_success out boolean) is
      --private key for Google business account, this is provided by Google with client name.
      l_private_key_src varchar2(200):='xxxxxxxxxxxxxxxxxxx';
      l_private_key_b64_alter varchar2(200):= translate(l_private_key_src,'-_','+/');
      l_private_key_bin raw(2000);
      l_client_name varchar2(100):='gme-xxx';
      l_signature_mac raw(2000);
      l_signature_b64 varchar2(200);
      l_signature_b64_alter_back varchar2(200);
      l_Google_service_domain varchar2(200):='http://maps.googleapis.com';
      l_address varchar2(4000);
      l_url varchar2(32000);
      l_path varchar2(32000);
      l_response varchar2(32000);
      l_page UTL_HTTP.HTML_PIECES;
      n_actual_length number;
      json_obj json;
      json_tempobj json;
      jl_listOfValues json_list;
      json_geom_obj json;
      json_loc json;
      l_lat  VARCHAR2(40);
      l_lng  VARCHAR2(40);
      l_status VARCHAR2(255);
      json_accuracy json;
      --temp_string varchar2(10000);
      n_first_comma number;
      n_second_comma number;
      n_level_length number;
      BEGIN
    /* TODO implementation required */
    l_private_key_bin := utl_encode.base64_decode(UTL_I18N.string_to_raw(l_private_key_b64_alter, 'AL32UTF8'));
    l_address:=APEX_UTIL.URL_ENCODE(P_s_Address);
    --dbms_output.put_line(l_address);
    l_address := replace(l_address,' ','+');
    l_path := '/maps/api/geocode/json?address='||l_address||'&'||'sensor=true';
    dbms_output.put_line(l_path);
    l_signature_mac :=DBMS_CRYPTO.mac(UTL_I18N.string_to_raw(l_path, 'AL32UTF8'), DBMS_CRYPTO.hmac_sh1,l_private_key_bin);
    l_signature_b64:= UTL_RAW.cast_to_varchar2(UTL_ENCODE.base64_encode(l_signature_mac));
    l_signature_b64_alter_back:=translate(l_signature_b64,'+/','-_');
    dbms_output.put_line(l_signature_b64_alter_back);
    --get response from Google map service
    l_url:=l_Google_service_domain||l_path||'&client='||l_client_name||'&signature='||l_signature_b64_alter_back;
    --l_url:=l_Google_service_domain||l_path;
    dbms_output.put_line(l_url);
    l_page:=utl_http.request_pieces( l_url, 99999);
    for i in 1..l_page.count loop
    l_response:=l_response||l_page(i);
    end loop;
    n_actual_length:=length(l_response);
    dbms_output.put_line(n_actual_length);
    dbms_output.put_line(l_response);
    --parse JSON result
    json_obj:=new json(l_response);
    l_status := json_ext.get_string(json_obj, 'status');
    IF l_status = 'OK' then
    jl_listOfValues := json_list(json_obj.get('results'));
    json_tempobj := json(jl_listOfValues.get(1));
    json_geom_obj := json(json_tempobj.get(3));
    json_loc := json_ext.get_json(json_geom_obj, 'location');
    l_lat := to_char(json_ext.get_number(json_loc, 'lat'));
    l_lng := to_char(json_ext.get_number(json_loc, 'lng'));
    P_s_Geocoding:=l_lat||','||l_lng;
    dbms_output.put_line('##########'||P_s_Geocoding);
    case json_ext.get_string(json_geom_obj, 'location_type')
    when 'ROOFTOP' then P_n_accuracy:=9;
    when 'RANGE_INTERPOLATED' then P_n_accuracy:=7;
    when 'GEOMETRIC_CENTER' then P_n_accuracy:=5;
    else P_n_accuracy:=3;
    end case;
    P_b_success:=true;
    else
    P_b_success:=false;
    P_n_accuracy:=0;
    P_s_Geocoding:='0,0';
    end if;
      END;

  • Generating digital pulses from the pci 6722

    I am trying to generate signals that will drive a piezoelectric motor. I need an analog signal that I will send to an amplifier and 6 digital pulses with varying offsets. I am using a pci 6722 and was hoping to get an offsets between the digital pulses to be around 2 microseconds. I am struggling  to find the best  way to get such exact time delays between multiple tasks. Any help  would  be greatly  appreciated.

    The actual offset times is not as important as the digital pulses firing sequentially and all within the envelope of the analog signal for multiple steps.  I guess my question is less about hardware limitations, and more about how execute my desired process in Labview. My experience in Labview is pretty rudimentary and I am struggling to see how to synchronize events in labview.  We are using a BNC 2110 to output our signals, and it is my understanding that the BNC 2110 has a 1 Mhz clock.  We are trying to import that clock from our device use that to clock timed loops and we are having some difficulties with the details.  I am honestly not sure if I am on the right track.  In hopes that it might add some clarity I attached a picture of the signals we are hoping to produce.  The orange signal is our analog output.  Between times t3 and t4 we need the 6 digital triggers to switch to "on" and we need them to all switch off simultaneously at t6.  Again we are definitely willing to compromise on speed if we can use the card we already have.
    Attachments:
    waveform.PNG ‏28 KB

  • Is there a better way to generate custom timed digital Signals

    I am trying to generate digital output of high and lows with particular delays on different lines. Each daq assistant is activating single line on a port on USB 6501. There more complex high and lows that I need to generate with variable time difference between high and low. There is codebelow which accomplishes what I am trying to achieve but for executing a long pattern of high and low signal is very time consuming to do this way. I am sure there is a better way to do this, I  not a expert on labview so I haven't uncovered its full potential. Can anybody suggest a more effective and a quick way to do this. I would hgihly appreciate. Thanks!
    I have not shown in the code below but through DAQ assistant I have initialized lines to low level logic.
    Solved!
    Go to Solution.

    See the attached file
    Attachments:
    Digital Signal.vi ‏335 KB

  • How do i create 6 digital 25Hz PWM output signals with my PCI-6221 card?

    Hi!
    I´m a student, who´s trynig to control a gasturbine process for my diploma thesis. The control program should be written in LabView 8. I need to control 6 25 Hz PWM signals for the gasvalves. The  needed accuracy of the duty cycle has to be about  0.1 %.
     A  tech. engeneer from  NI  told  us , that  we can  do this by using one single digital output for each PWM.
    Now, after a while, i need to implement it into my program. But there are troubles:
    My NI-PCI-6221 standard card only has 2 couteroutputs and only the first of the 3 ports seems to be buffered (Error Nr.  201062)...
    I tried to do the programming, by manipulating the "DIO_PWM_50Hz.vi" I found in google.
    Does anyone of you have any information or helpful examples how i can create these PWM with my card, or did I get a wrong Information by the salesagent (...not the first time....)?
    Thanks for your help
    Tobi

    Here you can find an example, how to do this:
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=DE27921DB53A4D8DE034080020E74861&p_...
    As the text says, best would be to use the counter. As your Hardware has only 2 Counters, you would need additional hardware. Best would be to use a Counter-Card (660x), thes boards have up to 8 counters, so you coulkd control your 6 gasvalves indipendently.
    The soultion with the timed digital outputs of the m-series boards would only work, if you can use the same timing (one counter) for all 6 outputs.
    Hope this helps!

  • Is it save to use digital output as a digital input signal for another channel

    Hi all,
    I know this is a stupid question, but I do not have other signal generator by hand. So what I want to know is, can I use the digital output signal of my USB-6001 as an input signal for the same device but on other digital port? I did not try out directly because I do not want to burn the device down......
    Thanks
    Solved!
    Go to Solution.

    I do loop backs all the time, especially in my test systems as a way of making sure my signal is making it to the UUT pin.  I typically throw in a 10k resistor just in case, but I have never had an issue.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Generate complement​ary digital signals with dead time between each pulse and controlled by duty ratio

    I am to generate  two complementary digital signals using NI 9606 conected by RIO Mezannine Card to NI 9683 (Half Bridge DO).
    I am able to generate the signals but I am not able to put dead time between high and low signal and also, low and high signal.
    Requirement:
    (1) When the first signal goes high and the second signal goes low, there should be a controllable dead time.
    (2) Also when the second signal goes high and the first signal goes low, there should be a controllable dead time.
    I am able to do requirement 1, but I am unable to fulfill requirement 2.
    Please have a look at my VI and let me know how to go about satisfying requirement 2.
    Attachments:
    complementary test 2.vi ‏69 KB

    Hi Frank ,
    I have already taken note of the example Tannerite has provided  and have built my vi ( attached in previous post) surrounding that example.
    Now I require to control the PWM duty cycle as you can see from the vi using a knob and that control refers to both the signal 1 and 2.
    Now the signal 1 end and signal 2 generation requires a controllable dead time. Similarly, signal 2 end and signal 1 geneeration also requires another controllable dead time.
    I am able to do either one dead time at a time using delay but not two dead time simultaneously.
    I feel that I have two put the delays at the appropriate data flow point. I am working on that.
    I would really appreciate if you could give some insight on how to solve this dead time issue and generate two complementary waveform with dead times whose duty cycle can be controlled by a knob controller in fronty panel .
    I have also posted the required timing diagram for reference as suggested by Tannerite.
    Best regards.

  • Generating a digital signal

    Hello,
    I am trying to  generate a digital signal which can be controlled in terms time i.e. Switching ON for 10 minis off for 5 minutes. I tried to generate a digital signal which is going high but unable to control it. As I am the beginner in labview any kind of help is appreciated.
    Please see the attachment for the developed block diagram
    Attachments:
    digital signal generation.vi ‏17 KB

    It appears that all you posted is one of the shipping examples. Is that all you've tried? You can't control it because you're not actually doing anything inside the loop. You're simply setting the value high before the loop starts, and not changing it in the loop. What kind of device do you have? Is it software controlled? If so, you will need to keep track of the time inside the loop. You can use the Elapsed Time VI to do this. Attached is a simple example to get you started to see how this can be done. I'm sure you can figure out how to integrate what you did and what I've shown you.
    To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
    Attachments:
    Switching signal.vi ‏29 KB

  • MyDAQ - Generating a digital signal and displaying it on an analog waveform graph

    Hi,
    I am using the NI MyDAQ to generate a digital waveform with an adjustable frequnecy. This is being implemented into a program I have already written which generates a TTL "like" pulse out of the sound card. I am displaying the output on an analog waveform graph, and I'd like to be able to display the digital waveform generated by the myDAQ on the same graph. (Not at the same time, either one or the other, toggled by a button). I've been messing with arrays and conversions but I cant seem to really get anywhere with it all.
    This is the vi I have made to generate the adjustable frequency digital signal with MyDAQ. Any suggestions on the proper way to do this if the following is wrong would be great too as I just got the MyDAQ a few days ago. I would think there must be a better way but this is the best I could come up with so far.
    Solved!
    Go to Solution.

    Hi Jonny,
    The general logic you are using to create a digital pulse train is fine. This VI you've written should work and will create the pulse train based on software timing (which is fine because you don't have hardware-timed DIO on the myDAQ anyway). However, it is usually good practice to start the DAQmx task just before your while loop and then clear the task after the while loop when you press stop.
    For reference, there are some pretty good LV examples that I recommend looking at for this application too. If you are just trying to create a digital pulse train, the example Gen Dig Pulse Train-Continuous.vi is a good example that uses a counter to create a digital pulse train of your desired frequency. This is generally the prefered method to create a pulse train if you have the hardware available to do so (the myDAQ does have a counter). Alternatively, there are some DIO examples that continuously write to a digital line/port.
    If you're not familiar, you can find the examples by going to Help >> Find Examples... in LV. Then, navigate to Hardware Input and Output >> DAQmx >> Generating Digital Pulses or Digital Generation.
    Also, here is some additional information about the myDAQ and its counters:
    myDAQ Counters 
    myDAQ Manual 
    Hopefully this helps.
    Chris G
    Applications Engineer
    National Instruments

Maybe you are looking for