Counterswa​p on a NI-6602

Hello,
I am programming a NI-6602, register level programming.
Programmed this card before, e.g. "pulse width measurement", works fine.
Now, I want to program "continuous pulse trains" on all 8 channels.
But I only can get pulses from 4 of the 8 channels, either TIO(0) or TIO(1).
I follow example 9 from the HDDK.
It seems that the CounterSwap bit, of the ClockConfigRegister, (TIO(0):0x73C and TIO(1):0x73C+0x800), switches all (!) output-lines (PFIn). And not just the outputs for it's own TIO.
Does anyone have experience with this?
Who can help me?
Thanks, Ben.

Ben,
The 6602 actually needs a different MITE initialization sequence from
all other NI PCI/PXI boards. If you use the normal sequence, and
write to TIO1, both TIO0 and TIO1 will be written.
The correct sequence is:
//Tell the MITE to link the BAR1 address to the DAQ Board
//You must initialize the MITE before you write to the rest of the PCI
board
void initMite(iBus *bus)
tAddressSpace Bar0;
u32 physicalBar1;
//Skip MITE initialization for PCMCIA boards
//(which do not have a MITE DMA controller)
if(!bus->get(kIsPciPxiBus,0)) return;
Bar0 = bus->createAddressSpace(kPCI_BAR0);
//Get the physical address of the DAQ board
physicalBar1 = bus->get(kBusAddressPhysical,kPCI_BAR1);
// ***** 6602/6608 specific MITE initialization *****
// Hit the
IO Window Base/Size Register 1 (IOWBSR1) in the
MITE. We set the
// address, enable the window and set the size of the window:
Bar0.write32(0xC4, (physicalBar1 & 0xffffff00L) | 0x8C);
// Write to the IO Window Control Register 1 (IOWCR1) to make
the IO window
// go to RAM memory space instead of the config space
Bar0.write32(0xF4, 0);
// ***** End of 6602/6608 specific code *****
bus->destroyAddressSpace(Bar0);

