High Speed Clock Signal Generation Using FPGA Ouput

Hi,
This a screen shot of a LabVIEW FPGA program. Here I am trying to generate 5MHz Clock signal at Connector 0 DIO12. But I get around 2MHz when I measure the signal using an oscilloscope. Would some tell me what’s wrong ?
LabVIEW 2011
FPGA Target  : PXI 7841
I set DIO 12 to Nerver Arbitrate in the property setting.
Solved!
Go to Solution.

I'm not certain but maybe some of the delay is happening because you are changing the mode of the pin.  According to the specs on the card it is capable of having a Maximum Clock Rate of 40MHz under the DIO section.  So if you are purely doing digital reads, or digital writes you should be able to update/read 40,000,000 times a second.  If you perform a read, which can take up to 1/40M of a second, then invert which takes some time but practically none, then another write which can take up to 1/40M of a second, your loop rate should still be faster than the 10MHz you showed.  That's why I suspect there is time involved in changing over the pin from a read mode to a write.
If you try to do something similar with the analog you'll notice the maximum update rate is only 1MHz.  So while your logic and code can run at 40MHz you can only update the analog value at 1MHz.  Because of this in the past I have had two loops.  One running a at the maximum clock rate doing the logic calculations, and then sending the result to another loop that updates the output at the maximum rate which in the case of an analog out is only 1MHz.
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.

