Output frequency to a port mentioned in MAX

Hi,
I am trying to output ca. 100 KHz on a PIF port using NI 6351. I used example from NI example bank and it's working fine with the following code.
DAQmxErrChk (DAQmxCreateTask("",&gTaskHandle));
DAQmxErrChk (DAQmxCreateCOPulseChanFreq(gTaskHandle, aChannel, aVirtualAddress, DAQmx_Val_Hz, aIdle, 0.0, aFreq, aDuty));
DAQmxErrChk (DAQmxCfgImplicitTiming(gTaskHandle, DAQmx_Val_ContSamps, 1000));
 In the above example, I am creating a COPulseChannel and aChannel represents its physical address (for e.g. Dev1/ctr2) and aVirtualAddress is the one which I can assign to this physical address for future use.
My question is:
How can I create a virtual channel in MAX and use its name here with a name say "myFrequencyChannel" and then write a function to output Frequency to this channel?
Motivation:
This was possible till now for all channels like AI/AO/DI/DO, where I defined all channels with virtual names in MAX and then simply performed tasks by forwarding their names (only) to my functions. So the user need not remember always physical channel but just virtual channel names.
Thanks in advance.
Regards
RB
Solved!
Go to Solution.

Hi,
I think I misunderstood your questions. I though you wanted to import a Virtual Channel from MAX. 
 As background info: You use the function DAQmxAddGlobalChansToTask when you want to import a global virtual channel from max and DAQmxCreateCOPulseChanFreq when you want to confugure it all programmatically. aVirtualChannel in your example in the name you want to give to the created channel. According to the help, you can also let this field empty. 
Long story short, you use either DAQmxAddGlobalChansToTask to import a global channel from MAX or  DAQmxCreateCOPulseChanFreq to document your task programmaticaly. Then you can start your task using.
DAQmxStartTask (gTaskHandle);
 I still have doubt concerning my understanding of your question. Please let me know if that is answering it.
Best regards 
Florian Abry
Application Engineer Group Leader
NI Germany