Similar Messages

  • How can I use the pulse train from a 6602 to trigger an niFGEN and niSCOPE on each rising edge of the pulse train?

    Hello,
    Here is my application: I need to use a 6602 counter/timer to generate a pulse train of certain frequency and duty cycle. On each rising edge of this pulse train, I need to output an arbitrary waveform on Ch. 0 of an niFGEN (5422) AND acquire data from CH. 0 of an niSCOPE (5124). I also need to synchronize the niFGEN and the niSCOPE to the same clock used for the pulse train (6602/ctr0). This process needs to continue until the user stops the system.
    I can generate the pulse train using the 6602 just fine using ctr0, but the pulse train shows up on OUT0 by default. When setting up the niFGEN and niSCOPE to trigger on rising/positive slope edge, OUT0 is not an option for either device as a source for the digital rising edge (pulse train). The main options for both are PFI0-3 and RTSI lines.
    Questions:
    1.) Is there a way that I can direct the pulse train to a location (such as an RTSI line) where BOTH the niFGEN and the niSCOPE can use it as a start trigger for each rising edge? I noticed in MAX that a route can be made between ctr0's internal output and a trigger line and others. If this is a solution, could you please explain how to accomplish this?
    2.) Once I configure the niFGEN and niSCOPE to be triggered on a digital rising edge, how can I effectively have this happen for every rising edge from the pulse train? In other words, can I just initiate the FGEN outside of the while loop and it will generate a waveform for each rising edge it sees at the source until the while loop is exitted?
    3.) Is setting a reference clock for the niFGEN and the niSCOPE the same thing as synchronizing both devices using the same clock that generated the pulse train? It is not clear to me the difference, and why it would necessarily be useful.
    Images of my current front panel and block diagram are attached. If you would rather have the actual VI's just let me know. Any help and/or explanation on this is greatly appreciated. Thanks in advance.
    Attachments:
    Front_Panel_Control.jpg ‏278 KB
    Block_Diagram_Control.jpg ‏263 KB

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • PCI 6602:How can I use the digital lines of the board and in the same time to generate pulse train using a counter?

    Hello!
    My problem appeared when I tried to update my code from Traditional NI-DAQ Legacy to DAQmx.
    I am using 2 counters (counter 5 and counter 7)  from PCI-6602, to generate pulse train, and also the Digital I/O lines of the port 0 (the lines form 0 to 7). What I do in my application is that I am starting to generate the pulse train on the output of the 2 counters, and after that I am playing with the state of the digital lines.
    In traditional there was no problem using the counters and the digital lines in the same time, everything was going perfectly, but in DAQmx this is not possible.
    What happens: I start to generate pulse train on the output of the counters,  no errors encountered, but when I try to modify the state of one line of the digital port the generation of the pulse train is stopped. This is happening when I start the task associated to the digital port.
    My question is: it is possible to create a channel on the digital lines without altered the channels created for the counters?
    Another thing what I manage to see using the  "Measurement & Automation Explorer" and Test panels for PCI-6602, basically is the same thing, I generate pulse train on the output of the counter 7 and try to start a task on the digital line, but I get one error :
    "Error -200022 occurred at Test Panel
    Possible Reason(s):
    Measurements: Resource requested by this task has already been reserved by a different task.
    Device: Dev4
    Terminal: PFI8"
    Instead if I use the counter 0 or counter 1 to generate pulse train I don't encounter the same problem.
    Which resources are used by the counters 2 to 7 from the PCI-6602 board and the counters 0 and 1 do not use?
    Thank in advance for any replies!
    Ciprian
    Solved!
    Go to Solution.

    Hello Jordan, thank you for your reply.
    I am sorry but I can not see or run your example, I don't use LabView, I use Visual C++ for developing.
    Here is the code for generating the pulse train:
    GeneratePulseTrain(unsigned long ulCount1, unsigned long ulCount2)
        short nStatus = 0;
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        nStatus = DAQmxCreateCOPulseChanTicks (m_taskHandle, "Dev4/count5", "", NULL, DAQmx_Val_Low, 0.0, ulCount1,ulCount2);
        if( bTriggerMode == true) // if hardware trigger is enabled
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_ArmStartTrig_Type, DAQmx_Val_DigEdge);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Edge, DAQmx_Val_Rising);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Src,"Dev4/PFI17" );
        //set the internal timebase
        nStatus = DAQmxSetCOCtrTimebaseSrc(m_taskHandle,"Dev4/count5","20MHzTimeBase" );
        nStatus = DAQmxStartTask(m_taskHandle);
        return nStatus;
    And the code where I try to set the digital line:
    SetChannelState(short nState)
        short nStatus = 0;
        uInt8 wrtBuf0[1]={0};
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        // Configure line as output 
        nStatus = DAQmxCreateDOChan (m_taskHandle, "Dev4/port0/line0", "", DAQmx_Val_ChanPerLine);
        nStatus = DAQmxStartTask(m_taskHandle);
        wrtBuf0[0] = nState;
        nStatus =DAQmxWriteDigitalLines (m_taskHandle, 1, 0, 0, DAQmx_Val_GroupByScanNumber , wrtBuf0, NULL, NULL);
        nStatus = DAQmxWaitUntilTaskDone(m_taskHandle,10);
        nStatus = DAQmxStopTask(m_taskHandle);
        nStatus = DAQmxClearTask(m_taskHandle);
        m_taskHandle = 0;
        return nStatus;      

  • 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.

  • How to use multiple counters in the 6602 to measure cycle length, calculate delay and generate triggered pulse.

    Hi,
    I need to measure the cycle length of a pulse, calculate a delay based on this value, and then generate a triggered pulse with that delay value. The input and output pulses will be continuous. The best case would be to use the cycle length from one pulse in the calculated delay for the next pulse. One of my biggest problems has been getting the calculated delay value into the pulse specs.vi for the triggered output.
    This output pulse will be used to trigger an IMAQ video acquisition; therefore, the solution to this problem will be part of a larger video acquisition application. This has posed a problem, in that accessing the counters has interfe
    red with the triggered video acquisition.
    Any suggestion will be welcome.
    Thanks
    Dave

    Filipe,
    The overhead is the problem I'm trying to get around.
    Specifically, what I need to do is to generate an output pulse after a trigger pulse, which is a given percentage of the cycle length. The input pulse is from heart rate, so it will have some variance, and the output pulse will be at a stationary point in the cardiac cycle. For example, for an input pulse of 2 Hz (500 ms) the user would likely request the output pulse be delayed by 75%. Therefore, the generated pulse will have a 375ms delay after the trigger.
    In the past I have had hardware built to do this, but I am hoping I can accomplish the same thing with multiple counters on the 6602. I have been able to accomplish this with 3 counters (2 to measure period and 1 for output
    ) but the overhead prevents adequate triggering of the IMAQ video acquisition. I am hoping another method would solve this problem.
    Thanks
    Dave

  • How do I implement a stop trigger for my 6602 counters?

    I currently have the start of data acquistion for two channels syncrhonized with a start trigger. I am doing simple event counting using two seperate counters.
    For my start trigger, I use a third counter to generate a single pulse and put the output on the trigger line that the two counters are watching.
    Works great! But, I also want to synchronize the stopping of data acquisition for the two channels. I thought this would be simple as configuring a ND_STOP_TRIGGER like I did a ND_START_TRIGGER. But, this is giving me errors.
    Does the 6602 not support stop triggering? Am I just out of luck?

    Hi there,
    this thread is quite old but I'm facing the same problems.
    I'm using a PXI-6602 and a PXI-6521 in a PXI-1033 chassis. On the 6521 I create a continuous sample pulse as a counter output. This I route to the PXI_Trig0.
    On the 6602 I have two counters set up to continuous edge counting with the external clock configured to PXI_Trig0.
    I start counting by setting a internal trigger channel to high which is routed to PXI_Trig1, and this is configured as the start trigger signal for both counters on the 6602 so that they count simultaneously based on their common sample clock.
    This works quite good...but I have some problems to stop the counting.
    I have to stop counting as soon as I have reached 1024 increments (one revolution of a wheel, signal duty cycle 50 %) on one counter and then I have to check if the other counter have reached at least 48 (duty cycle 50%) or 96 pulses (duty cycle 20% or 80%, depending on the revolution direction).
    So far I read the counter value of ctr1 in a loop and if the value is equal to or greater 1024 I stop. Sometimes I miss the value 1024 (how can this happen as I count buffered + continuously?) I make a retry. But I get the impression that even I configured both counters with the same start trigger and sample clock, the counting isn't synchronous. When I try it with two function generators, I works quite good but not perfect. If I connect real life signals, in the lower frequency range (up to 500 1/min of the wheel), I almost always have fewer pulses then necessary, e.g. 88-94 pulses instead of 96. In the upper frequency range (up to 3000 1/min of the wheel), I have way too much pulses, e.g. 122-125 pulses instead of 96.
    I use the digital filters of the counter board for both TTL signals.
    Does anybody have an idea what I can do on this subject?
    Thanks in advance for any help
    Regards
    Achim

  • How do I set a PFI to High on a 6602 Board with DAQ Traditional

    Dear All,
    I am using LabVIEW 8.5 on 32-bit Windows XP with an NI 6602 DAQ board. In the past I've used DAQmx but for compatability with older software I need to do a few simple things using Traditional DAQ, which I have never used. Specifically I would like to make a simple VI that sets PFI 5 to high when the user presses a button and then low when they press the button a second time. How do I set PFI 5 for output and then write true to it?
    Thanks,
    Ed
    Solved!
    Go to Solution.

    Dear All,
    Apparently its as simple as using the Write to Digital Line VI. However, the non obvious thing is the port width of the 6602 board is 32 not the default 8. Buried in the LabVIEW help files is a list of physical port widths that one must stumble upon. Like the bat cave. In the attached image of the super simple VI I've made the 16 refers to PFI 16. Good to know.
    Best,
    Ed
    Attachments:
    write_low.JPG ‏5 KB

  • Time Capsule / Leopard 10.5.8 / Time Machine / Disk can't be opened because the original item can't be found / OSStatus error -6602

    Hi,
    I'm facing a big issue with Time Machine on my Mac Book running Leopard 10.5.8 (build 9L31a) and my Time Capsule (firmware 7.6.1 (76100.4)).
    I have searched a lot (during 3 days !!) to find a solution but no luck !
    I have the same syntoms as described by LUNY in this thread: https://discussions.apple.com/message/9364556#9364556
    To quickly summarize:
    My MacBook was configured to use my Time Capsule as backup disk. Everything went fine during 2 years and then one day I suddently got problems with time machine !
    Time Machine was unable to access my Time Capsule. Moreover it was drastically slowing down my MacBook !
    So:
    1. I stopped Time Machine and tried to change the backup disk: every time I chose my Time Capsule Disk, I got a OSStatus error -6602
    2. Then, I tried to access my Time Capsule from the Finder -> slow and then got this message 'Disk can't be opened because the original item can't be found'
    3. I searched in the logs for the specific reason and I found:
       - system.log (/var/log) :
          myMacBook kernel[0]: disk0s2: I/O error.
          myMacBook /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder[198]: NetworkNode::handleMountCallBack returned -6602 (the same error)
          myMacBook ReportCrash[358]: Saved crashreport to /Library/Logs/CrashReporter/kextload_2012-12-30-112946_myMacBook.crash using uid: 0 gid: 0, euid: 0 egid: 0
       - In CrashReporter (/Library/Logs/CrashReporter/): i see the problem coming from kextload with this exception:
           Exception Type:  EXC_BAD_ACCESS (SIGBUS)
           Exception Codes: 0x000000000000000a, 0x000000000122d000
    4. I tried to mount the time capsule disk with Terminal (AFP protocol):
       > mount -t afp afp://admin:[email protected]/Data /Volumes/termAFPData/
       result -> mount_afp: AFPMountURL returned error 19, errno is 19
    These errors (6602 and 19) are neither documented anywhere nor associated to a clear description of the problem. The only thing I have found is that errno 19 is an IO error -> http://www.opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacError s.h
    On the other hand, and this is the really weird part of the issue, my time capsule disk works well when I mount it with SMB protocol !!! (Or when I access it with a Windows XP machine).
    So, the workaround is: mount -t smbfs //admin:[email protected]/Data /Volumes/termSMBData/
    Or, in Finder -> Connect to server and there use the URL: smb://xxx.xxx.xxx.xxx/Data
    Not sure what is going on ... but I pretty sure that's a bug and not a hardware problem.
    Is there someone who has already found a solution for this kind of behaviour ?
    It would avoid me a lot of headaches and improve the support for this kind of problem.
    Thanks !!!
    Greetz
    A Belgian boy

    JoBidun wrote:
    Thanks a lot for this really quick reply.
    When you say: "I would though go back to 7.5.2 firmware." Do you mean a reset to factory default ?
    Greetz
    NO, your time capsule is running 7.6.1 but it is built with AFP following increased security for LION.. that is not required or available in Leopard.. so there is no point.. it is also not as stable on the older hardware.. at least in my experience.. I have repaired about 200 of the suckers so I do see a few.
    When you select firmware update in the airport utility.. hold the option key.. all valid firmware versions for your TC then show up.. not only upgrades.. select 7.5.2 and upgrade to that.
    Do a factory reset when you do it is a good idea though.. start off again.
    And do reset of TM.. A4 in pondini.
    See if it helps.
    Oh, the TC will continually complain about needing a firmware update.. turn off automatic checking of updates.. it will still annoy you for fun every few weeks but that is better than daily.

  • Conceptual problem in using a PCI-6602?

    Hi, All You Wild and Crazy NI/LabVIEW Types --
    I have a problem that's been close to sending me off the deep end for more than a month now, and I think that I'm so enmeshed in it that I can't see the forest for the trees anymore. I'd like to apologize in advance for the length of this post, but there are some details that might or might not be important, and I'd rather make the mistake of giving you too much information than not enough.
    We do impact-cratering experiments, using a gun to launch (usually) spherical projectiles at a variety of targets. One of our big efforts is to measure the velocities at which material is ejected from growing craters. We do that with a line-generating laser, oriented so the "sheet" of laser light is perpendicular to the target's surface and through the impact point; we strobe the laser at a programmed rate (with our PCI-6259 board) and take a time exposure of the scene with a Nikon D100 DSLR. When target material -- usually grains of sand -- is ejected, the laser illuminates a "slice" through the curtain of ejecta, illuminating a small portion of the fragments numerous times in their trajectories. Since we know the scale of the photograph and its orientation relative to the laser's illumination, and we also know the rate at which the laser is flashing, we can easily calculate the velocities of the illuminated particles. I'm attaching a picture (file 4044, cropped.jpg) of an example taken with an older camera to give you an idea. In the picture, the laser's illuminating the scene from the right of the frame and the projectile flew into the picture from the top of the frame, traveling along the left-hand edge. The brightest portion is the flash from the impact, and the rest of the parabolic trajectories are the grains of sand in flight. The target bucket, full of coarse sand, is the elliptical looking cylinder at the bottom of the picture. It's roughly 28 cm in outside diameter, if you'd like a scale.
    As you might imagine, with our projectiles moving anywhere between 0.7 and 3 km/s, sequencing everything is pretty important. We're using (or trying to use) LabVIEW to do all of the sequencing, instrument control, and data storage. Things are going pretty well so far, except for what I'll describe in more detail below. A couple more things, though, first. It's important that we measure the projectile's speed in each shot, as that controls impact energy and momentum, which are critical to know in a given experiment. We do that with simple laser-photodetector pairs (which we normally call "velocity stations") arranged along the projectile's trajectory. As the projectile passes between a laser and its detector, its shadow is detected and a TTL pulse is sent to our PCI-6602 board. Depending on the experiment, we use three or four such laser-dector pairs. They use counters 0, 1, 2, and 3. We know the distances between the laser stations and, once we get the times between detections, it's s simple matter to calculate the projectile's velocity.
    We also use LabVIEW to fire the gun, and we do that because opening the camera's shutter has to be synchronized with the firing pulse, which currently is sent via P1.1 on the 6259. Here's the problem: when we test the laser-detector arrays in a "standalone" mode (that is, without any other tasks or operations being done with LabVIEW), they work infallibly. It's when we try to use LabVIEW to fire the gun that we get either very erratic results from the velocity stations/6602 or no results at all.
    I've tried a range of things, from starting the two-edge measurement task before the firing signal is sent, to trying to force things with a timed sequence, to doing things with brute force via a seuqence structure. When I try to start the two-edge measurement task first, though, the firing signal isn't sent until the counters time out. This of course, wrecks the experiment, because all of the timing is then messed up. The VI that I've attached (Version 1.vi) is a HIGHLY simplified version of the initial attempt I made at doing this, with all sorts of background stuff removed just so I can cut to the chase. (Only one two-edge measurement task is shown, for instance.)  I think that the VI is pretty self-explanatory (and embarrassingly primitive), so it probably doesn't need much in the way of explanation. Counter 7 and PFI 0 on the 6602 are used to accept the signal from the firing button and trigger the event structure, which contains the two-edge separation and gun-firing tasks. (In reality, I use a separate VI to have three to four concurrent two-edge separation tasks running concurrently, one for each velocity station.) I start the two-edge separation tasks first so the detectors and counters are ready for the projectile. It's not necessary here, but I kept the 500 ms wait frame in this example because that's why the sequence structure exists -- to allow the shutter of the Nikon to open completely before the gun fires. After those 500 ms, the firing signal is sent to the circuit that actually fires the gun.
    What happens in this configuration is that the second frame of the sequence structure doesn't execute until the 5-s timeout transpires in the two-edge separation task. I've also tried this using a line on the 6602 to fire the gun instead of P0.1 on the 6259, but that ends up with the same result. (Both counters are used on the 6259 to strobe the main illumination laser, so they're unavailable, if you're wondering. In any case, we need four counters for the four velocity stations.)
    FINALLY, my question: What am I doing wrong, here? If I put the two-edge separation tasks in the same frame of the sequence structure as the firing task, the gun fires when it's supposed to, but we get no velocity measurements. I've also tried to force the timing with another version of a sequence structure; I'm attaching another very simplified version below as Fire and speed example.vi.
    After you recover from your violent fits of laughter, I'd really appreciate hearing what you might recommend. (And no, surrender isn't an option.)
    Thanks for taking all of your valuable time to read this huge post -- I really appreciate it!
    Mark
    Attachments:
    4044, cropped.jpg ‏197 KB
    Version 1.vi ‏35 KB
    Fire and speed example.vi ‏30 KB

    I agree with all 3 of Kevin's points.  His first suggestion will probably fix your problem (see below).  The 2nd and 3rd suggestion would improve efficiency and responsiveness, but #2 might not be possible since independently triggering four outputs in hardware would require the use of 4 counters (on the 6602 anyway) which might be busy doing other tasks in your application (although if you don't need the stations to trigger independently then you could implement this with a single counter).
    I think I have an explanation of the problematic behavior you are seeing based off of the following bits of information from your post:
    1.  Running the small example code by itself works flawlessly, but adding other simultaneous functionality fails.  You mentioned you are doing this on 4 stations, so I'm assuming 4 counter input tasks running in parallel.
    2.  The behavior you are seeing is that the 2nd sequence does not execute until after the read times out (note that the sequence is supposed to be executing in parallel with the read).
    It sounds like the problem is coming from a combination of calling into DAQmx Read before data is available (this consumes one of the threads that LabVIEW has allocated to your application until DAQmx Read finishes executing) along with the fact that LabVIEW allocates 4 threads per execution system per priority by default.  Since all of your threads (from what I can tell) are executing on the same priority, the 4 reads you are calling will block anything else from executing until they have completed.  By then it's too late and the firing of your gun happens after the counter task has already timed out.
    You *may* increase the number of threads allocated to your application by using a VI that is included with LabVIEW (vi.lib\Utility\sysinfo.llb\threadconfig.vi) and this would also probably remedy the behavior you are seeing.  However, rather than throwing more threads at this application I think the better solution would be to change the sequencing of your tasks like Kevin suggested ("create and start the 2-edge task before entering the sequence structure, and defer the 2-edge *reading* until *after* firing the DO")--in doing this you would now expect to see data immediately upon calling DAQmx Read and you avoid the situation where Read is blocking indefinitely and consuming an application thread.  You could take this a step further by checking the Available Samples per Channel property (or using the DAQmx EveryNSamplesAcquiredIntoBuffer event) to ensure that data is actually available before calling Read.
    Best Regards,
    John Passiak

  • How can I implement a Digital I/O counter with a maximum source frequency of 80 MHz (like 6602 board) using CompactRIO?

    How can I implement a Digital I/O counter with a maximum source frequency of 80 MHz (like 6602 board) using CompactRIO? It appears as if the Digital I/O modules for CompactRIO are much slower than this.
    Thank you,
    --Ray

    Hi Ray,
    The highest frequency input we offer for C Series modules is 20 MHz if you are doing LVTTL and 10 MHz for 5 V TTL.  These modules are the 9402 and 9401, respectively.  Unfortunately, there is no 80 MHz input on this form-factor.
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Any ideas on how to use a 6602 to do frequency division?

    Uisng traditional DAQ.
    The 6602 user manual says it can do frequency division but I can not find an shipping example for this operation.
    In the end I want to be able to use the 6602 to handle the interface to a quadrature encoder.
    I want the 6602 to generate a sample pulse I can use for other DAQ work.
    I would like to get one pulse for both transitions of both the A and B signals, or otherwise stated;
    A pulse when
    A goes high
    B goes high
    A goes low
    B goes low
    I was thinking if I could configure a counter (or group) to operate as a frequency divider and use each of the encoders as a clock signal AND just do a divide by "1" I would have what I was after.
    Big Picture (incase it makes a difference)
    A quadrature encoder is coupled to a resolver I am testing. I need to corelate the angular displacement with the measurement from the resolver. While the shaft of the encoder and resolver are spinning, I want the encoder to clock the analog input samples.
    Thank you for reading,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

    Ben,
    First the executive summary: Sorry, No Can Do.
    You won't be able to generate a sampling clock pulse on the transition to each of the 4 quadrature states.   Here's a thread I was involved in where a similar question was asked.   If you need to correlate in exactly that manner, you may want to pick up a quadrature decoder chip such as the 7084.  It'll generate a "pulse" whose width is controlled by selection of an RC time constant during circuit build.  I put "pulse" in quotes because it isn't truly a TTL signal due to the long transition time.  I would recommend that you plan on adding a Schmitt trigger to square it up, perhaps another to re-invert it back to original polarity.
    However, all that being said, you may be better off using an internal sampling clock to drive analog and encoder position acquisition anyway.  On many encoders I've used, the transitions are NOT perfect 1/4 divisions of the cycle.  You can sometimes see this on the spec sheets where the A to B relative phase is given as, say, 90 +/- 15 degrees.  There will also be a tolerance on the phasing of A's rising and falling edges, maybe 180 +/- 10 degrees (it's often a little tighter than the A to B phasing).
    In practice, I've typically found that these deviations tend to be systematic rather than random.  Of the company's 1000 similar encoders, the phase stays within the range 90 +/- 15.  With my 1 instance, the phase may be 84 +/-3 around a full rev of the encoder.  The point is that if you generate pulses with the quadrature transitions, the samples still won't *really* be equally-spaced in position.  They'll just think they are.
    I'd suggest at least considering high-speed sampling with an internal clock that's shared by both tasks.  Then do a little bit of curve-fitting / interpolation to the data when you need to derive more precision.
    Re: frequency division.  You have to select a specific edge (either rising-only or falling-only) as the active edge.   Your counter will then ignore the other type of edge.  Also, you'll need to specify the # of edges each for the idle and pulse states.  These must each be >= 2.  So you can't divide by 1 - the best* you can do is to divide by 4.  (*Technically, you could sort-of divide by 2 if you configure the counter to pulse rather than toggle its output.  However you can't control the pulse width, and as I recall it's fixed at 50 nanoseconds.)  Write back if you'd like to see an example.
    -Kevin P.

  • Can't access more than counters 0 & 1 on my 6602 board

    When I use the Count Events or Time.vi at the "easy" counter level on the functions palette I can use counters 0 & 1 but when I try counters 2 through 7 I get the error message -10020 occurred at CTR Mode Config. : Timebase is invalid. When I dig down into the vi I see that it uses subvis associated with AM9513. I thought I read somewhere that those vis can only read the lowest two counters on a TIO board. Is that right or should I be able to access the other counters with the Count Events or Time.vi?
    Since this is a NIO counter I tried a TIO counter example from the ni site called Buffered Event Counting(8).vi (this is a LV 6.0 vi for TIO counters)and I immediately get the error -10242 occurred at Counter Group Config.: The specified function is not located in the driver. I let the parameters as default except device number which for us is 2 and the PFI line to 39 (source counter 0).
    I need to do event counting with eight counters. Do you have any suggestions?
    I am using LabVIEW 6.0 & NI-DAQ 6.6.1 on a Mac G4 using OS9.2.2

    Hi Farris,
    If I use the examples for counting events for AM9513, for example Count Event-Easy (9513).vi, the vi runs fine if the counter is 0 or 1 but not if it is anything higher I get the error code -10020 (as I described in my original posting). I have also tried using the Count Events-Int(9513) example vi and get the same behavior.
    I found a library called multi-countervis.llb that seems like it would have what I want but I don't have the multi-counter subvis. I found this library in http://joule.ni.com/nidu/cds/view/p/id/807/lang/en a document about updating the Counter Palette. However, this only works for the Windows OS. Is there something for the Mac 9 OS.
    Also, I don't understand why I can't use the TIO counter vis on my 6602 board. Whenever I run one of these example vis I get -10242 indicating that I don't have the drivers even though I've downloaded the ones you sent me in your first reply.
    Thanks,
    Laue

  • "Operation could not be completed. (OSStatus error -6602.)"

    What is this error about? I am trying to use the seagate at home backup harddrive and when i try to back it up to my time machine i get this message "Operation could not be completed. (OSStatus error -6602.)" what do i do?

    jjbmmm wrote:
    After signing into to NAS server, I get the following error:
    Operation could not be completed. (OSStatus error -6602.)
    Welcome to Apple's discussion groups.
    I haven't reviewed it in detail for accuracy, but you might find useful advice in this post:
    http://www.somelifeblog.com/2009/02/fixed-time-machine-backup-to-network.html

  • How to develop 64-bit Windows device driver for NI-6602?

    Due to the fact that NI-VISA doesn’t support 64 bit Windows, how can I do to develop a 64 bit Windows device driver for NI 6602 (Counter/timer) PCI card. The possible jobs include:
    Develop a Windows Kernel Mode Driver (“Device Driver”);
    Make it to comply with VISA in order to utilize “osiBus Generic IO Interface” and MH DDK.
    Could anyone please give me some advices as soon as possible?
    William Liao
    Message Edited by Wiliao on 07-22-2005 04:12 PM

    Hi All,
    I am currently working on getting the health parameters
    from the motherboard like voltage fan and temperature. I have already
    already done this using 32 bit winio driver but i am not able to work
    on 64 bit version. is there any driver availbale in 64 bit for
    obtaining this parametes or some one help me to get a 64 bit winio
    driver.
    Regards,
    Senthil prabu R

  • Maximum number of PCI-6602 cards in 1 computer?

    Is it possible to have 4 PCI-6602 cards in 1 computer?
    Are there any DMA channels or IRQ limitations we need
    to worry about?
    Our computer will have 1 graphics card in the AGP slot,
    possibly a PCI NIC ethernet card and possibly a PCI
    based sound card. It will also have an IDE controller
    with 2 hard drives and 1 CDRW.
    The PCI-6602 manual seems to imply that if you are
    using more than 3 counter channels that you must
    use the slower Interrupt based transfer mode which
    has a maximum transfer rate specified as 2000
    Reading/second. If there are 4 PCI-6602 boards in
    the same computer and all 8 of the channels are
    used on each board does that mean the total
    transfer rate is still 2000 Readings/sec? Or
    wo
    uld the total transfer rate be 8000 Readings/Sec
    since there are 4 PCI-6602's (2000 Readings/Sec
    for each of the 4 PCI-6602's)?

    Hello;
    The only concern you need to have is the number of IRQs available. As far as DMA channels, as the PCI bus itself has only 3 DMA channels available, all the devices that use DMA will share those 3 channels. But, as IRQs can't be shared, the number of counters you will be able to use will be the exact number of available IRQs you still have on your machine.
    As far as transfer rate, the maximum transfer rate will be 2000 Readings/sec, regardless the number of counters you are using.
    Hope this helps.
    Filipe

Maybe you are looking for

  • Please help me with EVEN MORE SAFE LOGIN ISSUES.

    This is the screen capture I get when after paying properly for the licenses for F-Secure software in My Safe I get the message in this galleries above screen capture. My subscription was cancelled and that my money was refunded. THIS IS INTERMITTENT

  • HT1688 I have lost my notes. What to do?

    I have lost my notes. Yesterday. The last note is left that I made on may 28th. It's the first time since I upgreade to iPhone 5. I had the same problem with my 4th iPhone like 3 time. I lost very important notes. that make me angry, because how such

  • Help please - moving tracks within iTunes

    I've imported some audio books into my iTunes library but it's gone into the Music folder instead of Audio Books folder. Why can't I drag them from one folder to the other? Thanks

  • Launching Mail becomes a runaway process and creates a massive memory leak in the kernel task

    I have 16gig of ram, my kernel task is currently using 12gig, Mail is no longer responding while using all remaining ram Mail has been jammed at 100% of one i7 core for about 2 hours now, disk activity is almost nonexistant. it was running poorly yes

  • Cotent Conversion Parameters at reciver side

    hi, i have file stucture like, <node>     <field1>aaa</field1>     <field2>bbb</field2>     <field3>ccc</field3>     <field4>ddd</field4>     <subnode1>          <field5>dd</field5>          <field6>ee</field6>     </subnode1>     <subnode2>