Similar Messages

  • Mapping the High Speed Capture signal to RTSI

    Hello,
    Can i Mapp the "High Speed Capture" signal to RTSI ?
    When i'm using the motion RTSI example and mae some changes: 
    i'm setting the source to "High speed capture"  and the destination to RTSI_0 i 'm getting an error that its possible!
    i want to use this input to trigger an action on other pci.
    I'm using pci-7344 with umi - 7774 and pcie-1430
    Thanks
    Mor
    Message Edited by MotiM on 08-01-2009 08:47 AM

    Dear Jochen,
    Thank you for your reply.
    I try to map the High Speed capture to RTSI , but the HSC doesnt work.
    When i remove the RTSI mapping from my diagram, the HSC work and i can capture the encoder position.
    I'm using the UM7774, and the HSC is wired to the global connectors (TRIGGER/BREAKPOINT connector)
    I also read all the relevant documentation about my hardware and i notice that there is a comment about mapping the motion rtsi :
    (from Select Signal vi Help):  Note  You must route signals from the RTSI lines before you enable high-speed capture ,
    so i also consider that, it still doesnt work....
    I really appreciate if you can take a look about the 2 versions of vi i attached here.
    They both need to do the same.
    Each vi contains 2 parallel diagrams, one diagram for the single axis move, the move is to target position X,
    the second diagram is for the vision, there is "trigger each line" from rtsi line (the motion diagram includes maping the encoder phase A to the rtsi for this purpose)
    and i want to use the High speed capture to trigger the start of imaq also.
    The example :
     HSC in motion activate the start of imaq in second loop.vi 
    is a working example that runs good and capture the image.
    but its "dirty" programming, i dont think its should work like this.
    its actualy a implementation of "busy wait" loop.... ( i dont like it, but work...)
    The example :  
    HSC triger directly the start of imaq.vi
    is hoe i think its should be ( i know that i need to trigger the HSC whitin the time of the timeout of waiting to the start trigger of imaq to accure, that is why i put a big number there... )
    BUT, this vi doesnt work, the High speed capture doesnt happend at all...
    Can you take a look on these vi and let me know what i'm doing wrong here.
    I really appriciate your help.
    Regards
    Mor
    Message Edited by M0Reng on 08-03-2009 02:14 PM
    Attachments:
    HSC in motion activate the start of imaq in second loop.vi ‏72 KB
    HSC triger directly the start of imaq.vi ‏71 KB

  • Making sure Network High Speed Cable is being used

    Hey all,
    I have a quick question.
    I have a new iMac 24 inch Alum computer. I have a highspeed internet system already. My modem is both wireless and linked with cables. I have the cable linked into my Mac.
    How can I make sure that my iMac is using the 'cable' instead of wireless? In Boot Camp WinXP mode, I faster download speeds, so I 'think' that OSX is using wireless mode.
    I have Airport turned off.
    Is there a way to secure and or set to priority, the 'cable' link route?
    Many thanks...
    Loving this Mac! Its a giant iPod!!!
    Bill

    Cool.. I didnt know if it was using WiFi or some other wireless direction that I didnt know about.
    I am hearing now that others are having download issues also in OSX after the latest update. One found a cure for it at MacRumours.com where they added DNS entries and suddenly the download speeds in cable and AirPort were resolved and back to high speeds.
    Bill

  • How to measure high currents accurately (upto 24A) using FPGA

    I need to measure high currents accurately. I have only a FPGA board and TBX 68 terminal block. Do I need any other NI hardware?

    The answer will depend on your specific situation, such as the voltage levels you are working with, the source of the current, the influence some additional components such as a shunt resistor may have, etc. Can you provide more details about the application, the source of the current, the voltage levels, how quickly the current will change, the stimulus for a current change, etc.
    The most common method to measure a current is to add a shunt resistor in the current loop and measure the voltage across the shunt to calculate the current based on the voltage and resistance. You would need to make sure the absolute voltage levels (relative to the ground of the FPGA board) do not exceed its specifications (+-10V). The value of the shunt will depend on the current and the accuracy you need in the measurement.
    If you use a 5 milliohm shunt, then you will have a 0.12V drop across the shunt resistor at 24A. The 7831R has a relative accuracy of about 300uV, this would translate into a relative accuracy of about 61mA for a 5 milliohm shunt (absolute accuracy will be less). If you cannot tolerate a 0.12V drop at 24A, then you will have to use a smaller shunt resistor which will give youless accuracy in the current measurement.
    The shunt resistor value will have to be precisely measured ahead of time using a good DMM and a 4-wire resistance measurement. There will be some error associated with this measurement. The resistance will also change due to self-heating as the current through it changes (0.12V * 24A = 2.88W) adding some non-linearity to the measurement.
    This is probably the simplest approach. If this setup is not feasible (e.g. the voltage in not within the 7831R input range) then you will need some additional signal conditioning. There are some off-the-shelf components for measuring larger currents that would translate the current into a voltage that you can measure with the FPGA board. Look at the following component as a place to get started.
    A closed loop current sensor like the following may work. It runs off a 5 V supply, and is relatively easy to wire up:
    http://rocky.digikey.com/scripts/ProductInfo.dll?Site=US&V=102&M=SCD20PUN
    Christian L
    NI Consulting Services
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • High Speed Digital I/O using 6533

    I would like to have a application sending out bit sequence through port0 of PCI 6533 card, and using port2 recieve those bits, then do a pattern matching.
    I set the output bit pattern changes at the 10th iteration of my control loop, however, I got the changed bit pattern at lots of iteration later. I cannot figure out what happened.
    I want to achieve the pattern matching in the oder of milliseconds(immediately knows the bit pattern has changed). But it seems my programs structure cannot do that. Please take a look at my program and give me some advice, thank a lot.
    Best Regrads,
    Stee
    Attachments:
    Testing_6533_buffer.vi ‏143 KB

    Hi Stee,
    I might have a couple ideas why your data might be delayed. But help me understand what you are trying to accomplish. Are you trying to acquire continuous data from port 2? Are you acquiring it using change detection (you want to acquire everytime there is a difference in the data)? Do you want to acquire it with a pattern match trigger?
    What I imagine is happening is that you are only acquiring data every so often and the PCI-6533 card by default is transferring this data via DMA. The interesting thing about this is that if you need each sample right away transferred to the PC Memory so you can read it, it might not happen with DMA. This is because in DMA mode on the PCI-6533 the "MITE" chip that packs data for transport waits until it h
    as enough samples to send. Therefore, if you are only acquiring so often, you might be trying to read the present data (which is on the board) but the MITE is waiting to pack the data and send it to the PC Memory so you can read it.
    What you need to do in this case is use the Set DAQ Device Info.vi to change the transfer mode from DMA to interrupts for the second group (your digital input). In interrupt mode, as soon as you input data, it is sent via interrupts to PC Memory. This means it won't wait for a "packet" to be filled before it sends the data. This means if you are acquiring digital input at rates up to 500kHz, interrupts will allow you to get the data right away.
    Anyway, let me know if I wasn't clear in my explanation. Hope that helps.
    Ron
    Applications Engineer
    National Instruments

  • Fan is running on high speed, no signal to the monitor!

    Hi!
    I have the following Problem with my G5:
    It worked perfectly, but suddenly yesterday, I switched it on, it began just like always to boot the system, but i had no signal to the monitor.
    After a couple of seconds the fan started to run very fast and did not stop anymore (at least for then minutes, then I switched the G5 off, because it's annoying)! I've treid it again, but the same Problem occured...
    Has anyone else already had this Problem?
    What are the reasons for this, and how can i solve this Problem?
    Cheers, Markus

    Hello Markus, and a warm welcome to the forums!
    Boot off your original G5 Install Disk while holding down Option/alt key to select AHT, then run the extended Apple Hardware Test.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc that came with your computer, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot.

  • High speed and Low Speed CAN

    Hi
    This is my first time to use CAN.
    I have LabVIEW  2010 and  LabVIEW FPGA
    I have NI 3110 Dual-Core Industrial Controller with Windows OS, NI 9157, NI 9852 CAN Low Speed Module and NI 9853 CAN High Speed Module to be used to monitor the CAN messages from an ECU unit.
    The connection is done as the following:
    ·         The High speed CAN is connected to the NI-CAN 9853 (Port 0)
    ·         The low speed CAN is connected to the NI-CAN 9852 (Port 0)
    ·         The baud rate of the 9853 is 500kbps
    ·         The baud rate of the 9852 is 50kbps
    ·         Both modules are set to “Listen Only”
    ·         “Module Clock” in both modules is set to 20MHz
    ·         CAN networks are 29-bit and 11-bit.
    My consideration is to read all the messages from both modules without losing any message. Below is a picture from the block diagram on the FPGA target, is this the best way to read CAN messages from both modules? Also, could you please suggest what is the best way to read the messages on Host vi?
    Unfortunately, I do not have the module right now to do some test, so that I cannot get the iteration time (“CAN Low Speed Loop” and “CAN High Speed Loop” show in the picture below), could you please tell how to calculate the iteration time needed for each loop depending on the above information.

    The way that you have proposed to use the CAN module to monitor the BUS is a bad idea.  We have a prebuilt driver that will do most of this work for you.  You will need to download and install the NI-CAN 2.7.3 and then you will be able to use the example finder.  In the example finder look for.
    The example finder is accessed through the Help menu.
    Jacob K || Applications Engineer || National Instruments

  • Problems Scaling a Signal with a FPGA!!!

    Hi!!! I am working with this system:
    1) NI 5761 The ADC Module:
    Sample rate: 250 Ms/s
    14 bits of resolution
    4 channels simultaneously sampled
    2) NI PXI-795xR:
    FPGA Xilinx Virtex-5 SXT
    Recomended for high-speed digital signal processing
    Continuous filtering is a typical application
    3) NI PXIe-1073
    Chassis with 5 slots for the NI Cards.
    MXI-Express controller integrated to link with the host computer at least at 208 MB/s
    And I am trying to sacale a signal but I get something extrange. Anyone know what is happening?

    It is hard to tell from the picture you have shown.  It appears like you are trying to scale by half, but that perhaps every other sample being returned is zero.  Without knowing more about how you are trying to scale the data it is hard to guess as to why you are seeing this behavior.
    The NI 5761 adapter module has a few different CLIPs: Single Sample, Multi-Sample and Low Speed. Which one are you using?  Did you start with an example program such as "NI 5761 Getting Started"?
    The Getting Started example uses the Multi-Sample CLIP, and packs two samples per cycle into a FIFO to pass back to the host.
    The raw binary data is unpacked and scaled to volts in the host VI.  Are you attempting additional scaling inside of the FPGA code or at the host?  Are you working on two samples in parallel to scale both samples from the Multi-Sample CLIP? Check for the data types within your scaling algorithm (U16, U32, I16, I32 ?) to make sure you aren't inadvertently coercing the data to cause the problem.  If you are still having difficulty, perhaps you could post the VI or a picture showing what you are doing, and also provide details on how you need to scale the data ( simple multiply/divide by power of 2, linear etc).
    Attachments:
    GettingStarted.jpg ‏205 KB

  • Onboard Wait On High Speed Capture

    I would like for an onboard program to wait for a high speed capture signal from a trigger input. Unfortunately, I have not had success with the flex_wait_on_condition function; it has always timed out before detecting the event. However, calls to the function flex_read_hs_cap_status identify that the high speed capture line is indeed toggling faster than the 3 second timeout. I use the following sequence of functions to configure the high speed capture:
    flex_configure_hs_capture(m_BoardID, NIMC_AXIS2, NIMC_HS_LOW_TO_HIGH_EDGE, 0);
    flex_begin_store(m_BoardID, ProgramNumber);
    flex_enable_hs_capture(m_BoardID, NIMC_AXIS2, NIMC_TRUE);
    flex_wait_on_condition(m_BoardID, NIMC_AXIS2, NIMC_WAIT, NIMC_CONDITION_HIGH_SPEED_CAPTURE, 0, 0,
    NIMC_MATCH_ANY, 30, 0);
    flex_end_store(m_BoardID, ProgramNumber);
    Axis 2 is configured as a open loop stepper axis with encoder resource 2 mapped to it.
    Any thoughts as to why this wouldn't work?
    Thanks!

    Thanks for the suggestion. It seems to work fairly well, although there is some delay between the trigger event and the execution of the critical section of code.
    Are you aware of a method to speed up execution of an on-board program? The critical section of code in the attached program fragment takes about 4ms to execute. With the added delay of the polled high speed capture line, I am limited to a ~150 Hz loop. I would like to increase the execution time by about twice.
    Also, a command from the host computer seems to preempt the on-board program, causing it to take up to ten times as long to complete. Is there a way to set the priority of the on-board program task above host communication?
    Thanks for you assistance,
    Mike
    flex_insert_program_label(m_BoardID, LABEL_LOOP_START); // main program loop
    flex_read_hs_cap_status(m_BoardID, NIMC_AXIS3, DATA_HS_CAP_STATUS); // check if high speed capture triggered
    flex_and_vars(m_BoardID, DATA_HS_CAP_STATUS, DATA_HS_CAP_STATUS_MASK, DATA_HS_CAP_STATUS_MASKED); // AND high speed capture with trigger 3 mask
    flex_jump_label_on_condition(m_BoardID, NIMC_AXIS3, NIMC_CONDITION_EQUAL, NIMC_FALSE, NIMC_FALSE, NIMC_MATCH_ANY, LABEL_LOOP_START); // if trigger 3 not triggered, jump to main program loop
    // Critical Section Code >>>
    flex_set_breakpoint_momo(m_BoardID, NIMC_AXIS3, 0x08, 0x00, 0xFF); // set digital output high
    flex_enable_hs_capture(m_BoardID, NIMC_AXIS3, NIMC_TRUE); // re-enable the high-speed capture
    flex_read_adc(m_BoardID, NIMC_ADC1, DATA_ANALOG_INPUT_1); // read the analog input
    flex_write_buffer(m_BoardID, ANALOG_INPUT_BUFFER, 1, 0, &UselessLong, DATA_WRITE_TO_BUFFER_NUM_PTS); // write the analog input to the buffer
    flex_read_buffer(m_BoardID, VELOCITY_PROFILE_BUFFER, 1, DATA_VELOCITY_CMD); // read the next velocity profile point
    flex_load_velocity(m_BoardID, NIMC_AXIS3, UselessLong, DATA_VELOCITY_CMD); // set the axis velocity
    flex_start(m_BoardID, NIMC_AXIS3, 0); // update the velocity by calling start
    flex_set_breakpoint_momo(m_BoardID, NIMC_AXIS3, 0x00, 0x08, 0xFF); // set digital output low
    // <<< Critical Section Code
    flex_jump_label_on_condition(m_BoardID, NIMC_AXIS3, NIMC_CONDITION_TRUE, NIMC_FALSE, NIMC_FALSE, NIMC_MATCH_ANY, LABEL_LOOP_START); // jump to main program loop
    flex_end_store(m_BoardID, ProgramNumber); // stop program store

  • High speed sampling with analog trigger

    I am a new user of DAQ card and I need to sample the analog signal with a high speed.
    I will use a sinusoidal-like wave to trigger the sampling and set a voltage around the peak of trigger wave with rising slope. When the voltage arrived, I only sample one point from CH0 or CH1. The frequency of the trigger wave is about 5MHz and I heard the LabView only works at KHz level. Is it possible to use LABView to realize my application?
    If it's possible, would you mind telling me how to realize? Or if it's not possible, would you mind telling me what to do? My DAQ card is PXI-5112.
    Thank you very much!!!

    Hello amo71993,
    I guess in this case the solution is creating the little app programatically, save it as a VI and the use it as a function (subVI). Nevertheless I will be researching to see if there is another option and I will post it here.
    Regards.
     

  • I have slow internet speed and having issue with download of photoshop cc is there an alternate I can go somewhere with high speed to download.

    I have slow internet speed and having issue with download of photoshop cc is there an alternate I can go somewhere with high speed to download. without using this creative cloud that downloads first.

    We need to know more about your system, please download EtreCheck and run the report and please post it on your next reply. Then we can see how your system is configured, what apps are on it and look for anything obvious. We will look forward to seeing your report.

  • Segment signal generation

    Hi!
    How is it possible to generate such a signal (picture attached)?
    https://pp.vk.me/c622024/v622024951/33e6f/I3zJNTMGiU0.jpg
    A link to the answer (if there is one in this forum) would be awesome.
    Thanks 
    Solved!
    Go to Solution.
    Attachments:
    I3zJNTMGiU0.jpg ‏50 KB

    Many thanks. I did it using Ramp pattern VI and for loop.
    The result is attached.
    Now I need to sent this result to control and simulation loop.
    This signal have to be desired position of my actuator insted of Knob (now I set the desired position using knob). check the attached vi.
    But as I found out it is impossible to put 'for loop' inside of 'control and simulation loop'.
    'control and simulation loop' also do not want to read updated signal from the outside, if I place my signal generation (using Ramp pattern VI and for loop) outside of 'control and simulation loop'.
    Coul you please suggest somth?
    THANKS
    Attachments:
    Ramp pattern.vi ‏16 KB
    VCA by Knob.vi ‏672 KB

  • Must I have a high speed USB port?

    Every time i connect my brand new 60 gig ipod to my computer a bubble pops up saying "A high speed device is plugged into a non-high speed USB port" Ive seen this before with other devices and its never been a problem, however with this ipod plugged in my computer freezes up, i can still click stuff and all but nothing happens, and then when i disconnect the ipod everything pops up and its like it was never frozen....very wierd, like the screen freezes when the ipod is plugged in. Anyone have any advice for me?

    No, you do not have to have a high speed usb port to use the pod or iTunes. It really does make it much faster though, but it is not necessary.
    I get the same bubble at home where I have the older 1.1 usb ports. It takes about 3 to 4 minutes to read my Pod and associate it with my PC. This happens everytime. The more you put on it, the longer it is going to take.
    On my new laptop which has 2.0, it takes 25 seconds to register everything. That's 3500 pics and 16 gigs of music; Hence you can see why 2.0 is on my christmas list for the desktop lol.
    Try giving it at least 5 minutes to fully register. The first time you do it, it always takes a long time. Also do you have any other USB things hooked up that may be conflicting with the pod?

  • Digital start trigger and high speed camera

    Is there any particular option or way available in LabVIEW to initiate the data acquisition and high speed camera using a digital start trigger? If yes, shall I create a task for high speed camera and then synchronize it with the other tasks?
    Kind Regards, 

    Hi Helen19411,
    The way to trigger data acquisition in LabVIEW is to use the 'DAQmx Start Trigger VI'. To set this up I recommend taking a look at this example: 
    http://www.ni.com/example/25282/en/
    Without any information about the high speed camera you are using, I can't give much advice. If the device is viewable in MAX then you may be able to create a task, and so long as you synchronise both channels in your code, the digital trigger should activate both events.
    Kind Regards,
    TomS
    Applications Engineer
    National Instruments

  • I have an NI5911 high speed digitizer and would like to acquire a video signal from a CCD using it. Does anyone know if this is possible without buying any more hardware please? If it is, how would I go about it?

    The only thing I succeeded in finding on the NI site was about using a different high-speed digitizer in tandem with an IMAQ card but I was hoping not to have to buy an IMAQ card as it means I may as well not have got the NI5911 (a while ago) in the first place. Any help would be greatly appreciated!

    You can certainly acquire video signals with the 5911. The only tricky part is that the 5911 does not have any video triggering options. That means that you will have to either find a way to provide your own trigger based on the video signal (that's where the IMAQ board comes into play) or you can just take a lot of data and keep only the data you need once it is in software. For instance, you could take one large record and then use software analysis to determine where the frame sync occurs. Hopefully this was helpful.

Maybe you are looking for

  • Acrobat Pro 9.5 on OS 10.6.8 - Activation issues - hd migration.

    I use the creative suite 5 installed on a MacPro with os10.6.8. I just changed the hard drive and I transferred all applications with apple migration assistent. Now I have problem with acrobat pro 9.5. When I launch Acrobat, message appears: "Activat

  • Looping over context automatically?

    Hi, I need to create something like a bill. Every position in the bill contains of several lines. From my context structure I have a node positions with some data value (headerdata for the position) and a node lines with again dome data. I would now

  • Manually execute mapping - ORA-01017: invalid username/password

    Hi Gurus, I know this is an old thread. But I can't solve this problem anyway. Environment: OWB 10.2.0.1 I've developed a simple mapping for test purpose. I've deployed it successfully and I can execute the package generated from the mapping in SQL*P

  • About 'used webdynpro components'

    Hi Gurus, I was testing a sample application to use webdynpro componentisation. Situation:    Project 1:      Component 1.1    Project 2:     Component 2.1 I need to reuse the Component 1.1 in component 2.1 So I added component 1.1 to  Project1's pub

  • Windows 2003 and windows 2008 for applications server

    hi all. i want to know about windows that which one is better for application server 10 R2. which one is better windows server 2003 or windows 2008? please if anyone knows about the difference and about the performance please help me out thanks. Any