Similar Messages

  • How to correlate carmel ASIC output to actual ethernet port?

    On a Nexus 5548UP I have a 10G SM port receiving CRC errors but upstream is not sending errors. I think the receiving switch is stomping the CRC, but I cannot match up the output from "show hardware internal" to the actual port to know for sure.
    Running this command I can see the ASIC number and port ID:
    switch# show hardware internal carmel port ethernet 1/29 | include instance|mac
    carmel instance : 3 <- asic ID
    mac port : 4 <- port ID
    fw_instance : 4
    mac status polling : 1
    Then I am running this command to check for stomps, but I cannot tell which line(s) of output correspond to the port in question.
    switch# show hardware internal carmel asic 3 counters interrupt match stomp
    Slot 0 Carmel 3 interrupt statistics:
    Interrupt name |Count |ThresRch|ThresCnt|Ivls
    -----------------------------------------------+--------+--------+--------+----
    car_fi4_INT_fi_rx_pkt_crc_stomp |1 |0 |1 |0
    car_fi5_INT_fi_rx_pkt_crc_stomp |bc4d5 |0 |1 |0
    car_fi6_INT_fi_rx_pkt_crc_stomp |817d5 |0 |1 |0
    car_fi7_INT_fi_rx_pkt_crc_stomp |bc474 |0 |4 |0
    car_bm4_INT_norm_igrd_crc_stomp |bc52c |0 |4 |0
    car_bm4_INT_norm_egrd_crc_stomp |1 |0 |1 |0
    car_bm5_INT_norm_egrd_crc_stomp |bc4d5 |0 |1 |0
    car_bm6_INT_norm_egrd_crc_stomp |817d5 |0 |1 |0
    car_bm7_INT_norm_igrd_crc_stomp |1 |0 |1 |0
    car_bm7_INT_norm_egrd_crc_stomp |bc474 |0 |4 |0
    car_fw4_INT_ig_pkt_err_eth_crc_stomp |3e |0 |2 |0
    car_fw4_INT_eg_pkt_err_eth_crc_stomp |1 |0 |1 |0
    car_fw5_INT_eg_pkt_err_eth_crc_stomp |bc4d5 |0 |1 |0
    car_fw6_INT_eg_pkt_err_eth_crc_stomp |817d5 |0 |1 |0
    car_fw7_INT_ig_pkt_err_eth_crc_stomp |1 |0 |1 |0
    car_fw7_INT_eg_pkt_err_eth_crc_stomp |bc474 |0 |4 |0
    car_mm4_pb_INT_buf_ecc_crc_rx_crc_stomp |3e |0 |2 |0
    car_mm4_pb_INT_buf_ecc_crc_tx_crc_stomp |1 |0 |1 |0
    car_mm5_pb_INT_buf_ecc_crc_tx_crc_stomp |bc4d5 |0 |1 |0
    car_mm6_pb_INT_buf_ecc_crc_tx_crc_stomp |817d6 |0 |2 |0
    car_mm7_pb_INT_buf_ecc_crc_rx_crc_stomp |1 |0 |1 |0
    car_mm7_pb_INT_buf_ecc_crc_tx_crc_stomp |bc474 |0 |4 |0
    Done.
    Is it as simple as all of the lines above that have '4' in the name (like car_fi4_INT_fi_rx_pkt_crc_stomp) correspond to the port I am concerned with?
    I have checked MTU and and cleaned / reseated the fibers on both ends.

    An update to my problem.  Apparently I misunderstood the concept behind channels and tasks in DAQmx.  With the same type of output I could really just have grouped the two channels under the same task.  All I had to do was to call the DAQmxCreateAIVoltageChan twice and specifiy the two different output terminals for the two channels.  Both of which will be regulated under the same sample clock.
    After that I called the DAQmxWriteAnalogF64 function once, specifying the "dataLayout" parameter to DAQmx_Val_GroupByScanNumber, which should output the sample array interleavingly.
    The program now outputs two identical waveforms synchronized by the same sample clock.
    However the second problem remains.  What happens when I want to vary the frequency of the second channel?  A simple and obvious solution would be to write and equal number of samples for both channels and just change the value of the sample for the second channel according to the frequency.  However this would result in a gigantic array if I have to add more channels later on.
    Is there any way around this?
    Thank you
    Howard

  • Audio output and left USB port is not working!

    Hi! I have MacBook Air 13" late 2010, Audio output and left USB port is not working!
    What happened?
    Part No.: Z0JH000TE RS

    If the left USB port doesnt work with an external mouse its seems to be a hardware malfunction of this USB port.
    The newest BIOS is already installed?
    Have you removed all USB ports from device manager and restarted your notebook?
    If you have already tried this, contact an authorized service provider. The guys can try to fix this issue and it should be covered by warranty, if you still have warranty on this notebook. :)

  • Splitting datamatrix by output frequency

    Hi, I have trouble finding out how to solve a problem in Labview
    I am working on improving a program so that it may present data in different frequencies. My NI6211 reads 1000 analog samples per channel and second. I want to be able to display this data with various frequencies as i want to study transients more closely.
    The program used to run in 20hz, thus i presented 20 values every second and channel, each value the mean of 50 samples. When i had a fixed frequency of 20 i just told the Read.vi to get 50 samples every 50ms working cycle, used "index array" to split it into 15 1D rows and calculated the mean for each row. The rows were then assembled back into a matrix and used as output.
    Now i want to be able to run in 100hz/10samples (and also 50/20, 200/5, 500/2....). I have also changed the working cycle time to 60ms for other reasons.
    DAQmx thus reads 60 samples on 15 analog channels every working cycle, and so i get a data matrix of 15x60.
    Is there a way to split it into smaller pieces of 15x(sampling speed)? For example if i used a frequency of 100 i would get 6 sets of 15*10, allowing me to calculate the mean value of smaller intervals. For 500hz i would get 30 sets of 15*2 etc...
    Is it possible to split a matrix into equally wide columns? Can it be solved with an indexed for loop?
    Any help would be appreciated, im still a beginner at Labview!
    Attachments:
    Varying output frequency.jpg ‏92 KB

    Your current code can be replaced by an autoindexing FOR loop, you only need once instance of the "add array elements" operation. Easiest would be to acquire it as a 1D array with a constant number of samples then use "reshape array" to create a 2D array of the desired dimensions to be used for autoindexing as suggested.
    LabVIEW Champion . Do more with less code and in less time .

  • When I unplug Apple headphones from my MacBook Pro sond from internal speakers not work, and system soud preferences displayed: Output: optical digital out port only

    When I unplug Apple headphones from my MacBook Pro sond from internal speakers not work, and system soud preferences displayed: Output: optical digital out port only

    If you see a red light in the audio output port, then the internal switch is stuck.  Insert the earphone plug a few times and see if you can trip the switch.  If that fails, insert a cocktail stirrer and the like and jiggle it around inside.  If that fails, take it to an Apple store and have the technicians at the genius bar do it for you.
    Ciao.

  • Calculatin​g the true output frequency of a PXI-5402

    I have a PXI-5402 card sat in a PXIe chassis. I am only interested in sine wave output at frequencies up to approx 10kHz. I know that it is posible to request an output frequency and then query the acutal output frequency but I would rather be able to calculate it before hand. All I can find in the literature is a figure of 0.355uHz for frequency resolution.
    Is there a better description of the frequency resolution? If not, is the resolution exactly 0.355uHz or is this an approximation (to 3 significant figures)?
    Solved!
    Go to Solution.

    This webcast is an excellent way to learn the process of which the NI 5402 and NI 5406 operate to generate their periodic functions: http://www.ni.com/webcast/75/en/ 
    The 0.355uHz value is a theoretical value of achievable frequency rates based on the Clock Rate and Phase Accumulator size. This is the closest thing I can find on ni.com for you to use to calculate the value: http://zone.ni.com/reference/en-XX/help/370524R-01​/siggenhelp/ni_5401_11_31_frequency_resolution_and​...
    I believe Fc for the NI 5402/5406 should be 100M and the accumulator size is 48-bit. Therefore frequency resolution = Fc / 2N = (100 × 10^6) / 2^48 = 3.55271368e-7
    Keep in mind that the device has a VCXO frequency accuracy spec of +/- 25ppm, if you do not PLL lock it to a better source.
    Product Support Engineer
    National Instruments

  • ?how do i ramp the Digital Output frequency?

    I need to apply a linear ramp to the output frequency of my digital TTL
    output to accelerate and deaccelerate the speed of a stepper motor - is
    there any way to do this such that the ramp is continous?
    using: Labview 5.0.1 on a PC with an AT-MIO-16E-1 board
    -thanks

    You can only decellerate the speed: see CTR Pulse Config.vi (see hierarchy
    of Generate Pulse Train.vi).
    In cluster 'low level parameters there is a auto-increment count value that
    adds to phase 1 of each new period
    wrote in message
    news:[email protected]..
    > I need to apply a linear ramp to the output frequency of my digital TTL
    > output to accelerate and deaccelerate the speed of a stepper motor - is
    > there any way to do this such that the ramp is continous?
    >
    > using: Labview 5.0.1 on a PC with an AT-MIO-16E-1 board
    >
    > -thanks

  • Audio output through mini display port

    2009 model macbook air 2,1. Is there an update or video card that will allow audio output using Moshi HDMI adapter?

    http://support.apple.com/kb/HT4241
    Only the most recent late 2010 MacBook Airs support audio over Mini Display Port.
    For an older machine, you'll need something like this: http://www.amazon.com/Mini-DisplayPort-HDMI-Adapter-Audio/dp/B0033SM2BQ/ref=sr_1 _14?ie=UTF8&qid=1306806721&sr=8-14 or this: http://www.amazon.com/Displayport-Toslink-Female-Converting-Adapter/dp/B003BS2PF G/ref=pd_sim_sbs_e_5

  • Patterned input and output from a single port w/ NI 6534 DIO

    Is it possible to configure certain lines in a port to be read and others to be write? I am interested in doing patterned I/O with a single port, first output, then input. Not both at the same time. Is it possible to perform patterned output on one line and patterned input on a different line within the same port?
    Thanks
    -Scott

    Hi Scott,
    I understand that you'd like to do digital I/O on a PCI-6534. All of the scenarios you outlined in your question should be possible with this board.
    1. You can configure some lines of a port to output signals while others input signals by using a line direction map.
    2. You can do patterned I/O on the same port at the same time.
    I'm not sure what software you're using to interface with the 6534, but if you happen to be using LabVIEW, then there is a shipping example which demonstrates the basics of patterned I/O on a single port of a DIO board. The example is called Digital Multi-line Direction (E).vi and can be found in Help >> Find Examples. If you are using another programming language, then there may be examples on ni.com.
    Hope this helps
    Marcus G.
    National Instruments

  • KN9 Platinum - is audio output via both SPDIF ports possible??

    I am looking at this board because it has both an optical and coaxial SPDIF output - can you tell me whether these can be plugged into and used simultaneously for HD Audio output. ie I want to be able to output a single digital audio stream from an application like PowerDVD via both connections.
    Note this is not about multi streams from different applications - just a single stream via both SPDIF ports.
    For an HTPC setup I want to be able to take the optical SPDIF output to a surround sound receiver and the coaxial SPDIF output into an HDMI enabled graphics card which includes audio input so I can then take both video/audio to another monitor.
    Thanks for your help.
    Ben

    Yes, audio will do this video won't.

  • Can query serial port with NI MAX, but doesn't work in Labview

    I'm trying to control a Coherent Sapphire 488 with labview. It's connected via a serial to USB converter into the computer. I can communicate with a device using NI MAX, but when I try to run the vi (attached), it works for several queries, but evetually returns a null character, after which I can no longer communicate with the port. If I then go into the NI MAX interface, every time I try to read it gives the "VISA: (Hex 0xBFFF0015) Timeout expired before operation completed" error message.There are also several queriess from the instrument's manual that don't seem to work at all (with or without MAX) and always return a null character. Any help is appreciated. I'm certainly a novice with device communication. Thanks.
    Solved!
    Go to Solution.
    Attachments:
    488_query.vi ‏16 KB

    Generally issue with termination character.
     And you are sending     \  and  r   and not CarriageReturn.

  • Output from tables which I mention in select options of the screen as input

    Dear All,
    I want to fetch the data in the form of output from tables which I will mention in select options of the screen as input.
    In selection screen option if I write any table name then how can i select this table in select query of ABAP program ?.
    I may select any tables in select options of screen. But In select query I should get that table name automatically.. How ?
    e.g. If i put table name as an input i.e.  MARA  in select option .
    In program how to write select query to get records from that table ?
    SELECT MTART MATKL from MARA
    Every time I should not go to select query of program  & replace the tablename.
    How to solve this problem ?

    Hi,
    PARAMETERS p_table(30)." type string.
    "This is a Tested code Just Execute and Check
    START-OF-SELECTION.
      DATA: lt_tmp TYPE REF TO data.
      DATA : line TYPE REF TO data.
      FIELD-SYMBOLS: <lt_tmp> TYPE STANDARD TABLE, <wa>, <dyn_field>.
      CREATE DATA lt_tmp TYPE STANDARD TABLE OF (p_table).
      ASSIGN lt_tmp->* TO <lt_tmp> .
      CREATE DATA line LIKE LINE OF <lt_tmp>.
      ASSIGN line->* TO <wa>.
      SELECT * FROM (p_table) INTO TABLE <lt_tmp>.
      IF sy-subrc = 0.
        LOOP AT <lt_tmp> ASSIGNING <wa>.
          DO.
            ASSIGN COMPONENT  sy-index
               OF STRUCTURE <wa> TO <dyn_field>.
            IF sy-subrc NE 0.
              EXIT.
            ENDIF.
            IF sy-index = 1.
              WRITE:/ <dyn_field>.
            ELSE.
              WRITE: <dyn_field>.
            ENDIF.
          ENDDO.
        ENDLOOP.
      ENDIF.
    Cheerz
    Ram

  • How can I output frequency readings of my signals using FFT?

    Hi there, I need help in regard to the topic stated.
    Currently I have accquired a sine wave with frequency that vary, using one of the accquistion card by NI. I had converted it to a digital signal so that labview can read it. Now, I will like labview to output the measurement of the frequency.
    For example : sine wave of 5KHZ is accquire ,  labview will use FFT to convert time domain to frequency domain, and then output the frequency of the sine wave, in the case, 5KHZ.
    What function block should I be using? I had explored the function blocks of all FFT. Most of them output either real FFT, complex FFT, magniture or phase. But none of them output the reading of the frequency.
    Maybe I had missed out some function block, so how do I go about output a frequency reading after using FFT?
    Thanks a lot in advance.

    After Converting your signal from time domain to frequency domain, u cant expect there is only one frequency component,they should have different frequency components according to your input signal.Use extract single tone information to get the output reading of the frequency.
    Balaji PK (CLA)
    Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Detect Freq.vi ‏15 KB

  • No output on Intel HDMI port

    Hello everyone,
    I have recently build a new desktop system. So far everything seems to work fine accept that the Intel HD Graphics 4600 on my i7-4790K processor does not. The only display output on my motherboard (Asrock Z97 Anniversary) is HDMI. I've managed to install Arch by using my dedicated AMD graphics card.
    It's like the issue described here but the solutions do not seem to work.
    https://wiki.archlinux.org/index.php/In … modules.22
    I want the Intel card to work because I want to pass-through the AMD PCIe card to a Windows VM for entertainment purposes. Currently I am using multiboot and Windows finds both of the graphics cards in the Device Manager so this is not a UEFI configuration issue.
    Thanks for reading and if more information is needed I will be glad to provide it.
    Have a nice day,
    Chill

    MisterAnderson wrote:Is it normal to have the DVI output labelled as HDMI? On all my systems I'm sure they were labelled DVI-0 and the like.
    I don't know if this is normal. In the bug report I've mentioned before the outputs are also labelled as HDMI-1 and HDMI-2.
    Possibly the HDMI and DVI outputs are sharing the same controller? Does outputting both at the same time work in windows?
    I didn't test it in Windows. However the intellinuxgraphics website suggests there is dual head support for the intel driver. In this example dual head is configured for LVDS and VGA, not for DVI and HDMI.
    [edit]
    I've found this on the intel site:
    Support for HDMI, DisplayPort*, eDP and DVI 2: High Definition Multimedia Interface (HDMI) delivers uncompressed HD video and uncompressed multi-channel audio in a single cable, supporting all HD formats including 720p, 1080i and 1080p. Dual independent display expands the viewable workspace to two monitors.
    Last edited by boomerang (2011-11-13 13:21:03)

  • How to programatically very the PWM output frequency in 7344, to the desired value

    Hi
    I can use the PWM output only for the frequencies that is specified like 40Khz or 20KHz. I require to set the PWM frequency programatically to the desired value at a aduty cycle of 50%. How to implement this.

    What exactly do you need the PWM oututs for? Are you using a motion drive that requires a PWM command? The controller itself does not allow you to use the PWM ouputs to change the frequency on the fly. You might want to go to a DAQ board of Fielpoint moduel for this functionality.l

