Multiple tasks with daqmx

Hello,
I am currently working on a Senior Design Project where I have to measure torque, RPM, pressure and temperature.  I am using strain gages, a Hall Effect Sensor, pressure sensor and thermocouples to obtain these readings.  A myDAQ collects the RPM and pressure readings while a cDAQ collects the torque and temperature readings with the NI 9237 and NI 9211 modules.  I created LabVIEW VIs for each sensor and they work.  The problem I am having is when I try create a VI with DAQmx that reads all these sensor values simultaneously.  The VI that I have attached randomly displays one of the measurements while all the other measurements remain blank.  How should I edit my VI so I can display all my readings at once?
Solved!
Go to Solution.
Attachments:
SD.vi ‏87 KB

You can form all of your cDAQ readings into a single DAQmx task.  Do the same for the myDAQ channels.  On the read side, you just read multiple channels.  You can then use the Array Index to separate your channel data and do whatever calculations you need.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Multichannel task.png ‏40 KB

Similar Messages

  • Error when starting an analog read task with DAQmx 8.5 while 8.0 works

    I am programing a measurement application with Borland C++ Builder 6.
    Problem: Every time when I try to start an analog input task with the DAQmxStartTask() command of DAQmx 8.5 the program execution is interrupted and the error message "Invalid floating point operation" is given out. This problem does not occur with DAQmx 8.0 !

    Hello Johannes,
    the error occurs every time, when I try to start an analog voltage input task either with a simulated or a real device (PXI-4472). Changing any of the measurement parameters did not have any effect. I also tried one of the C-source code examples, which came with the original NI-documentation of the DAQmx 8.5 driver, resulting also in the same error.
    However, starting a counter task with a simulated PXI-6601 device worked without any problems !
    Do you have any ideas ?
    Regards,
    Thomas

  • Unable to create a task with DAQmx: error -89136

    Hello,
    I am trying to create a task with DAQmx_CreateTask using C API on a PCIe 6535 device (using driver DAQmx 9.5.5 under Windows7), but I get the following error code:  -89136 [DAQmxErrorRouteNotSupportedByHW_Routing], although this function works on another PC with XP.
    The driver 9.5.5 seems to be correctly installed (MAX autotests on device work fine)
    Thanks for help
    amse

    This is the french speaking part of the forum, maybe you'd get better luck to obtain a good answer in the general section.
    To answer your question directly, I'd say check the options/parameters you're using because the error message clearly states that the way you're setting the physical channels / routing is not supported.
    Never used the C API so I can't really help you more than this.
    Hope this helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Multiple tasks with one click

    My work involves manually changing multiple lines to a different graphic style, and then moving that line to a different layer.  As it is now, I am changing the graphic styles, choosing Select < Same < Fill & Stroke, and then moving the lines to the appropriate layer.  I am wanting to know if there is a way to change the graphic style, and move the line to the different layer with one click.  I'm ignorant when it comes to scripting, but was wondering if there are any scripts that would perform this function.

    You need to fully explain the setup. Otherwise, people making suggestions are just guessing. Here's my suggestion, based on what little information you have provided:
    You don't need a script for this; you can do it with a set of very simple Actions. Example:
    Assume your repetitive task requires three Layers, named Red, Green, and Blue. On each Layer, all objects need to have the same Graphic Style applied.
    1. New document. Create three Layers. Name them Red, Green, and Blue.
    2. Define three Graphic Styles. Name them Red, Green, and Blue.
    3. Draw an object (any object; a square, a line, whatever). Send it to Layer Red. In the Attributes Palette, type "Red" into its Note field. (This effectively "names" the object "Red".
    4. Draw an object, Send it to Layer Green. Type "Green" in its Note.
    5. Draw an object. Send it to Layer Blue. Type "Blue" in its Note.
    6. Draw an object on Layer Red. Select it.
    7. Actions Palette: New Action. Name the Action "Red." Set its color to red. Start recording:
    7.1 Edit>Cut
    7.2 Edit>PasteInFront
    7.3 Apply Graphic Style Red
    7.4 Stop recording.
    8 Actions Palette: Select the Cut step. From the flyout menu select Select Object.... In the resulting dialog, enter "Red". OK the dialog. The Action should now have a new Set Selection step listed after the Cut step.
    9. Actions Palette flyout menu: Button Mode.
    Now you have an Action named Red that appears as a red button in the Actions palette. Select an object. Click the button. The object is moved to Layer Red, and gets Graphic Style Red.
    10. Turn off Button Mode. Duplicate the Action. DoubleClick the duplicate. Change its name to Green and its color to green. Edit its Set Selection step to select the object named Green. Replace its Graphic Style step with a step that applies Graphic Style Green.
    11. Similarly duplicate and edit one of the two Actions to create a Blue Action. Put the Actions palette back in Button Mode.
    Now you can select any number of objects, and then move them to the Red, Green, or Blue Layer and apply the appropriate Graphic Style wiht one click.
    Now come back and reveal the specifics of your actual situation which renders all that work moot.
    JET

  • How to write to one channel of a task with multiple channels? (plus other things...)

    So I have a USB-6009 DAQ.  It has 12 digital output lines.  I want one channel that is "Dev0\line0:10" which represents an address bus in my application.  And a second channel "Dev0\line11" which represents a program enable line in my application.
    I have tried creating two different tasks and adding one channel to one task and the other channel to the other task.  The only task that worked was the task with "Dev0\line0:10".  It was always the task containing that channel, regardless of the order of creation.  So then I moved on to a different method.  (I read somewhere that I should only create one task of each type.  like only 1 DO task only 1 AO task etc...  However I am also using the two analog ouputs to and have a task for each AO and they work just fine.)
    I tried add both channels to one task.  But when I needed to control only the address bus, I had to have some information for the other channel as well.  This was a little trying, but I could configure it that way.  But it turned out to be easier for me to just make one channel with all the lines and OR in the data for line11 with each write.
    I just wondered if it was possible to write to one particular channel of a task and not the other channel?  That would really be the ideal solution for me.  especially if I could write multiple samples to the one channel while I left the other channel alone.  Which brings up another complaint... Why does WriteMultiSamplePort only work if I use a DigitalMultiChannelWriter, and not if I use a DigitalSingleChannel writer even though my task only has one channel (and by the way I set up the channel as one channel for all lines)?  A perplexing issue to be sure.
    And no I can't just load all my samples into an array and write them all at once because I also have to manipulate the two analog outputs in between the various digital writes.
    I am using NI DAQmx 7.5 and C#.  I am trying to use the DAQ to program a digital switch, which has proven to be a real challenge.  In push-pull mode there is too much ringing for the switches programming port to tolerate.  But the switches interface is LVTTL, so I needed the 3.3V.  When I changed to open-collector I had to use voltage dividers to drop down to 3.3V.  But the rise time using open-collector is too slow for me the program the switch in serial mode, so I had to change to parallel.  The switch has an 11 bit multi-plexed ADDR/DATA bus.  So the DAQ I had chosen to use which had plenty of lines for the serial programming, now is strained to it's absolute limits by the parrallel interface.   ARGH.  The only output I am not currently using is the counter, and I'm going to need it if I ever want to read back from the switch.  But first I have to seperate the ADDR/DATA bus from the CS line on the DIO lines of the DAQ.  And I don't know for sure what I'm going to do about the voltage level translation when I have to go bi-directional.  Maybe I can filter out the ringing in push-pull mode?  Any thoughts on that?

    Hi Saikey,
    In most cases, you are exactly right: you can only use one task for one type of operation (i.e. only one analog input task in the same program). With the USB 6009, you can have multiple digital output tasks running at the same time. I was able to run a digital output program with two different digital output tasks configured for a USB-6009.
    However, you stated that it would be better if you had everything in a single task for your application and write data to only some of the channels. The easiest way to do this is to modify your array of output data so that only the data to that one channel is changing. So, for example, if you keep writing a 0 to the channels that do not need new data nothing will change.
    If you have to change your analog outputs during this program, you could create an event structure that would stop and restart the analog output tasks without changing the digital output data. I hope that you find this information helpful.
    Regards,
    Hal L.

  • Two Counter channels in one task ID with DAQmx?

    I am writing a program which will control the movement of a gimble on the X and Y axis with servo motors while recieving
    position feed back from two encoders on those axis. I am using a 6251M series card's AO to control the movement
    of the gimble, while running the encoders into a 6602 for position. When setting up my task ID in MAX I noticed I could add
    both ctr0 and ctr1 to the task ID, but  when I tried read the counters with that task I got an error in Labview and with the
    test function in MAX  saying I need to use a multichannel read. I can not find a multichannel read under the counter
    section of my DAQmx read, and was wondering if this is even possible. I am used to programming with Traditional DAQ
    and know you have to keep separate counter task ID's, but having bought an M series card and having to use DAQmx I
    was wanting to know if I could combine them.
    Thanks

    You can have multiple channels in a single task, but those channels all
    have to be of the same type.  You can have analog inputs together
    with other analog inputs, but cannot combine digital inputs/outputs,
    analog outputs or counter tasks with that analog input task.
    Once you pair only like tasks together then you shouldn't run into any more issues like this.
    Best of luck,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Multi-task data logging with DAQmx

    I was wonder is it possible to use 'DAQmx Configure Logging' VI and 'DAQmx Start New File' VI for multiple tasks?  I'm doing synchronized high speed DAQ with NI PXI-6133 cards.  Each card (there are 16) must have its own task.  Although the DAQ is continuous, the user (software trigger) determines when data is saved to the disk and for how long.
    In my scenario the test length could be up to an hour with various test events scatter throughout.  The users want to display the data during the entire test length.  However they only want to write the data to disk during an event.  The event could last from 10 sec to 1 min.  That is why the users want to control when data is written to the disk.
    DAQmx Logging seems to work for a single task only, but I need to do multiple tasks.

    I've attempted to implement your suggestion, but I still do not acquire data for all channels for all tasks.  I've enclosed my VI.
    Attachments:
    TDMS Logging with Pause LoggingFSPR.vi ‏55 KB

  • Does multiple instances of DAQmx start task result in error?

    I am trying to read voltages from pressure transducers and LVDTs in two separate While Loops. But when running the program there is an error regarding DAQmx Start Task.vi. So I was wondering if multiple instances of DAQmx Start task results in error. I have attached the vi.
    Thanks
    Attachments:
    IsoConsolidationDAQMAX02.vi ‏140 KB

    Thank you for the reply. New to Labview so I didn't know that we had to search using the error code, I tried searching using text though. Will do that from the next time, thanks.
    I do not have the problem with the write tasks but only with the read tasks. Right now I have one start task for all the input from the pressure transducers and LVDTs and three start tasks for the three analogue outputs and the program seems to run fine.

  • Need to find a calendar to schedule multiple assignments with multiple tasks set on specific days for multiple people

    There may be no such animal as what I am searching for, but I thought I'd give it a try.
    What I need to do is find a calendar app that allows me to have individual calendars for staff members that I can place a several-days-long assignment and have those people access remotely on an iPad or iPhone (autosync).
    I also want to be able to have tasks set on specific days within that assignment that have alerts/reminders for each stage of the assignment.
    Being able to custom colour each individual assignment (not just the person's own calndar) is also necessary, as these asignments overlap and need to be easily distinguishable at a glance. Each assignment needs to be its own entity and not affect any furture or previous entries, even if I choose the same colour.
    It needs to be in a month by month view and be able to be something each person can subscribe to and sync up with for changes on a daily basis. It does nothave to be a calendar like in the screen shot below, it could be a linear calendar that has days across the top and assignments down the left side.....
    Here is a screen shot of a rudimentary excel spreadsheet I have been using. It is awkward and becoming unmanageable as the number of assigments increases and more staff are being added on. And I must send a new spreadsheet out every time I make a change or add an assignment, which is several times a week.
    I suspect I may be asking for the world, but if anyone knows a direction I can go in to start a search, I'd be grateful. I haven't had success of my own so far and need to find something soon.
    iCal doesn't work for me due to the fact I can only colour code the calendar itself and not the event, plus not being able to have multiple tasks within one event. And the qty of assignments I'd have would see most getting lost, eliminating my abilty to see every staff member's assignmanet at the same time.
    Thank you in advance if you have a suggestion and if not, thanks for looking at my dilemma! 

    check with T-code TPM44
    zashok

  • How to use a multiple boards (6321/6323) analogical acquisition task with simultaneous analogical generation task using the same boards (Labwindows CVI10)

    Subject : it seems impossible to run a multiple boards analogical acquisition task with one or several analogical generation task using the same boards.
    NI Configuration : Dev1 = Dev2 = 6321 boards
    Development environnement : LabWindows CVI 10
    Source code for analogical acquisitino task :
           DAQmxCreateTask("",&AIRecordingtaskHandle);
           DAQmxCreateAIVoltageChan(AIRecordingtaskHandle,chan,"",DAQmx_Val_NRSE,min,max,DAQmx_Val_Volts,NULL);
           DAQmxCfgSampClkTiming (AIRecordingtaskHandle, "", rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan);
           DAQmxGetTaskAttribute(AIRecordingtaskHandle,DAQmx_Task_NumChans,&gNumChannels);
    Chan = "Dev1/ai0, Dev1/ai1, Dev1/ai2, Dev2/ai1"
    Source code for analogical generation taskS :
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC0, chan, "", min, max,DAQmx_Val_Volts, ""));  // chan vaut Dev1/ao0
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC1));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC1, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev1/ao1
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C2_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C2_DAC0, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev2/ao0
    At the first DAQmxReadBinary call attempt, the system shows an error (see attached document) 
    What we understand about that error : it is impossible to run the two set of tasks (ai and ao) using ressources from both Dev1 and Dev2 in the set of tasks because it is not allowed to use the same Reference Clock for that.
    The question is : is there a way to to that without having that kind of message?
    We tried different combinations :
    - Using only one ao task (on Dev1/Dac0) : same error
    - Not using any ao task (only the ai task) : no error
    - configuring the ai task with only channel from Dev1 : no error 
    - Using "/Dev1/ai/SampleClock" as internal clock for the ai task and "/Devk/ao/SampleClock" for each ao task (k standing for "1" or "2" depending of the ao task we consider) : error
    Thanks a lot.
    Pièces jointes :
    MsgErreur NIDAQmx.JPG ‏38 KB

    doublon
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Synchronize multiple tasks and multiple boards with X-series USB devices

    Hi all,
    I am trying to figure out how to synchronize multiple tasks across multiple X-series USB boards (6353, to be precise). 
    I have to run a digital output task AND an analog output task on each board.  All four tasks (the DO and AO on Board 1, and the DO and AO on Board 2) must be synchronized.
    I know how to synchronize multiple tasks on a single board.  I've been doing that for years.  That works fine.
    I know how to synchronize a single task across multiple boards (say, a DO task across 2 different boards).  That works fine too.
    For the life of me, I can't figure out how to marry the two.  Everything I've seen, all of the examples, etc. assume you want to do one or the other, or that you have a RTSI cable available.  Are there any examples out there that synchronize multiple tasks across multiple USB boards?
    I tried exporting the AO clock signal from my master AO task to PFI12, and then using the signal on PFI12 to as the clock source for the remaining tasks (Dev1/PFI12 physically connected to Dev2/PFI12, and Dev1/PFI12 set as the clock source for Dev1's DO task). 
    I have also tried setting Dev1/aoSampClock as the source for Dev1's DO task.
    Under both configurations, I invariably get error -89137 when I try to start the tasks -- required resources (PFI12) in use by Dev1/do/SampClock.  I understand what the error is telling me.  What I don't understand is why I'm receiving this error when I don't have any of my tasks configured to use the DO Sample Clock.  It seems as though it is not possible to export a clock signal to a PFI line and simultaneously run a clocked digital task, even if the clock source for that task is specified as something other than the DO Sample Clock?
    So, my question is, is it possible to do what I want to do?  And if so, how do I do it?  How do I configure a common clock source across multiple tasks running on multiple USB boards?
    Hoping for insight from those wiser than I...
    Diane
    Solved!
    Go to Solution.

    Update:  I decided to try using a counter as the source clock.  One cannot use counter 0 to accomplish this, but it does appear to work with counter 1.
    I'll take what I can get.  Fortunately I have two spare counters.  (Yes, I'm running counter tasks too -- 6 of them -- but they don't have to be synchronized.)
    I have to add both digital and analog input tasks as well -- all synchronous with each other, but not with the output tasks since they'll be running at different sample rates.  I hope I'm able to use a counter as the source clock for those as well.
    My head aches.

  • Handshaking DMM with multiple Switch devices - DAQmx error

    Hi.
    I'm trying to create a handshaking loop with DMM (PXI-4071), SWITCH (PXI-2569) and MUX (PXI-2575). All three instruments are in segment 2 of PXI-1045 chassis (slots 8, 9 and 10) and I am using PXI trigger lanes to route triggers.
    I followed the NI article 'Multi-module Scanning with National Instruments Switches' - I modified the NI SWITCH example 'niSwitchDMMSwitchHandshaking' to configure the other SWITCH but when I tried to run the example, I got an error:
    0xbffa6b9a - No registered lines could be found between the device in the route. (pop-up screenshot is in the attachment). It is the niSwitch_InitiateScan function for the second Switch that returned the error.
    Changing PIX trigger lanes has no effect.
    I tried both CVI and LabVIEW examples with the same result.
    I even tried to use two 2575 MUXes - same result.
    Can anybody tell me what am I doing wrong?
    Solved!
    Go to Solution.
    Attachments:
    errror1.JPG ‏26 KB

    Hi Pavel,
    For the purposes of this post, I'll define
    the measurement complete signal (sent by the DMM to the switch modules
    after each measurement) as 'MC' and place it on TTL0.
    For the
    purposes of this post, I'll define the scan advanced signal (sent by the
    switch module(s) to the DMM once the relays have settled) as 'SA' and place
    it on TTL1.
    You mentioned you're using NI-Switch, which is NI's IVI
    compliant switch API.  Since the IVI Foundation regulates the behavior
    of IVI compliant software, we must adhere to their rules when
    implementing our API.   Unfortunately, the IVI switch standard doesn't
    provide a method to control arbiting of triggers between multiple switch modules
    simultaneously. 
    Let's
    look at what happens when we setup a system with multiple switch
    modules handshaking with a single DMM.  The DMM is going to take a
    measurement and then send MC on TTL0. Meanwhile, each switch is listening to TTL0,
    waiting for the MC pulse.  When the MC pulse is received, each switch sets
    the relays according to its next scan list entry, waits for debounce,
    and then sends SA on TTL1.  The problem we run into here is that depending on the switch module, number of relays connected simultaneously, jitter, etc, it's possible that one module will send the SA trigger on TTL1 before the other.  Since the IVI spec doesn't provide any way to implement a 'master' switch or an arbitor, it's impossible to implement a system such that only the last switch that settles sends a trigger.  Therefore, what happens is we get a whole bunch of switch modules sending triggers at slightly different times onto TTL1.  If one switch is driving TTL1 high while the others are driving TTL1 lo, it's remotely possible that we could damage the TTL circuitry on the PXI backplane.
    To date, NI hasn't seen any failures due to simultaneously driving the TTL lines high and low at the same time with NI switch hardware, but it is theoretically possible that damage could occur.  For this reason, NI implemented a change in DAQmx
    9.0.0, 9.0.1, and
    9.0.2 that prevents a user from setting up handshaking with multiple switch modules while using NI-Switch.  What does DAQmx have to do with this, you might ask?  A component installed with DAQmx is responsible for verifying the triggers are valid.
    Customers with existing NI-Switch multi-module handshaking applications will find that upon upgrading to any of the above three versions of DAQmx, the error you observed will occur.  We've evaluated this customer feedback and have decided to revert to the previous functionality in a yet-to-be released version of DAQmx.  Please note that NI does not advise driving the same TTL line with multiple sources due to the chance that we'll double-drive the line. Therefore, it goes with out saying that NI does not advise using NI-Switch in multi-module handshaking applications.  We do, however, still recommend NI-Switch for Syncrhonous triggering because the switches never send triggers (in synchronous mode, the DMM just waits a predefined amount of time before switching).
    Note that if you use the DAQmx Switch API, we're no longer bound to the IVI spec, which means we have an arbitor that ensures only one switch module drives the SA trigger on TTL1.  NI highly recommends that customers evaluate using the DAQmx switching API for multi-switch handshaking applications. An example DAQmx handshaking application for the DAQmx Switch API is located in Example Finder»Hardware Input and Output»DAQmx»Switches»Switch Scanning with DMM - Handshaking.vi. 
    Note that in DAQmx, we'll only have one scan list, regardless of the number of switches we have.  Note that the syntax in DAQmx scanning is different than NI-Switch.  I'll defer a detailed explanation of the differences to the DAQmx and NI-Switch Help (search for 'scan list'), but in short, we'll need to include the DAQmx Device name prior to each connection.  For example, in NI-Switch, if we want to connect CH1 to Com1:
    CH1->Com1;
    In DAQmx, we'll need to include the Device name:
    Dev1\CH1->Com1;
    Note that to add additional switch modules in the DAQmx API,  we simply
    call the Set Topology and Reset VI multiple times:
    DAQmx keeps the
    session loaded in memory and as I noted above; we define which switch
    does the action as part of the scan list entry. 
    If you'd still like to use NI-Switch, you could roll back to DAQmx 8.9.5 or previous, or if you want to stick with 9.0.x, I highly recommend that we daisy chain the triggers as follows:
    DMM Measurement Complete to Advance Trigger on Switch1 via TTL0
    Scan Advance from Switch1 to Advance Trigger on Switch2 via TTL1
    Scan Advance from Switch2 to Trigger Source on DMM via TTL2
    Note that we'll need an additional TTL line for each switch module.  Also note that some switch modules allow front panel triggers, which reduces the number of TTL lines we'll need on the backplane, but which requires external wiring between switch modules.
    Message Edited by Knights Who Say NI on 06-11-2010 05:25 PM
    Message Edited by Knights Who Say NI on 06-11-2010 05:30 PM
    Message Edited by Knights Who Say NI on 06-11-2010 05:30 PM
    Message Edited by Knights Who Say NI on 06-11-2010 05:31 PM
    -John Sullivan
    Analog Engineer

  • Pulse Generation application with DAQmx and a PXI-6624 module?

    What is the best implementation method for the following pulse generation application
    using LabVIEW, DAQmx and a PXI-6624 counter\timer module?
    I have two rising edge trigger signals (Trigger-1 and Trigger-2).
    There is ample spacing between each trigger. They never occur at the same time.
    I need to generate a single pulse (fixed width, variable delay) whenever Trigger-1 occurs and
    a finite pulse train (fixed width, variable delay, N-pulses) whenever Trigger-2 occurs.
    However, the output must appear on one counter output because this composite signal
    will be used as a trigger source for another PXI module in the rack.
    With DAQmx and a TIO counter\timer can I use both the GATE (for Trigger-1) and
    AUX (for Trigger-2) at the same time on the same counter to gate out the desired pulses?
    Trigger-1 would be wired to the GATE of CTR0. One Trigger-1 event would generate one pulse on the output of CTR0.
    Trigger-2 would be wired to the GATE of CTR1 and the output of CTR1 would be routed to the AUX input of CTR0.
    One Trigger-2 event at the GATE of CTR1 would generate multiple pulses on output of CTR0.
    Would DAQmx and the PXI-6624 TIO support this implementation?
    What is the best way to accomplish the task at hand.
    Thank You.
    Best Regards,
    Scooby

    Hi Scooby,
    I have looked into the application you have described and I see a potential problem with what you describe.  In DAQmx, it is not possible to call the counters of the same DAQ device in the same task, so you cannot have the finite pulse train generation and the single pulse generation tasks running at the same time.  What you can do, since you mention the triggers will not occur at the same time, is to stop one counter task while you are triggering another.  The way I would suggest you merge the outputs is with a two input Or logic gate to avoid damaging your counters.  Your signals will effectively be added together by this logic gate.   I do not see any way to merge the outputs internal to the DAQ device. 
    Please let me know if I can be of additional assistance.
    Laura

  • How to generate sequence of pulse trains with DAQmx?

    I need to generate a sequence of pulse trains with DAQmx (the card I have is a PXI-6229 card). As an example:
    - 10'000 pulses at 20kHz every 5 seconds with an initial offset of 2 seconds (let's say 10 pulse trains in total).
    If I use the CreateVirtualChannel.vi in "CO pulse ticks" mode, I can only specificy offset, high ticks and low ticks, but not that the sequence of pulses should be repeated after some time. 
    Now I thought that I could solve this problem if it were possible to multiply two counter outputs: the first counter would generate the pulses (continuously) whereas the second one would switch between low and high on a slower timescale in order to gate the first counter, thereby providing an initial offset and the "off" phases between the pulse trains.
    Is it somehow possible to multiply two outputs with DAQmx and the card I have? Or is there another solution to the problem?
    Thanks a lot in advance for any hints!

    Hi dlanger,
    what you want to do requires a little bit more work. 
    First look at the example "Gen Dig Pulse Train-Continuous.vi" from the LV example finder.
    This example generates a continuous* pulse train. As you see, you need a sample clock VI for setting the sample mode. 
    * NOTE: Generating a finite pulse train with a M-series card requires 2 counter.
    With a pause trigger (DAQmx trigger property node) you can gate the output of that counter.
    Now you have to generate a gate-signal with the the 2nd counter. That means, only if  Ctr1-out is high Ctr0-out outputs the 20 kHz-signal. 
    Maybe you have to adjust the times in my example a bit. 
    Unfortunately there is just one "small" problem: "let's say 10 pulse trains in total" 
    This is not possible, because a 3rd counter would be necessary (*). 
    As a workaround you can modify the while-loop that both tasks are cleared after 50s. This is not brilliant, but should work fine for you. 
    A more sophisticated way is to perform a correlated DIO. So you can generate custom pattern for multiple outputs. 
    A good example can you find here: 
    Retrigger and Repeat Finite Digital Pulse Train in LabVIEW
    http://decibel.ni.com/content/docs/DOC-8473 
    or here:  
    Generating More Than 2 Pulse Trains Using CompactDAQ
    http://decibel.ni.com/content/docs/DOC-2167 
    Hope this helps.
    With best wishes,
    Ralf N. 
    Attachments:
    Gen Gated Dig Pulse Train-Continuous.vi ‏38 KB

  • PCI-4472 not functioning with DAQmx Linux 8.0

    We have multiple systems with PCI-4472 cards in them running SUSE Linux, and all but one of them function properly.  On the particular system in question (which has identical hardware and software to the functioning systems), nilsdev lists no devices.  Further investigation revealed the following excerpt from dmesg:
    allocation failed: out of vmalloc space - use
    vmalloc=<size> to increase size.
    Unable to handle kernel NULL pointer dereference at virtual address
    000002fc
     printing eip:
    f9ede608
    *pde = 00000000
    Oops: 0002 [#1]
    SMP
    Modules linked in: nidsark nistcrk nicdrk nistc2k nimru2k nimxpk ipt_pkttype
    ipt_LOG ipt_limit nipxirmk nidimk nimsdrk nidmxfk nimxdfk nimstsk nimdbgk
    niorbk speedstep_lib freq_table nipalk nikal snd_pcm_oss snd_mixer_oss snd_seq
    snd_seq_device button battery ac af_packet video1394 raw1394 edd ide_cd cdrom
    sk98lin ohci1394 ieee1394 snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm
    snd_timer snd soundcore snd_page_alloc i2c_i801 i2c_core hw_random generic
    ehci_hcd intel_agp agpgart uhci_hcd usbcore shpchp pci_hotplug ip6t_REJECT
    ipt_REJECT ipt_state iptable_mangle iptable_nat iptable_filter ip6table_mangle
    ip_conntrack ip_tables ip6table_filter ip6_tables ipv6 parport_pc lp parport
    nls_iso8859_1 nls_cp437 vfat fat nls_utf8 ntfs dm_mod ext3 jbd sg fan thermal
    processor ata_piix libata piix sd_mod scsi_mod ide_disk ide_core
    CPU:    1
    EIP:    0060:[<f9ede608>]    Tainted: PF    U VLI
    EFLAGS: 00010246   (2.6.13-15-smp)
    EIP is at nidsark-unversioned0004550+0x70/0x11e4 [nidsark]
    eax: 00000000   ebx: f6be1d68   ecx: 00000000   edx: 00000000
    esi: f6514770   edi: f6514760   ebp: f6be1964   esp: f6be1958
    ds: 007b   es: 007b   ss: 0068
    Process nipalsm (pid: 6952, threadinfo=f6be0000 task=c2344540)
    Stack: f6be1d68 f6514b68 f6be1d68 f6be197c f9efb4d0 f6514760 f6be1d68 f6514b68
           f6b82690 f6be1a1c f9e93409
    f6514b68 f6be1d68 f6514760 f6be1d68 00000004
           f6be1d6c 00000100 f6be19b8
    f95bbf19 f6be1bd0 f6be1d6c f6be1d6c f6be1b98
    Assuming that the NULL pointer deference was caused by the preceding failed vmalloc, I attempted to increase the vmalloc size to 512MB (which is certainly overkill).  This did nothing to clear the error.  One final detail is that this computer dual boots Windows, while the others have only ever run Linux.  It shouldn't matter, but I feel it is worth mentioning in the event that DAQmx for Windows somehow mangles the configuration of the card to a point where it no longer functions with DAQmx for Linux.  It should be noted that the card works just fine under Windows.
    I have the output from niSystemReport available in the event that it will help in diagnosing the problem, but am unable to attach it due to the size restriction of this forum.  The call trace from dmesg is in the attached file.  Any help would be greatly appreciated.
    -Peter Lisherness
    Message Edited by PeterLisherness on 07-10-2006 12:36 PM
    Attachments:
    dmesg.txt ‏5 KB

    Peter,
    I have a couple of other questions which might help us narrow this down.
    1.  You said both the working and non working machines have identical hardware and software.  I'm assuming this means both machines are Pentium 4 3.2 GHz SMP machines 2 GB of RAM, have the same motherboards etc.  I also assume that this means that they also are both running SUSE 10.0 and have the same updates, and kernel versions.  Is this correct?  A system report from the working machine could also help us confirm this.
    2.  Can you easily reproduce the Oops?  When does it occur?  Does it happen when the machine first boots up, or do you have to run nilsdev first?
    Thanks,
    Shawn B.
    Use NI products on Linux? Come join the NI Linux Users Community

Maybe you are looking for