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

Similar Messages

  • Shunt Calibrate Multiple Channels in One Task - Error 201398

    Having created a task with multiple AI Strain Gage channels (each set with same bridge properties and quarter bridge config.), I recieve an error when passing the task to the "DAQmx Perform Shunt Calibration (Strain).vi"
    My VI works fine if only a single channel is contained in the task, but more than one channel causes the error.  Do I have to loop through each channel manually?
    The "possible reason(s)" varies depending on my approach, but often indicates the AI.Bridge.ShuntCal.GainAdjust being requested is "-Inf"

    You can start a new thread even if you have the same issue. What exactly you aregetting and show us the code for better understanding.
    The best solution is the one you find it by yourself

  • Reading multiple channels in one task

    Hi i am trying to read three voltage inputs in one task. I have configured the task and used generate code to get the example. But i am now getting the data from all three channels in one waveform, but i would like to work independantly on the three channels. What should i do.

    Hi vamy,
    If you read all channels with AI Read, it should return an array of waveforms (not just a single waveform). You can use "Index Array" to get the waveform from each individual channel, or use "Index Waveform Array", which is basically the same operation.
    Dan

  • I want to use two analog channels and one digital simultaneo​usly

    Hello and thanks in advance for reading this!
    What I am trying to do is generate two different signals from the output channels of my interface card (PCI6024E) and simultaneously use a digital line so that I can switch two tranzistors (one NPN, one PNP) which actually control the "flow" of the two signals. This means that both signals need to be "active" while the VI is running and at the same time whenever I want to choose the signal not in use I need to use the digital line so that I switch the tranzistors and I get the desired signal.
    I have already created a VI which activates a digital line and while I was trying to add with the NI-DAQmx Assistant the first digital output, I discovered that it c
    ould not be used simultaneously, because there was the error code -200324 saying that "Device not available in NI-DAQmx. It is possible that the device is being used by Traditional NI-DAQ or that the device is being reset."
    I did reset the device but as I get it when VI runs, it cannot have an active digital channel and an analog output channel at the same time (not to mention two analog channels). Correct me (And make my day if I am wrong but this seems to be the case. Thanks a lot for your time!

    Hey Shootist000,  Thanks for the replies.  First off, I am actually okay if we both have each other applications so I am not concerned about that. It is still unclear from what you have said as to whether I can in fact, use these two separte time machine backup to create two separate profiles on the new hard drive.  If that in fact can be done, then - will it create two copies of the apps we both have in the ROOT of the drive as well as placing all the ones we each have separately?
    And reading your second reply, makes me think that maybe the partition is the way to go to begin with and then down the road - after I am in the new iMac, I could reformat the iMac 27 with only one partion and restore my son's latest back prior to the reformat thus giving him full access to the 2 TB of the drive.
    If this is still making sense, does this mean :
    replace the 1TB with a 2TB - but have it partitione - 1.5 TB & 500 GB.
    Install(Restore using Time Machine) my latest back up prior to the  1.5 partition
    Install (Restore using Time Machine) my son's latest back up prior to the 500 gig partition
    Lastly, in order for us both to be using the partioned computer - I am assuming Switch user can no longer be used - so would we need to restart and select our respective partions in order to use the computer?   And if so, how would we each be able to be using time machine to back up - two separte external hard drives - with each one dedicated to only one partition? Or ? 
    Thanks so much.
    Ironically, I am only trying to do this so that I don't need to manually install all his apps, setting, games, blah blah for this temporary period.  :-)

  • How to Read All Channels in one task in vc

    I want to read 6 channals' datas in VC. Now I create 6 task, and read it sperately.
    I know that it can read from one task, but how??
    DAQmxCreateTask("",&task1);
    DAQmxCreateTask("",&task2);
    DAQmxCreateTask("",&task3);
    DAQmxCreateTask("",&task4);
    DAQmxCreateTask("",&task5);
    DAQmxCreateTask("",&task6);
    DAQmxCreateAIVoltageChan(task1,"Dev1/ai0","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCreateAIVoltageChan(task2,"Dev1/ai1","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCreateAIVoltageChan(task3,"Dev1/ai2","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCreateAIVoltageChan(task4,"Dev1/ai3","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCreateAIVoltageChan(task5,"Dev1/ai4","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCreateAIVoltageChan(task6,"Dev1/ai5","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCfgSampClkTiming(task1,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
    DAQmxCfgSampClkTiming(task2,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
    DAQmxCfgSampClkTiming(task3,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
    DAQmxCfgSampClkTiming(task4,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
    DAQmxCfgSampClkTiming(task5,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
    DAQmxCfgSampClkTiming(task6,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
    DAQmxStartTask(task1);
    DAQmxStartTask(task2);
    DAQmxStartTask(task3);
    DAQmxStartTask(task4);
    DAQmxStartTask(task5);
    DAQmxStartTask(task6);
    DAQmxReadAnalogF64(task1,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData1,N,&read1,NULL);
    DAQmxReadAnalogF64(task2,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData2,N,&read2,NULL);
    DAQmxReadAnalogF64(task3,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData3,N,&read3,NULL);
    DAQmxReadAnalogF64(task4,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData4,N,&read4,NULL);
    DAQmxReadAnalogF64(task5,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData5,N,&read5,NULL);
    DAQmxReadAnalogF64(task6,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData6,N,&read6,NULL);
    DAQmxStopTask(task1);
    DAQmxStopTask(task2);
    DAQmxStopTask(task3);
    DAQmxStopTask(task4);
    DAQmxStopTask(task5);
    DAQmxStopTask(task6);
    DAQmxClearTask(task1);
    DAQmxClearTask(task2);
    DAQmxClearTask(task3);
    DAQmxClearTask(task4);
    DAQmxClearTask(task5);
    DAQmxClearTask(task6);
    thank you!

    DAQmxCreateTask("",&task1);
    DAQmxCreateAIVoltageChan(task1,"Dev1/ai0:ai5","",DAQmx_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volt​s,NULL);
    DAQmxStartTask(task1);
    DAQmxReadAnalogNChanF64(task1,-1,10.0,DAQmx_Val_GroupByChannel,OriginD​ata1,N,&read1,NULL);//This proto changes fo DAQmxNch1sample.... I do not have it in front of me
    DAQmxStopTask(task1);
    DAQmxClearTask(task1);
    int32_t DAQReadNChan1Samp1DF64_130(uintptr_t taskID, double timeout, int32_t incomingStatus, Array1DDouble **data, LStrHandle extendedErrorInfo);// is the C version
    Jeff

  • Two versions of code, one compile failure with java.lang.OutOfMemoryError

    I Have two cvs versions of one package. The differences between the two are minor, and I'm only trying to make the root version look like the latest branch. When I compile the branch, which has more code, things are fine. When I comple the root version I get
    java.lang.OutOfMemoryErrorSInce I can compile one version, it is clearly not the case that I lack RAM or something like that. What might the problem be? Thanks.
    Ken

    I'm compiling and I'm doing it with ant. As I said,
    it works fine with a slightly updated version of the
    Java package I have, but has this error while doing
    the same compile on the cvs root version of the
    package. I'm just trying to prepare for mergning the
    new code but can't compile the basic version of the
    package.Then, as already stated, the difference between the two versions is enough to cross the threshold of heap memory available to the VM that's running the compiler. Ant lets you provide VM options to an externally invoked VM. See its docs for how. If you're using fork="false", then just change or add -Xmx in ant.bat or ant.sh.

  • Multiple channels in one task with ch to ch config

    Hi,
    Normally the way I acquire sample from more than one channel on a cDAQ system is like this:
    1, I create virtual channels for my AIs in MAX
    2, in LabVIEW I use channel constants and merging them using comma as a separator (eg. with the concatenate string node).
    3, the I configure the sample clock using the comma separted channels as an input
    4, start the task
    5, acquire samples
    6, stop and clear the task
    This worked just fine so far as I acquired samples from my cDAQ modules with the same speed and all of them were simple analog inputs. But I have to implement a strain gage measurement (NI 9237) now and I'd like to use the bridge offset nulling calibration VI to get rid of the offset I have. That complicates my structure.
    It seems the VI I have created runs just fine but I am wondering if this is a legit solution as I used the sample clock twice. (the VI uses simulated channels for now)
    Attached the VI (LV2012) and its block diagram image as well.
    Please advise. Thanks!
    i-
    Attachments:
    Strain_test.gif ‏14 KB
    Strain_test.vi ‏36 KB

    I have failed to realize that the offset nulling VI has another input called "skip unsupported channels". This is false by default, but setting it true resolves the problem without changing my structure at all.
    Well done, kudos to myself
    Attachments:
    Strain_test2.gif ‏8 KB

  • Two hard drives or one to used with Parallel

    Hi everyone,
    I recently bough my first MAC (27 Imac). Unfortunately I have my work life on PC; therefore, I already own programs such as Autocad and Quickbooks. I would like to used Parallel or VM to have access to those files, since they are not available or I already have them. My question is: should I get two hardrives to run parallel, one with lots of storage, or an external thunderbolt. I'm confuse to which way I will get the files to open, save and render the quicker. Thank you in advance for all your replies.

    Parallels will manage the hard drive for you. You do not have to have a second physical drive to run Parallels.
    It is possible to use Parallels with Boot Camp, which lets you boot the Mac as a native Windows machine. I do not recommend this unless you are a gamer. For AutoCad and QuickBooks, there is no need for a Boot Camp partition.
    You can let Parallels set up a TIme Machine backup. If you follow the directions in Parallels, this will be a backup that only backs up what has changed, not the whole Parallels virtual disk, so it does not blow up Time Machine.
    I use Parallels for Quicken and for a Polar Heart Rate Monitor. It works great. It is outstanding in the latest version with OSX 10.7 Lion, because you can run your Windows machine (or your Windows Apps) in Full Screen mode and flick between them and your other Mac screens with a finger swipe on your Trackpad.

  • Select multiple channels for one task - control and shift keys don't work

    Hi,
    Following advice from several other posts, I'm trying to select multiple physical channels  from the dropdown list so that I can then use the "unflatten channel string" function later on. It looks like if I hold down either shift or cntrl I should be able to select multiple channels from the list, however, this doesn't work for me. I tried going into the "key navigations" property for the task channel control but it doesn't have any associations listed. Has anyone else come across this and found a fix?  I have previously got around this by stating multiple channels with a colon (eg. ai1:3) but this doesn't work for the unflatten function.
    Thanks, 
    Claire.
    Solved!
    Go to Solution.

    Thanks for your reply Dennis, I see what you mean, unfortunately that doesn't solve my problem so I'm missing something else. I've attached my VIs. I expected that the output from the unflattenstring block would be an array of either the channel references or the names I had given them, and that therefore the "array size" in the 4th pane would be "9" (equal to the number of channels).  Instead the output is a an "unnamed task#(some number)" when I look at it with a probe. Perhaps I'm misunderstanding how the task naming works?
    THanks, 
    Claire.
    Attachments:
    Analog SW Trigger_v3.vi ‏33 KB
    Cont Acq&Graph Voltage-Analog SW Trigger_cfjv3.vi ‏64 KB

  • Can we use two Communication channels for one Interafce

    Hi All,
    Can we achive this in XI .
    on basis of one value of field
    If we get a value X=0  then use CC1
    if we get a value X=1 then use CC2
    for Single Interface.........
    Regards

    Hi Gangadhar,
    i am working same scenario.
    the scenarios is
    Proxy->PI->JDBC
    the condition is
    IF Flag =0 it will sent to JDBC ,
    IF Flag =1 it will sent to file and Mail
    in mail it comes as a attachment.
    I have achived this scenario using multi mapping in IR.
    In ID  i have used one bussiness system as Abap related and one is Bussiness Service.In that Bussiness system i have assign two Communiction Channesl.
    In Reciever determination u have to select STANDARD and assing the recievers.
    In interface dermination u have to select ENHANCED.
    Please do these steps u r scenario will work fine.
    Thanks
    Ravi

  • Can I backup two Apple computers to one hard drive with time machine?

    I have a 2007-vintage MacBook Pro running iOSX 10.6.8 and an iMac  running 10.5.8 -- Can I use a single external hard drive along with Time Machine to backup both of these computers without any problems?  The hard drive has already been backing up the iMac for a few weeks now and the SeaGate drive had to be reformatted to do that. How will I be able to separate the information saved on the hard drive to know which computer is which? (i.e., how "smart" is Time Machine's file structuring when it makes a backup?)

    Do you mean you want to connect a USB drive to the TC?  If so, it will recognize a disk formatted in FAT32, but not ExFAT or NTFS.
    If you mean you want a Windoze-like partition on the TC's internal HD, that's a bit trickier, since it can't be partitioned.  But you could create a disk image on it via Disk Utility, formatted MS-DOS (FAT) aka FAT32, or ExFAT  (I'm not entirely sure if ExFAT would work in a disk image there, but it might.)

  • Create two identical idocs from one input file with BPM

    Hello all .
    My issue is the following.
    I have a scenario where an input file is mapped to an IDOC .
    The problem is that i need to create a second - almost identical - mapping to the same IDOC type and when the input file is receive both of them should be sent .
    I suppose that BPM is needed for this scenario, but are there any examples or tips i should follow?
    Thank you all in advance .

    Rucinski and Sarvesh, thank you both for your answers , they are very helpful.
    I have started trying Rucinski's method, because I would better avoid redoing the mapping on the second IDOC (it is pretty hard and critical) . But I have a problem.
    When i run the senario, the system replies (for the second IDOC)
    "Unable to interpret IDoc interface NEW_IDOC_MI"
    The reason for this is that in the Interface Determination i have two entries for the inbound interface,
    Orders.orders05 and
    NEW_IDOC_MI,
    which is wrong. I should be using the original  Orders.orders05. But this can't be done, because in tha case the Interface Determination, requests a Condition to be entered. Any suggestions on this ?
    Sarvesh, is there any way to duplicate the IDOC, keeping the mapping that is allready done ?

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

  • Use of one Multichannel Device with multiply programs

    Hi,
    I have two Labview DAQmx measurememt programs:
    1. one channel with microphon
    2. three or more channels with vibration sensors
    Every program use the Labview vi's:
    DAQmx Create Channel, DAQmx Start Task
        Loop with  DAQmx Read
    DAQmx Clear
    All is good working parallel in one system, if I use two measurement cards.
    Now I have only one 8 channel card 4472.
    I could use one channel for microphone, the other for the vibration sensors.
    Of course with the same samplerate.
    Is there an solution to capture the data from the one DAQ card from both programs?
    If not, what is a good solution to solve this problem, without complete rewrite both programs to one program?
    Possible a new DAQ measurement program to share the data to other programs at the same computer:
    - with TCP Servers for every channel or
    - with network shared variables or ?
    Peter

    I think I have to modify the programs:
    The multichannel with an option to send some channel data to a VI Server Network Queue, see good example    http://forums.ni.com/t5/LabVIEW/TCP-Listen-VI/m-p/1017592#M453829
    The other to receive the data from this queue instead of the use of DAQmx.

  • 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

Maybe you are looking for