Counter Input with Delayed counter Output with board 6023E

HELLO
Is possible with board 6023e have two counters working at same time in this case i need a counter to creat a delay and another one to read. If isn´t possible how i can have a delay in microseconds.

Yes, each one of those boards have two STC counters you can use. Take a look at the User Manual of the boards for more information. When looking at the pin diagram for the boards, the counter pins are GPCTRx_.
If you are using LabVIEW, CVI, VB or VC++, when you install NI-DAQ, it will install a lot of counter example programs which will show you how to program the counters.
Brian

Similar Messages

  • Route multiple 6602 counter inputs to one counter output...

    Hi!
    I´d like to route 4 different ttl signals, that are read by 4 different counter inputs to one single output channel (e.g. the output of one of the counters used) using pulse train generation with a divider of 4. Note that only one of the four inputs is active at the same time, to prevent overlay.
    How can I do that with Traditional-DAQ?
    Setup would look like this on the SCB-68
    TTL1 ----o in0 (ct0)----o out0 TTL(1..4)/4 [Hz]
    |
    TTL2 ----o in1 -- (output of ct2 is redirected ro ct1)
    |
    TTL3 ----o in2 --
    |
    TTL4 ----o in3 (ct3)--
    May it be better to just output each counter input signal at it´s own output and connect these outputs to one free I/O-pin hardwired?
    Best regards
    Zorniki

    In the end I configured a counter for Pulse Train generation and opted to change the duty cycle and frequency via 'DAQmxWriteCtrFreqScalar" (i.e. Pulse Width Modulation)
    I registered a callback for the 'DAQmx_Val_CounterOutputEvent' and then changed the dutycycle and frequency in that callback. 
    Unfortunately, I kept getting  "The pulse generation with previous property settings must complete a
    full cycle before the property can be updated." error messages and, opon further reading, managed to find a doc where National Instruments suggest adding a 'Wait(period)' before executing the 'DAQmxWriteCtrFreqScalar' call.
    The problem with this solution is that it one has to wait a minimum of 2 Periods before the Pulse Train can be modified which is not acceptable for our work.
    So is there an alternative solution which allows us to change the Pulse Train after only 1 Period ? Is there an event we can trap which allows us alter the Pulse Train after every period ? I'm sure PWM must be possible on Daq cards (PCI-6602 or PCI-6281 or PCI-6259)?
    Cheers, Shaun.

  • Processing counter input into an analog output

    Greetings to all --
    I've set up a PCI6070E card to do digital input through its "counter 0" channel and output through its "AO 0" channel.
    I'm brand-new to Labview, however, and having trouble figuring out how to design my program.  In short, this is what I want to do:
    1. Count the number of pulses, let's call it P, that arrive at the counter in a given time increment.  (Ideally, this time will be adjustable from 1 microsec to 1 sec.  In reality, I may have to settle for some number of milliseconds or more, as Labview doesn't seem to like to do loops at more than 1khz.  But that's an issue for another day.)
    2. Perfrom a mathematical operation to turn P number of counts into some number N between -10 and 10
    3. Set the analog output to read N volts
    4. Reset counter to zero and start over at (1.) again.
    I can make labview count pulses in, and I can send voltage signals out, and I can use the front panel to get the inputs I need from the user for the mathematical operation,  However, I'm having trouble with counting how mant pulses hit in a given time increment, and then resetting my digital counter to zero.
    Can anyone point me at the right function names or help files, or suggest a rough program flow?  I appreciate it.
    Chad
    [email protected]

    Chad,
    The only way you can perform this type of operation with your device is in software.  See the knowledge base entries below for more details. 
    HW resetting Counter on an STC Device:
    http://digital.ni.com/public.nsf/websearch/55AF6CA​DD87F6F7786256B89005B8AFD?OpenDocument
    How To Reset in Software:
    http://ae.natinst.com/operations/ae/public.nsf/web​/searchinternal/65e3dbc715998c3286256e900075b7f8?O​...
    Regards,
    L. Allen

  • Having Trouble with 5.1 Output with the New SurCode Codec in PPro CC

    I've got a 5.1 audio track and I'm using the trial for the SurCode codec, but they've changed a lot of stuff around since I last used it with Premiere Pro CS5.
    Here is my timeline:
    And my current settings for the CurCode Codec:
    When I open the exported .ac3 file in Audicity this is what I get:
    So it has basically just mixed everything down to the front left and right channels, but still exported a 5.1 file.  And I did check to make sure Audicity would open a 5.1 .ac3 file and show audio on all the tracks.
    I'm assuming that some of my settings with the SurCode Codec are incorrect.  Could someone let me know what I'm doing wrong?
    Thanks!

    SOLUTION
    Sorry, I feel dumb.  I figured out what my problem was.  I had created the sequence as a stereo sequence rather than 5.1.  Once I changed that, everything worked fine.
    Hopefully if someone else makes the same mistake this post will help them out.
    Maybe someone could explain some of the settings for the SurCode Codec, though.  For instance, I have no idead what "Primary Level" means.  Or what I should set the dialog level to (I just guessed -12 because that's usually what I like dialog to be around).
    Some tips on these settings would be greatly appreciated.  I found this page on Minnetonka's website, but it doesn't have a manual for this version of the codec (at least not that I could find): http://minnetonkaaudio.com/index.php?option=com_content&view=article&id=61&Itemid=66http:/ /

  • Two counter inputs and counter output NI 9401

    I am trying to configure two counter inputs and one counter output on one NI 9401. I have looked and found how to configure digital lines in booth directions but it seems like I can only do two counters in all on one module. Can someone verify this for me or let me know how to get all three on to one module?
    Thank you

    Hi mschoenwald,
    The counters are actually located on the backplane of whatever chassis you are using--I'll assume you are using cDAQ and not cRIO.
    If you have the older <link no longer exists>, then there are only 2 counters available in general.  You can access both from a single parallel (8 lines or less) digital module in slot 5 or 6 of the chassis.
    The 2nd generation Compact DAQ chassis (including 9174, 9178, 9181, 9188, etc.) includes 4 counters.  You may access them from any slot with a parallel module.  There is no restriction preventing you from accessing all 4 simultaneously from a single module.
    The 9401 is bi-directional and configurable by nibble (line0:3 may be configured one direction, and line4:7 another).  However, it is quirky in that it requires the line direction to be configured before any of the tasks are started.  This is because the data lines themselves are used to set the line direction behind the scenes.  The best way to work around the behavior is to use DAQmx Control Task to explicitly reserve your tasks before any of them are started (see here).  Keep in mind that the counter output should use the opposite nibble from the two counter input tasks.
    Best Regards,
    John Passiak

  • Active data Guard but with delay on applying redo logs

    Hello,
    A question: Active Data Guard gives the possibility of having a physical stand-by database open read-only, for instance for making 'up-to-date' reports.
    Data Guard also has the possibility to apply logs with delay, for instance with a delay of some hours. Every commit on primary database is applied to standby after the delay period.
    Can this delay be combined with Active Data Guard? This means that standby database is open read-only but with the delay... In case the delay is 2 hours, every report created on standby is ("up-to-date" minus 2 hours)...
    Thanks for your answer,
    Jan.

    Hello All,
    I answered my own question: indeed it is possible to activate 'real time apply' but with a delay in applying the logs. In EM-11 check the box "enable real time query" and apply. Nect go to thje tab "standby role properties" and change the value after "Apply delay" to for instance 30 minutes. Apply also.
    Log on on the primary, create a table, insert some rows and do some logswitches. Log in on the standby and check for the new table. Notice that after 30 minutes the switched logs are applied, even when you change the delay period within the 30 minutes. The information about the delay seems to be in the log, since it is possible to change the delay immediately after the logswitches to 3 minutes, drop the table and do some logswitches again. The logs with the 'create table' statement in it are NOT applied after 3 minutes, but still after 30 minutes. The drop of the table however is done after 3 minutes on the standby. So the 'delay' information is in the log sent over to the Stand-by!

  • Sequence 1create output digtal signal- 2 make microsecon​ds delay or less- 3 measure digital signal with board 6023e

    hello
    I need creat a digital signal and for this i use a counter output and then i need creat a delay after  a signal measurment and for this i use again a couter. My problem is how i can make this delay betwen create and measure a signal. this delay must to bethe shortest  possible  and precise. une of my attemps was make  a sequence and for make the delay i create a task for une virtual output with max frequency 5000000hz and just une pulse but i dont know how many time the labview get to go by the first task ( creat a output pulse and ent it) to make tis task before discribed to the last task (measure a digital sinal). Another thing that i dont know is how many time the libview get to create and eliminate une task. Une information beyond the kind of board (6023E) that can be useful to help me  with this problem is the information about my pc in this case i use a pentium4 3Ghz.
    thanks  

    ...My problem is how i can make this delay betwen create and measure a signal.
    ...how many time the labview get to end one task and start another one.
    What I tried to say is, that even if you use the counter of the 6023e-Board
    to create the delay and trigger the measure via LabView under Windows,
    you leave the realtime-path. Executiontime of LabView-code is then not
    determinated.
    One way to solve this, is triggering measurement via hardware and use LabView to read Data from the Buffer of the DAQ-card.
    You can find more info about DAQ in the "measurements manuall" of NI, delivered with your LabView Software.
    Lorand

  • Two counter outputs with 90deg phaseshift

    Hi,
    I have NI PXI-1042 chassis and two NI PXI-6513 digital output cards in it.
    Task is to create two pulses with 90degrees phaseshift.
    Is there function in labview 7.1 which generates pulses descriped above. I`m meaning that if I tell function to count up, signal A is ahead signal B and if A is 90 degrees behind B it means counting down?
    Is there way to do this by connecting 3 (signal A, signal B and GND) counter wires all in one counter and controlling only one counter to "count output down" or "Count output up"? 
    - Santtu

    Hi Santtu,
    I think I understand what you are trying to do. 
    Essentially you have two counters, but you want to be able to control their
    phase relationship to one another.  This is definitely possible to do;
    however, there are not many examples dealing with it.
    I did find one Traditional DAQ Example (non- M-Series) that
    might help you out with this: Twin
    Pulse Train Generation with Variable Phase Shift Control
    Traditional DAQ uses an older API, so I would recommend you look at the
    attached example over this example.  Just wanted to give you more
    than one option.
    As far as it 'counting' up or down, that really would have
    to be done by a counter input task.  Since the input would be the same as
    that for a quadrature encoder, then you would use the methods described in my
    previous post.  As the output it will simply look like two different
    counters.
    For the best solution though, I went ahead and created an
    example for you.  It shows how to generate 2 different counter pulses that
    are out of phase with one another by a specified amount of time. 
    Hope this helps,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments
    Attachments:
    Gen Dig Pulse Train-Continuous-Dig Start-Phase Shift.vi ‏82 KB

  • PCI-6602 - What to do with unused counter inputs?

    I've got an application where I need to track the position on two quadrature encoders.  I've developed my application with VB6 however, I've been using a sample LabView program called "Meas-Ang-Pos-Buff.vi" for testing purposes.  (I got the example off the NI discussion board).  I'm seeing some very odd results that I can't explain. 
    For testing purposes, I've got one encoder tied to multiple channels on my 6602.  I have the same 'A' signal and the same 'B' signal (from the one encoder) jumpered to multiple encoder channels.  I'm using a onboard pulse generator to generate the latch pulse (connected to the Index/Z of each counter) to ensure there is no skew in my count values.  I'm using an external servo to turn the encoder at a rate equal to my application speed.
    The unexplanable results I'm seeing are below:
    If I'm monitoring counters 0, 1 and 2, I see the following.
    1)  If I have counters 0,1,2 and 3 inputs connected to the same 'A' & 'B' from my encoder, the counts on all 4 channels (0,1,2,3) track perfectly.
    2)  If I disconnect counter 3 and only have counters 0,1, and 2 connected to the encoder, then counter 0 and 2 track perfectly, but counter 1 looses pulses (only when traveling in one direction, the other direction seems to be fine)
    3)  If I connect counter 3 to ground and have counters 0,1, and 2 connected to the encoder, I get the same result - bad.
    4)  If I connect EVERY counter input (2,3,4,5,6) to ground and only monitor counters 0 and 1, I still get bad results.
    In summary, I ONLY am able to see the same number of counts while monitoring 3 channels IF 7 of the 8 counters are connected together (the 8th being my latch).
    This happened to me in the past on a previous setup that did the same thing, but I was able to fix it by moving from counter 1 to counter 4.  At that time, I chalked it up to a bad counter 1, but I think there is a bigger issue since it is happening again.
    Please any advice would be appreciated.

    Thanks for the response.  This one has really got me confused and any help is greatly appreciated.
    To answer your questions, no I have not modified the sample program and I'm using NI DAQ v8.5.
    I've decided to break the problem down to see if I could find a pattern, but no such luck.  Here is the testing that I've done.
    I'm making the following connections while using the sample program I mentioned earlier:
    Counter 0...............PFI_39 (term 02) - Channel_A(0).................PFI_37 (term 40) - Channel_B(0)
    Counter 1...............PFI_35 (term 07) - Channel_A(1).................PFI_33 (term 06) - Channel_B(1)
    Counter 2...............PFI_31 (term 34) - Channel_A(2).................PFI_29 (term 66) - Channel_B(2)
    Counter 3...............PFI_27 (term 31) - Channel_A(3).................PFI_25 (term 63) - Channel_B(3)
    Note:  I connect the "Z" channel for gating purposes in my VB application, but this isn't required in the LabView sample program since the gating appears to be done internally.
    My testing results:
    1.  If I jumper my one encoder to channels 0,1,2, & 3 at the same time, everything works great.  Each channel reports the same number of counts regardless of whether I'm turning the encoder in the positive or negative direction.
    2.  If I disconnect channel 3 and only have 0,1 & 2 connected, then 0 & 2 track perfectly, but channel 1 looses counts in the negative direction.
    3.  If I only connect channels 0 & 1, then channel 0 counts perfectly in both the pos and neg direction, but channel 1 looses counts in the negative direction.
    4.  If I connect any channel by itself (0,1,2 or 3), each one counts perfectly.
    5.  If I connect channels 0 & 4, everything seems to be fine.
    Like I said in my previous e-mail, if this hadn't already happened to me in a previous application, then I would chalk it up to a bad board.  If I didn't get good results on each individual channel then I would chalk it up to a bad encoder pulse train.  However, it definitely seems to have something to do with connecting multiple counters at the same time in a Motion Encoder Application.  I have read the 6602 User Manual backwards and forwards looking for a nugget of explanation, but have found none.  There was a section entitled "Counter Input Selections" on page 4-12 (table 4-2) that might offer some explanation, but neither me or my colleagues could understand what was being described.  Any help deciphering that would be appreciated.
    As of now, I'm going to proceed with my application, using channels 0 &4 (just as I've done in the past), however I don't feel comfortable not having an explanation for the 6602's behavior.  Any insight would be greatly appreciated.

  • Benchmarks for Buffered Counter Input with X-Series Devices

    Hi,
    Does anyone know the maximum transfer rate (using dma) for the x-series cards? 
    I'm looking for data simillar to the one in this link:
    http://digital.ni.com/public.nsf/allkb/72A7E41EE5A8756A862571DA0076F1D7?OpenDocument
    More specifically I want to know the transfer rate for the PCIe 6343.
    Thank you,
    Eyal
    Solved!
    Go to Solution.

    I benchmarked 8MS/s on a single channel on a USB-6353 (should have similar performance to the USB-6356/66) with a buffered counter input task. This was only a 10 minute test on my Dell E6400 laptop ( Windows 7 32 bit, Dual core P8600, 4GB memory) so a sustained 24/7 rate is likely less. Also, I wasn't doing much with the data, just displaying it in an array. This is pretty much topping out USB streaming on this system (32MB/s) so I wouldn't expect to get higher. I wasn't running much else in the back ground (Explorer, Powerpoint, Lotus Notes) and CPU was at ~20%.
    Hope this helps,   
    Andrew S
    Getting Started with NI-DAQmx
    Measurement Fundamentals

  • Counter Output/Counter Input PXI Signals Behaving Erratically

    Question for all your LabVIEW guru's out there,
    I am running a frequency loopback test using the NI PXI 6229 MIO DAQ card.  I am generating a "Counter Output" pulse train signal which feeds through my device under test and then back out of my device under test and back into the PXI 6229 for a "Counter Input" frequency measurement.  Both the "Counter Output" and the "Counter Input" are assigned different PFI lines using DAQmx in LabVIEW.
    I have 4 lines to test on my DUT.  All four lines run this same frequency measurement but with different PFI lines on the PXI 6229.  Each line is test independently.
    This is my setup for the 4 lines:
    Path 1: P2.0 (Counter Output - Pulse Train) -> DUT (Device Under Test) -> P2.1 (Counter Input - Frequency Measurement)
    Path 2: P2.2 (Counter Output - Pulse Train) -> DUT (Device Under Test) -> P2.3 (Counter Input - Frequency Measurement)
    Path 3: P2.4 (Counter Output - Pulse Train) -> DUT (Device Under Test) -> P2.5 (Counter Input - Frequency Measurement)
    Path 4: P2.6 (Counter Output - Pulse Train) -> DUT (Device Under Test) -> P2.7 (Counter Input - Frequency Measurement)
    where:
    P2.0 = PFI8
    P2.1 = PFI9
    P2.2 = PFI10
    P2.3 = PFI11
    P2.4 = PFI12
    P2.5 = PFI13
    P2.6 = PFI14
    P2.7 = PFI15
    I have a LabVIEW VI which generates the "Counter Output" and reads the "Counter Input" frequency.  I am seeing weird behavior from the PXI 6229 card. I can test "Path 1" and "Path 2" and the frequency I read is what I generated. No issue there. However, when I test "Path 3" and "Path 4" the frequency measurement is erratic.  The readings are two different frequencies repeated over and over again and none of those frequencies are the expected frequency which was generated out of the "Counter Output."  If I reset the card, and start by testing "Path 3" and "Path 4" the frequency readings are correct and the erratic behavior is gone.  However, when I try to then test "Path 2" and "Path 1" now those lines have the erratic frequency issue. I can continue resetting the card and see same issue. The PFI lines that I test first will always pass.
    To summarize:
    Steps Taken:
    1. Test Path 1 = SUCCESS
    2. Test Path 2 = SUCCESS
    3. Test Path 3 = Erratic Frequency (Two Frequencies repeated over and over again in my frequency results array)
    4. Test Path 4 = Erratic Frequency (Two Frequencies repeated over and over again in my frequency results array)
    5. Reset the PXI 6229 Card
    6. Test Path 3 = SUCCESS
    7. Test Path 4 = SUCCESS
    8. Test Path 3 = Erratic Frequency (Two Frequencies repeated over and over again in my frequency results array)
    9. Test Path 4 = Erratic Frequency (Two Frequencies repeated over and over again in my frequency results array)
    I am wondering if Port 2 (P2.0-P2.7) on the 6229 card has certain dependecies and this is why I am seeing issues.  I am trying to get around this issue so that I don't have to always reset the card.
    Are P2.0-P2.3 (PFI8-PFI11) and P2.4-P2.7 (PFI12-PFI15) treated differently or require different setup?  How do I resolve this issue?
    Thanks so much!

    I have a theory...
    The DAQ card follows a policy called "lazy uncommit" wherein the terminal used for the output will continue to be connected to the counter even after the task has completed (until the terminal is needed for something else).  So as you run more tests, the counter output will end up driving more lines.  This behavior should be easy enough to confirm.
    As the DAQ card drives more lines, I'd imagine this affects the actual signal.  You could scope it to check, but it sounds like either the rise/fall times are becoming longer or some extra noise is being introduced on the line.  
    The readings are two different frequencies repeated over and over again and none of those frequencies are the expected frequency which was generated out of the "Counter Output."
    This implies you are picking up an extra edge during transitions--this isn't too uncommon if the signal is noisy since there is no built-in hysteresis on the DAQ card.  I would expect the measured frequencies to have periods that sum to either the full period or the semi-period of your actual signal (depending on how many duplicate edges are detected).
    Suggestions are as follows:
    To stop the DAQ card from driving multiple PFI lines, it would probably be easiest to just programmatically reset the device in between your tests (using DAQmx Reset Device).  If you can't reset the device (e.g. because you are running some other task that can't be interrupted) then you can instead configure a dummy task that uses the PFI line in question as an input.
    To stop the DAQ card from picking up multiple edges during transitions, you should configure a digital filter on the input terminals.  If you reset the device it sounds like this might not be necessary... it's up to you if you want to configure this or not.
    Best Regards,
    John Passiak

  • How to trigger a TTL output with an analog input

    Hello,
    I have an apparatus for measuring the flame speed of various hydrocarbon/air mixtures.  The chamber uses central ignition as the means for igniting the mixture.  My goal is to film the ignition process with a high speed Phantom video camera.  I control the ignition with an analog output signal from a SCC-68 DAQ.  I would like to trigger the camera with the same signal that triggers the ignition sequence.  The camera is triggered with one TTL pulse so ideally I would connect the output analog voltage signal to an input analog voltage port that would be used to trigger a counter output that generates one pulse.
    I have a sample VI that triggers a digital pulse each time the analog trigger level is met and it works for what I am trying to do but I do not understand how the two channels are connected. I also can't figure out how to make the VI end after just one pulse.  In the VI the digital counter is supposedly triggered using the /Dev1/ai/StartTrigger slot on the DAQ but nothing is connected to this slot.
    I need to first figure out how to make the output_pulses_on_sine_wave.vi terminate after a single pulse is generated. Then I can try to incorporate it into the VI that I use to control the ignition and measure the temperature and pressure once the mixture is ignited.
    John
    Attachments:
    output_pulses_on_sine_wave.vi ‏27 KB

    I am using the USB-6259, sorry for the confusion.  I would be nice if I could trigger with an analog signal to the ignition system but it is controlled with a high voltage relay that operates when 12 volts are supplied to it. It really isn't a trigger as much as powering on the high voltage relay. To control it, I have a 12 V supply line that is switched closed using a SCC-RLY module.  Could I somehow connect the 12 V supply to one of the buses and use a digital trigger to supply the 12V on command to the high voltage relay?
    Thanks for the quick response. 

  • Problems with external counter direction

    I have a DAQPad-6015 attached to a SC-2345, in slot 19 of the SC-2345 I have a SCC-CTR01.  Within MAX I have created a task to retrieve the counter information but because there is no option of a SCC-CTR01 I have configured it as a SCC-FT01.  Attached to the "SCR" input of the SCC-CTR01 I have a signal generator and on the test pannel I can see the counter count the edges as I wanted.  My next step is to externally control the direction with the "GATE" input on the SCC-CTR01 and have had no luck.  I am able to see the TTL signals from the SCC-CTR01 on the green connector stack, I can see the signal generator out on PFI 8 and I can see the "GATE" switch on PFI 9.  I am also able to switch the count direction by tieing P0.6 to 5 volts when in the mode of "Count Direction, Externally Controlled" is selected.  I am not able to connect PFI9 to P0.6 as there appears to be another output tied to P0.6.  Where do I go from here?
    Ken

    Hi Ken-
    The code snippet in that KB shows how to use a DAQmx Property Node to override the default direction terminal in case you need an isolated input terminal for your count direction and are using an M Series device (which features configurable counter terminals)
    I'm assuming you are using an E Series device judging by your P0.6 query.  To answer your question, Yes- you can use pin 16 on the built-in breakout area of the SC-2345 carrier to externally control the count direction of your counter.  There is no need to tristate the line as long as you specify "Externally Controlled" for count direction in your DAQ Assistant settings.  If you still require an isolated input terminal for the count direction you could use an SCC-DI01 module to interface directly with P0.6.  All of this information is available in the KB you mentioned.  Please let me know if you need additional clarification.
    Thanks-
    Tom W
    National Instruments

  • Don't know how to specify a digital input or output with Port Config

    I am trying to modify an existing VI that I did not write. I have a 6533 DAQ board connected to a relay box. I would like to use one of the lines on port 0 of the DAQ as an input (it will be a switch used to trigger the sequence of outputs). the rest of the lines I would like to be outputs. I don't know how to specify which line is an input and which is an output. I am using LabVIEW 5.1 and the current VI just contains a sequence of delays and pulse width for each channel. It uses Port Config to specify the port and line directions. Only it's set so that all of the lines are outputs. Does anyone know an easy way of using one input to control several outputs from the same port?

    Thanks.. that is what I thought but I didn't see any examples with the line direction map set up like that. SO.. now I'm stuck on how to use that input to trigger the outputs on the same port. I need to use the input as a switch to activate a sequence using the outputs. So first.. how to I single out just the input line to be used for the trigger. Normally when I need to do something like this I'm referring to channels and not Port lines. Also, how do I language the switch? Is the input going to be normally binary? 0 for off and 1 for on? So should I use a boolean statement?
    Thanks again for the help.. my boss doesn't know much about the programming either so I have to figure it out.

  • Generate two alternating PWMs with one counter of 6025E

    I am using LabView 6.0.2 with a PCI-6025E card. My requirement are to put out a pwm signal with 250Hz. The problem is, that for example, first a PWM with exact 100 pulses of duty cycle 1% is needed, after that exact 5 pulses of 10% duty cycle. These two PWMs are repetetive without any big pauses between. I tried this with Pulse Train Generation with "Changing Pulse Specs.llb" from the ni libraries, but the PC based on windows is not able, to do the PWM changes in these exact time slots. Note: The second timer of the card is used for another item.

    Unfortunately, you won't be able to do exactly what you want with a single counter. You'll need to use additional hardware. Here are some possibilities:
    1. Analog Output:
    A 1% duty cycle at 250 Hz requires a minimum of 25 kHz update rate, but your 6025E only goes up to 10 kHz. Your board is also limited by having only 1 DMA channel for Data acq buffered operations, and it may already by used by your other counter's operation.
    If you had an analog board with faster output, you could try to create a buffer with 0 V and 5 V values representing the desired finite pulse train. However, if the device you're controlling with PWM requires TTL edges, the rise and fall times of your DAC output may still not be fast enough to fool it.
    2.
    PCI-6601/6602 Counter/Timer:
    You could use two counters from a 6601 to generate the finite pulse trains you describe, but there would need to be a pause between the the two duty cycles. The pause is where your software detects the end of one finite pulse train and reprograms the counters to generate the other one. The pause might likely vary from 10 to 100 or more msec.
    If that variable dead time between pause trains is acceptable, the 6601 is the cheapest solution I know of for today's application. If you need reuse for future apps, you might want to consider the 6602 for double the price, but a bit more than double the capability.
    3. PCI-6533/6534:
    NI's timed digital boards would allow you to define the pulse trains as a one-bit digital pattern that you could generate continuously. I suspect the 6533 would suffice for the app you describe.
    Please double-check these hw suggestions with your local rep before ordering. (S)he'll know more than me about
    your present-day app and potential future needs. Good luck!
    -Kevin P.

Maybe you are looking for