How to use an analog signal to conditiona​lly generate a TTL(or square function) signal?

Hi everyone,
I am using PCI-6229 and trying to develop a code that can generate a TTL/square function signal as soon as one analog input satisfies following conditions: 1. Crossing a certain value (say, 0 V); 2. Falling edge slope. The time delay between the crossing point and newly generated TTL/square signal will be critical in my measurement, and it should not exceed 1 millisecond. Any suggestion on it? Thank you in advance!
Solved!
Go to Solution.

Are you actually using the Excel add-on called Measure? That is what this board is for. Otherwise, you should post to the Multifunction DAQ board and mention the language that you are using.

Similar Messages

  • How to use an analog trigger to determine single sample acquisition rate

    Hi all,
    I have the NI PXIe 6124 on a NI PXIe 1062 Q controller.
    I would like to use an analog signal to determine a single sample acquisition rate.
    For example: if I enter a sine wave with an unknown frequency, I would like to acquire a single (1) sample across my 4 channels each time the sine wave value is zero.
    Is this possible with my devices? And if so how do I do it?
    Thanks,
    Oren.

    Hello Orensag
    The different types of triggers supported can be found in the PXIe - 6124 Manual on pages 135-138.  You should be able to set a very small window trigger with around 0 volts so that you trigger on both the rising and the falling edges of the sinewave as it crosses 0 volts.
    Do you know the frequency of the input sinewave?  This information would be very beneficial to know to set the correct rate for the DAQmx task.
    What you really are looking for is change detection, which is an option in DAQmx Timing VI, but is only supported by certain cards.  Again your sine wave would need to meet the same sample clock timing requirements in the 6124 Specifications.
    Anthony F.
    Product Marketing Engineer
    National Instruments

  • How to Use 2 Separate Y-Axis in Report generating Tool Kit

    Hello
    How do I make 2-Y-Axis chart on Word document from Report Generating Tool Kit?
    Now can make Chart to appear in Word document with Multiple plots, but all plots go to same Y-Axis.
    I want to put in chart two Plots with Same X-Axis, but different Y-Axis.
    I know it is possible manually in word, but how  can I do it with Labview RGTK?

    hmm, yes. I guess that is the only alternative. But is there anyone who has made something similar in the past?
    I am not sure how to interpolate this data to an array of 30 000 data points without loosing data in the beginning.
    Since it is exponential, the first few dozen datapoints are at really low freq. All about 10.xx Hz and increasing.
    Then in the end of the array, i have like one datapoint at 15kHz, one at 15,5kHz etc. Will be alot of gaps in my array and alot of lost data in the beginning I think.
    It's strange though that labview doesn't allow for waveform, or atleast let me put an XY-array into these methods since i believe always you want an logarithmic freq-axis when having a frequency-response to handle.
    Anyway, anyone who has a nice little VI that interpolates data like this?

  • Question regarding how to use XHTML format in Form Builder to generate PDF

    Hi,
    I have defined a form where the input interface is iv_text TYPE string and the format of the field in the form is in XHTML.
    But when I set iv_text = '<font face="Times New Roman" color="#ff0000" size="5">Test</font>'. The ADS does not interpret the XHTML and it generates me a PDF file containing this sentence.
    Can some help me?

    Hi,
    I have defined a form where the input interface is iv_text TYPE string and the format of the field in the form is in XHTML.
    But when I set iv_text = '<font face="Times New Roman" color="#ff0000" size="5">Test</font>'. The ADS does not interpret the XHTML and it generates me a PDF file containing this sentence.
    Can some help me?

  • Recording quadrature encoder and AI signals simultaneo​usly and generating output TTL signals in one VI

    I want to record simultaneously encoder, pressure and other AI signals and output a TTL signal for every other pressure signal. I have two VIs: One is to record all signals and the other is to generate TTL signals.
    1. Since I'm new to Labview, I would like to double check with experts that if my VI (attachment 1) did what I expect. I would like to have DAQ box read and write encoder signals and pressure signals at the same time so I can plot PV diagram.
    2. During acquisition, some data points are usually missed, shown in attachment 2. Is there any way to solve it?
    3. I tried to combine two VIs but it never work (attachment 3). Can anyone give me any suggestions?
    PS. Labview 9.0 and NI USB-6216 are used.
    Dummy signals are 30Hz sine waves for pressure and 2 TTL signals for encoder A and B at 5kHz.
    Thank you!

    Thank you for your help, Peter!
    I attached the wrong file for attachment 1. The initial code for measurement is attached here.
    The sampling rate is 20000 and the sample mode is continuous.
    For missing data points, it improved when I add "wait until next ms multiple" in while loop.
    Follow the example you gave me, I'm able to generate TTL signals in one vi, attachment 2. Could you please check if it's correct?
    It looked fine with simulated signals and hope it will go well with real engine tests.
    I have two more questions:
    1. Does the input number for wait until next ms multiple should always be the same as "samples per channel" in sample clock?
    2. How will the value of "samples per channel" in sample clock affect data acquisition? I tried 1000 and 10 but didn't see any difference between these two.
    Thanks a lot.
    Attachments:
    recording VI.png ‏332 KB
    AI+CI+CO.png ‏72 KB

  • How to use an Aggregate in a Computation on an Interactive Report?

    version 4.0.2.00.07
    Hello,
    I'm trying to create a computation on an Interactive Report from the Actions menu to compute a percentage.
    I have two Status columns, one for open and one for closed. I have to count the number of open and count the number of closed and then divide the two.
    I created an aggregate, count, on the open status and closed status, but how to use them in the computation? There's no 'count' in the Function list in the Compute box.
    I was hoping that those aggregated columns would be displayed in the Compute sub-menu on the Actions button but they don't appear to be.
    Can someone help me with this?
    Thanks,
    Joe

    Maybe an alternative would be to put this logic into the select.
    select u.object_name,
           u.object_type,
           count(case when u.object_type = 'TABLE' then 1 end) over () count_tables,
           count(case when u.object_type = 'VIEW' then 1 end) over () count_views
    from user_objects u;This would count the number of tables and views in the data dictionary. And it is returned as a column value.

  • How to use print control in Sap script

    I would like to use print control in Sap script.Actualy my problem I have security font Troy ECF. Using this font I would like to print amount field in Check printing.
    we count download this font with sap .we talked to customer care they told we should hard code in sapscript. pls can any1 help on this how to do and how to use print control for this fonts.

    call this funcation. crate_text.
    CALL FUNCTION 'CREATE_TEXT'
             EXPORTING
               FID               =
               FLANGUAGE         =
               FNAME             =
               FOBJECT           =
             SAVE_DIRECT       = 'X'
             FFORMAT           = '*'
             TABLES
               FLINES            =
           EXCEPTIONS
             NO_INIT           = 1
             NO_SAVE           = 2
             OTHERS            = 3
           IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.

  • How to use at-line selection in ALV

    Can someone help me about how to use at-line selection in an ALV

    u can try in user_command
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
             I_CALLBACK_PROGRAM = G_REPID
             IT_FIELDCAT = GT_FIELDCATALOG
             I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
             I_CALLBACK_HTML_END_OF_LIST = G_HTML_END_OF_LIST
             I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
             I_GRID_SETTINGS = GS_SETTINGS
             IS_LAYOUT = GS_LAYOUT
             I_SAVE = G_SAVE
             IS_VARIANT = GS_VARIANT
             IT_EVENTS = GT_EVENTS[]
    *      I_SCREEN_START_COLUMN = 0 "Use coordinates for
    *      I_SCREEN_START_LINE = 0 "display as dialog box
    *      I_SCREEN_END_COLUMN = 0
    *      I_SCREEN_END_LINE = 0
        IMPORTING
             E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
             ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER
        TABLES
             T_OUTTAB = I_REP
        EXCEPTIONS
             PROGRAM_ERROR = 1
             OTHERS = 2.
    FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
        WHEN '&IC1'.
          CASE RS_SELFIELD-FIELDNAME.
            WHEN 'XXXXX'.
              READ TABLE I_xxx INTO V_xxx
                WITH KEY XXX = RS_SELFIELD-VALUE.
              IF SY-SUBRC = 0.
              ENDIF.
            WHEN OTHERS
          ENDCASE.
      ENDCASE.
    ENDFORM.

  • Can someone tell me please how to use the features...

    Hi all,
    Can someone tell me please how to use the features on the HS-47 headset?
    That is, what functions does the button control and how many presses of the button for each function, etc?
    The headset was as supplied with my 6200.
    I've tried looking for a user guide but I don't think there is one.
    Many thanks,
    Steve.

    I think it's pretty basic.
    If you are listening to music on your phone, it should automatically mute it when a call comes in. A basic press of the call answer / end button should then do just that.
    Have a go! You could try experimenting with a quick double press, that may recall the last number you dialled, but otherwise that's probably it.

  • How to use split screen on a mac like on windows 7

    how to use split screen on a mac like on windows 7

    It does not function the same as windows, in that it does not have an automatic snap function.  You can put multiple apps up side by side though.  You might want to consider using Spaces instead.

  • How to use digital trigger with analog I/O

    How do I program analog input and/or analog output to start on a digital trigger (PFI pin) on PCI-4451/4551.
    I have tried out various configuration and succeeded in starting analog input, simultanuous input and output triggered by the the anlaog input signal. I have also succeded i triggering 4551 from the dedicated EXTTRIG pin.
    The problem is to trigger on a selectable PFI pin. I find the help for "AI Trigger Config" and "AO Trigger and Gat Config" misleading - some unsupported features seem to work while selecting PFI pin as source make the PC restart immediately.
    I have not been able to find any LabVIEW example that shows how to use PFI pin as trigger input.
    Using LabVIEW 7.1, NI-DAQ 7.3 on Windows 2000.
    Kind regards / Med venlig hilsen
    Torben

    Hello
    The PCI-4451 does not have any PFI lines. If you look at the user manual in the link beneath you will be able to confirm this by looking at the connector signal discriptions. The same is valid for the PCI-4451
    http://digital.ni.com/manuals.nsf/websearch/6A32358C53BB15F086256660007392DC?OpenDocument&node=132090_US
    The two ways of triggering that you have succeded are the analog triggering and digital triggering that you can peform with the PCI-4451.
    Regards
    Mohadjer

  • How to use counter output pulses to trigger analog input?

    Hello all,
    I hope the kind people using this forum can help me, a lowly beginner LV programmer! I have been attempting to create a VI that produces a user defined number of TTL pulses, separated by every n seconds. Each TTL would be outputted to a stimulator, which in turn generates its own TTL. Using the stimulator-generated TTL, I would like to trigger finite analog data acquisition (e.g. for every TTL, trigger the collection of a data sweep that contains 4000 samples (collected at 4000 Hz), with 1000 samples collected pre-trigger. I would like to also be able to see each data sweep as it is triggered on a chart. As I understand things (lots of online/book/forum reading), I should be using the counter output to generate my TTL pulses, and syncing each counter produced TTL with analog input, as well as using a reference trigger. Also, the AI part should be started first, so that I don' t miss any counter outputs. If it matters, I also need to use one of the AI channels to acquire the TTL, so I can see my stimulator-induced responses to the stimulator in time.
    I am able to generate the TTL pulses from the counter output, but I am having a problem with the AI part. I am unsure how to sync the counter output with AI. Also, since I need to acquire pre-trigger samples, I would be needing to acquire samples continuously, but when I set 'continuous samples' on daqmx timing, the VI doesn't work (hence why's its set to 'finite samples').
     I hope someone out there can help, as I have been at this for what seems ages, with limited success. I am using a USB-6259 and LabView v8.2. Thanks!
    Attachments:
    RC001 v_1.vi ‏49 KB

    Hello,
    Due to the fact that analog tasks themselves are not retriggerable, a
    pulse train produced by a counter is always used as the sample clock
    for the analog input task in order to recreate a retriggerable effect
    for analog input. This can be done by creating a finite pulse train set
    to retriggerable using the DAQmx Trigger Property Node, or the pulse
    train could be continuous and just be gated by another signal. Neither
    of these methods can be properly applied in hardware to create a
    retriggerable reference trigger. You can however implement something
    similar in software by just stopping and restarting your reference
    triggered analog input task within a loop. There will be some delay
    between when the task is stopped and restarted, as these events require
    software intervention, but if there is enough time between when each
    trigger signal is generated, there should not be any noticeable delay
    or missed samples.
    I have attached an example of this!
    Mark B
    ===If this fixes your problem, mark as solution!===
    Attachments:
    RC001 v_1mod.vi ‏25 KB

  • 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

  • How to send an analog output signal on same axis running a stepping motor umi 7764/ PCI7334

    I am running a single axis stepping motor (which is working fine) but
    for the application I need to be able to turn on and off a 5 volt
    laser.  It notes in the manual for the UMI 7764  that the the
    analog output can be used as a general-purpose voltage output.  I
    would like to use it as such, but can't figure out what VI's actually
    send messages to the board to output a 5 Volt signal.  
    Ideally I would use the analog output on the same axis that the
    stepping motor is on, but if need be I could use one of the other axis
    if this isn't possible (ie. it may not be possible to step and send
    analog voltage output on same axis at same time).  I have been
    looking at the configuring DAQ and ADC stuff, but can't seem to make
    sense if these actually control the analog output channel.  I
    think they just control the Analog input channels, but maybe I am
    wrong. 
    Any help would be greatly appreciated
    Andre

    Hi,
    It is possible to send analog output out of the same same DAC channel in which your stepper is connected, if you configure the stepper as open loop in MAX. I've tried it. This way you have the stepper output, analog output and encoder input acting independently. So you can use these seperately for different purposes, such as using the analog output for constant speed motors where speed or position control is not of much importance, encoder for positioning some other axes and stepper output for stepper control. With good programming skills, the NI motion controllers can thus be used for the most complex configurations. Great work NI !!! Nothing is impossible.
    Regards,
    Giridhar Rajan
    Automation Engineer, Design
    Cruiser Controls
    Mumbai, India

  • How to convert a analog signal to digital signal

    Hello,
    How to convert an analog signal into digital signal such that every sample of analog signal corresponding to 1.2V will be represented as '1' in digital signal and other samples of analog signal(that are not 1.2v) will be represented(converted) as '0' in digital signal.
    And how to display both wavefroms or signals in graph indicators.
    Thanks.
    Solved!
    Go to Solution.

    If you have 1000 samples, and you want to convert to digital, you are going to get 1000 digital values.  Attached is what I mean.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    Analog_to_Digital Hooovahh Edit.vi ‏52 KB

Maybe you are looking for