Maybe you are looking for

  • How do I transfer photos from one device to another

    I have an iPhone 4S and an iPad 4. Both have the latest version of iOS. Both are connected to iCloud using the same account. If you go to Settings > iCloud > Photo Stream, both have "My Photo Stream" set to "On." I would like to be able to take a pho

  • ESB requires "SOAPAction" to be set in HTTP header?

    I'm trying to insert an ESB flow between an existing web service and client. The service and client were previously built with Apache Axis. By generating an appropriate WSDL (doc/wrapped rather than Axis' default RPC style) for the existing service,

  • How to disable Row label from the aggregation function in Pivot table

    Hello everyone, I have table in Power Pivot like shown below: Item_Name Category Vendor Sales_Amount Item 1 Category 1 Vendor 1 30 Item 2 Category 1 Vendor 2 25 Item 3 Category 2 Vendor 3 50 Item 3 Category 2 Vendor 3 60 Item 3 Category 2 Vendor 3 20

  • Removing host name from jsessionid

    We have a standard installing of IWS 6 and the host name is included in the jsessionid even if not configured in wep-apps.xml (we are using the default wep-apps.xml and there is no session-cookie tag in the file. Doc says you have to set session-cook

  • Newly installed built in webserver/admin inaccessible after reboot

    I use the developer version of CF MX7 with the built in webserver to run some small utility apps for personal use on my WindowsXP box. And everytime I do a reinstall of windows, I have this same issue, and somehow, everytime I forget how to fix it in