create global channels programmatically

Hi all

My question has to do with daqmx.

I want to know if theres nothing to create the global channels or tasks programmatically without using the wizard of max or daqmx

the usual procedure is to create global tasks or channels using the wizard of max or daqmx and then add them to your tasks programmatically.

I want to avoid the use of max here and create channels by program that can be used or called later.

You can use the task of saving DAQmx or DAQmx save Global Channel screws to register programmatically.

http://zone.NI.com/reference/en-XX/help/370469AA-01/lvdaqmx/mxsavetask/

I agree with Dennis, however, almost all the tasks of data acquisition is possible using the standard functions.  You might want to take a look at a few examples of data acquisition by going to help > find examples > Input and Output material > DAQmx.  I always start by these examples, and change them if necessary.

Tags: NI Software

Similar Questions

  • Create my own conversion to global channel

    I have global channels provided for in each of my kitchen, and they all have different thermocouples. Because TCs Platinel II are not in the options for thermocouple, I made my own equation of conversion using Chebyschev polynomials. Is it possible to apply this conversion on the channel itself? How would I go to do this? (even if there is already a VI to plug a number in a polynomial of chebyschev) Thank you

    Hi nc61,

    Take a look at this example.

    Best,

    Carmen C.

  • Create a channel by combining smaller values of the other two channels

    Hello, I have two channels (v + and Volts1 +) and I am trying to create another channel (Volts_Small) that will have smaller values of the two channels. I need to compare each data point in the two channels and add little value to the new channel.

    THS is what I tried without success:

    I have Sun
    Dim: Set Group = Data.Root.ChannelGroups ("200_68")
    Dim Chn1: Set Chn1 = Group.Channels ("v +")
    Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
    Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")

    For i = 1 to Chn1.Size
    If (Chn1.Values (i) > Chn2.Values (i)) then
    Chn3.values (i) = Chn2.Values (i)
    On the other
    Chn3.values (i) = Chn1.Values (i)
    End If
    Next

    I would give much help appreciate with this! Thank you.

    Cedric

    EDIT:

    Nevermind, I solved this problem:

    I have Sun
    Dim: Set Group = Data.Root.ChannelGroups ("200_68")
    Dim Chn1: Set Chn1 = Group.Channels ("v +")
    Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
    Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")

    For i = 1 to 900000
    If (Chn1.Values (i) > Chn2.Values (i)) then
    Chn3.values (i) = Chn2.Values (i)
    On the other
    Chn3.values (i) = Chn1.Values (i)
    End If
    Next

    Hi Cedric,

    I strongly advise to use the calculator channel and the MinV() function that is already integrated to tiara.  You have less code that runs much faster, especially for the largest data sets.

    Dim: Set Group = Data.Root.ChannelGroups ("200_68")
    Dim Chn1: Set Chn1 = Group.Channels ("v +")
    Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
    Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")
    Var Variables: Variables = Array ("Ch1", "Ch2", "Ch3")
    Dim channels: channels = Array (Chn1, Chn2, Chn3)
    Call to calculate ("Ch3 = MinV (Ch1, Ch2)", Variables, channels)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • DAQmx create virtual channel (VI) error-229771 reports

    Hello

    When in a project that I am working to get error-229771 code whenever I try to run 'DAQmx create Virtual Channel (VI)' this does not happen when I create a vi not in a project.  The problem is that this project is very large and it if poster impossible to recreate. It's several hundred vi. Y at - it something that I missed in the forums and support that could explain this. I created the VI below in the project and outside the project. In the project, the error occurs outside the project, it runs without any problems.

    Message:

    229771 error occurred at .vi:1780003 DAQmx create channel (I-voltage-Basic)

    Possible reasons:

    Internal software error has occurred in the MIG software. Please contact the support of National Instruments.

    Task name: _unnamedTask

    Any help would be appreciated.  Thank you, Matt.

    LabVIEW version: 15.052(32bit)

    OR Max Version: 15.0.f0

    NEITHER DAQmx Verson: 15

    OS: windows 7 service pack 1

    PC: Intel Core i7-2600, 8 GB of ram

    Data Aquistion: NEITHER DAQ USB-6289 calibrated June 2015

    This code snippet returns the name of the first channel of analog input on the device first, and then tries to create a task for her. The bed of the canal, then close the task.

    Error message

    Hi Matthew,

    Thank you for following up after you fix your problem.  I'm glad to hear that you do not encounter this problem more.

    Here is an article that lists the reasons for this error (although unfortunately, I cannot pin down which is the exact cause in this case).

    http://digital.NI.com/public.nsf/allkb/03123D0E8A36C48E862577A4005B6BAA

    NOTE: This article specifies that the error occurs at startup task VI DAQmx.  You do not use the start task VI, so the task starts automatically in the DAQmx Read function.  The error will occur instead in the DAQmx virtual channel create, that you encounter in your error.

    I hope this gives you an idea about what could have gone wrong, and I'm sorry he is no more details.

    Good programming!

  • How to create a channel for a PXI-6509

    I'm working on a program to fight the PXI-6509. The only area that I have problems with creates the string by calling the function DAQmxCreateDOChan. I get no errors during the first DAQmxCreateTask, but get an error when you try to create the channel. Exactly how to create the channel name? In MAX, I have named the "DIO" device, do not know if it matters. Any help would be greatly appreciated.

    Hi schelgr,

    Have you had a glance examples DAQmx in finder example found in help > find examples.  In input and output equipment > DAQmx there is a lot of examples that should be able to help with this query.

    Concerning

  • How to create analog channels in Labview

    I need to create 4 channels analog pressure through card PCI-6229 in Labview v8.2 and I have to set these channels so that labview can communicate with the card... But I'm failing to do...

    If you have an idea, then please e-mail me back...
    Waiting for your valuable advice...

    Thank you all for reply

    but my problem is still not resolved I want yo not individually define the four channels at once.

    If possible please sen me some screenshots.

    Thank you

    waiting for your advice

  • Can I create custom fields programmatically?

    For a cloud connector, I want to fill some custom with new data fields.  Is it possible to create these fields programmatically, or should the user do it manually?  Thank you

    -dmitry

    Yes, it is in fact supported through the API for instances of the E10, and as you mentioned above, the information on this can be found here REST API - Contact fields.

  • Creating global variables

    Hello

    I'm looking for the best way to create global variables so that the script can run on all versions of adobe reader. I tried to gobal.varibaleName to the initialize event of the form, but this works only in earlier versions of the designer. I tried to use script variables, but there always Initializes the variable to the string value. I wrote some functions on the script object, and each time everything works fails, one count of global variable gets incremented. The event of the form potsave if the value of count is greater than 0, a simple warning message is displayed. Now how declare and initialize and increment this variable count so that the script can run on all versions of adobe reader?

    You must change your code little...

    First of all,

    All Global Variables are of Type string. If you use a sign "+" to add a number it will treat the value as a string and add at the end.

    So if you want to do digital calculations on global variables, first you need to convert to the type of law.

    In the code below I am analysis the value of an Integer type first before I increment.

    Second,

    You have created a name variable 'count', which could be a reserved name. Try to avoid names reserved for variables. So I created a variable "intCount."

    Third,

    According to increment the value if you want to assign the value to a global variable you need to string conversion. (reverse as you earlier in step 1 by conversion string integer)

    var a = parseInt (intCount.value) + 1; Step 1

    intCount.value = a.toString ();   Step 2
    var b is parseInt (intCount.value) + 1;.  Step 3
    intCount.value = b.toString ();  Step 4

    Thank you

    Srini

  • Virtual global channels on 9234

    Hello

    What are default AC/DC coupling and IEPE creating a virtual Global (voltage) channel related to a (OR-9234) DSA?  These options are disabled for the virtual channel voltage type.

    I can't test it myself as I'm waiting for the hardware.

    Kind regards

    Patrick

    Hi Patrick,

    Coupling of default setting is DC, while it is disabled by default, IEPE.

  • What are the options to programmaticaly create new channels of i/o hardware?

    I saw a post that usescustom channels to possibly do what I want to do. I was wondering other options available, for no custom devices?

    I have a set of AIs, AOs, tell and back. Instead of manually enter, I just want to do it programmatically. It's ok if I have to treat separately the different types (I, AO...).

    Which API to use to achieve this?

    THX.

    L.

    Replying to myself...

    It seems that there is an option using a variation on the example: NI Veristand > API > API definition system > support > create an SDF file with the user Channels.vi.

    Will post after actually trying.

    If you know other options, I'm always interested in hearing thereon.

    THX.

    L.

  • Tiara add a channel programmatically

    I want to add strings programmatically in a sheet.  How this is done?  I used the following code but seems not to carry out the instructions that I want in the purpose of the 2-D axis.  I used the standard controls example to paint the red background and it works.

    Call GraphSheetShow ("leaf 2")

    Call GraphObjOpen ("2DAxis1")
    D2AxisBackColor = "red".
    D2ChnX (1) = 'X-Channel.
    D2ChnY (1) = "Y-Channel.

    Call GraphObjClose ("2DAxis1")

    Call PicUpdate

    Hi, Nick Papa

    You must first add a new curve. If you want to create more then one curve, you must use different names like "New_Curve2":

  • Adding a date and time to create a channel in a data plugin

    I would like to preface this question with the fact that I am new to VBS programming.  What I want to do is to create a plugin. Most of it is done, but I'm having a problem with the addition of two times to a.  I have a text file that stores the date and time separated by a tab character.  This file format was designed to excel.  When I bring him both the date and time are in different channels and I can not figure out a way to add both and either replace them or even place it in a separate variable.  Here is an example.

    Chan (1) contains the date, Chan (2) contains both.  This statement, which places the data in the string is:

    The StandChannels value (0). Values (k) = Chan (1). Values (i)

    I tried:

    The StandChannels value (0). Values (k) = Chan (1). Values (i) + Chan (2). Values (i)

    error: object doesn't support this property or method

    or

    Chan (1). Values (i) = Chan (1). Values (i) + Chan (2). Values (i)

    error: object doesn't support this property or method

    I tried several other iterations and have had no success.  This seems to be an easy task, Miss me probably something simple.

    Hi Eric,.

    The first problem is that your datetime format string was wrong, you need to use:

    File.Formatter.TimeFormat = "MM/DD/YY SS.fff.

    Or maybe if your year is first of all it must be:

    File.Formatter.TimeFormat = "YY/MM/DD SS.fff.

    The second question was slippery.  The newsgroups (0) you throw combines the ProcessedChannel values correctly, but you were not successfully picking off those that you wanted to leave Chan (0).  I don't really know why the method you were using did not work, but I found a similar one that does.  Note that I've only changes part SUB New_File (file, ChanNames) of the code, not the SUB Previous_File (file, ChanNames) part of the code (got tired of typing).

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • NI DAQ physical channels programmatically set

    If I read the assignment of channels to a configuration file (for example 9205 AI0:AI1), how can I create DAQ tasks using the corresponding physical channels in labview?

    See the attachment for an attempt to more simple

  • StatBlockCalc without creating data channels for results

    I am creating the min, max and average for a group of channels (3 of them), but I don't want to create/store new data channels - I prefer to use the variables StatMin, StatMax, and StatArithMean.  For example, by using the script

    StatClipCopy = 0

    StatClipValue = 0

    StatFormat = «»

    StatResChn = 1

    Call StatBlockCalc ("Channel", "2-254", "" [1] / Ah - ' [1] / temperature A1'") '... StatDirec, RowNoStr, ChnNoStr

    causes of 3 new channels (min/max/AVG) with 3 items in each channelto created in the data portal.  Rather than create channels, I change the StatResChn = 0, I thought I should store only the values in the variables StatMin, StatMax, and StatArithMean

    StatClipCopy = 0

    StatClipValue = 0

    StatFormat = «»

    StatResChn = 0

    Call StatBlockCalc ("Channel", "2-254", "" [1] / Ah - ' [1] / temperature A1'") '... StatDirec, RowNoStr, ChnNoStr

    However this only seems to work uses a single channel (amperes / hour or temperature A1)

    Is it possible to get multiple statistical values (statmin, statmax, etc.) on multiple channels without creating separate portal data channels?

    Otmar

    Exactly what I was looking for.  I tried and it works fine.  Thank you very much!!!

    I have a supplementary question - is there any kind of available documents describing these properties/values such as ResultMin, etc.?

  • Property node "DAQmx system" global channel does not read changed MAX global channel of data after the 1st round

    I use the property system DAQmx node to read all the data the scale for global for thermocouple in MAX I use MAX 4.4, LV7.1.1, with a SCXI chassis in a PXI-1050 chassis. It seems to read the properties very well on first run. However, if you then change a channel property overall Max (for example a ladder or a type thermocouple factor) and it saves to the MAX, and then runs again the property node, it still read old data Max. To get it to read the changed data, it must close the VI, and then reopen it. It's painful when you recalibrate a vast set of thermocouples using MAX.

    Is it possible to force the node of system DAQmx property to reread MAX whenever it is executed, without closing his VI?

    See attachment. Run called standalone VI... PRINCIPAL. See instructions on the VI.

    Thank you

    Tim

    Hi Tim,.

    Your main VI has not been updated is because you do not clearly the task after every time you call the DAQmx property node.

    Attached is a modified version of your code that works. I just added the Task.vi clear DAQmx in the FindChanProps.vi.

    Best regards

    Faris has

Maybe you are looking for