Definition of channel programmatically in max scale

I'm trying to define a new scale for multiple channels in max. Currently, I have 8 channels to max and which could lead to 32. I need a way to define the balance for these with my program, I use the cDaq and pci-50xe acquisitions for now, everything is entered analog. Basically, I'm trying to write a program to do the balance for each channel, it should be fairly simple. I can't create all scales needed before running because there are too many different sensors. I want to do it this way, rather than creating a custom scale so that I can have multiple channels in the same task that all have different scales.

Ah.  you're really talking about application "Calibration factors" to your specific sensors. right (sort of a poor man TEDS)?

in this case, I use a scale of 'Master' "MyLoadCell" that defines the units and provides a "Nominal" scale and apply to the individual gain and offset each sensor via a scale property node.  You have several ways to store this information in your system.  Named MAX scales can work well in your case and the DAQmx > advanced > configuration scale palette offers two options to get these properties applied to the scale.

Tags: NI Software

Similar Questions

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

  • 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":

  • Get MAX scale settings

    Hello

    I'm reading the parameters of a structure that has been created in MAX.

    Can I get a list of scales stored in MAX, but when he tries to read the "type of scale" of the "ActiveScale' I get an error.

    What I plan to do is to collect the balance as slop settings, intercept and so on.

    Thanks for any help

    Yves

    Hello!

    I tried with this simple VI and all is well for me (LV2011).

    Can you give more info on your problem?

    Kind regards

    Marco

  • 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

  • The definition of dataProvider programmatically causes null reference

    I am trying to bind a drop-down list box to a list of countries via a HTTPService which returns xml code. If I set the dataProvider and declaratively labelField properties in the mxml, then it works fine. However, if I try to set it programmatically in the method that is called after the called HTTPService returns, then I get "TypeError: Error #1009: cannot access a property or method of a null object reference."

    Here is the dataServiceResult method:

    [Bindable]
    private var _lookupData:XML;

    public void dataServiceResult(event:ResultEvent):void
    {
    _lookupData = event.result as XML;

    cboCountry.dataProvider = _lookupData.countries.country;
    cboCountry.labelField = "@name";
    }

    This causes the above error. However, if I have the last two lines of the method in comment and change the combo box return to resemble what follows, then it works fine:

    < mx:ComboBox id = "cboCountry" styleName = "RequiredFieldLabel".
    dataProvider = "{_lookupData.countries.country}" labelField="@name" "
    change = "countrySelected ()" >
    < / mx:ComboBox >

    Any ideas? Declarative binding will work in this particular situation, but I have several other cases where I need binding programmatically to xml, so I need to get this script working. Thanks in advance for any help!

    Aaron

    The simplest way around this is to link the labelField and dataProvider to a variable or a get/set accessor, and then set the variables (or the Set accessor) in the result handler.

    What is happening is that the combo box has not been instantiated in the place in which you try to set the values, so the null pointer.

  • Class not found - was the question of definition of channel

    I'm a lot closer.  Tomcat is to put some key messages in the console and I forgot them.  Looks like I'm closer than I thought.  The query looks like its getting received, but my favorite service upward on the answer because I think two class not found issues.  But I can't say what classes are missing.

    [Flex] Application of the financial/RTMP deserializing AMF
    Version: 3 null
    2.0

    (Order = null (0) trxId = 2.0)
    null
    (Externalizable object #0 'flex.data.messages.DataMessageExt')
    (Table #1).
    [0] = (typed object #2 'flex.data.messages.DataMessage')
    identity = (Object #3)
    partId = 81959
    operation = 11
    correlationId = "419F99AA-B649-9490-650D-88F3CAADBCB7."
    headers = (object #4)
    messageId = "8AF6C660-9DE3-F155-6A91-88F3CAC5A4F0."
    timestamp = 0
    destination = "DocumentPart.
    timeToLive = 0
    body = (typed object #5 'com.hpdocs.ds.document.DocumentPart')
    documentId = 81960
    partId = 81959
    Content = "Hello World".
    clientId = "05E549ED-455F-A9AF-EEDE-88F3CA7E4BF9".
    "DocumentPart.
    (Object #6)
    DSEndpoint = "hp_rtmp".
    Iddm = "F65B351A-A60C-6F91-2932-44630DAED2B9."
    (#7, length 16 byte array) ""
    7
    [Flex] Order receipt: TCCommand [Cmd: 0, MethodName: null, TrxID: 2.0]
    [Flex] Response of the AMF financial/RTMP serialization
    Version: 3
    (Order method = _error (0) trxId = 2.0)
    (Print object #0 'flex.messaging.messages.ErrorMessage')
    headers = (1 item)
    rootCause = (typed object #2 "java.lang.NoClassDefFoundError")
    message = "javax/transaction/SystemException.
    localizedMessage = "javax/transaction/SystemException.
    cause = (typed object #3 "java.lang.ClassNotFoundException")
    message = "javax.transaction.SystemException."
    localizedMessage = "javax.transaction.SystemException."
    cause = null
    exception = null
    body = null
    correlationId = "419F99AA-B649-9490-650D-88F3CAADBCB7."
    faultDetail = null
    faultString = "there is an error unhandled on the server. javax/transaction/SystemException.
    clientId = "F65B3649-620E-C827-50C4-6A1C78BC3712".
    timeToLive = 0.0
    destination = "DocumentPart.
    timestamp = 1.273607998612E12
    extendedData = null
    faultCode = "Server.Processing".
    messageId = "F65B3675-5409-795E-747F-B2F459749415."

    It seems that your Tomcat missing the JTA parameter.

    Tomcat

    To use LiveCycle Data Services with Tomcat when not to use the integrated Tomcat configuration, install support for the Java API of the Transaction (JTA). You will also need to install several other libraries depending on the features you want to use. Follow these steps after deploying the LiveCycle Data Services WAR files. These steps are not required for the integrated Tomcat installation.

    1. Stop Tomcat.
    2. To install support for JTA, a recommended implementation is the Manager of operation open Java (JOTM), which is a transaction manager standalone fully functional opensource.
      1. Download JOTM from http://jotm.objectweb.org.
      2. Copy the JAR files from jotm -root/lib to [tomcat root] / common/lib.
      3. Create a context for your web application and register JOTM using the Transaction element. For example, for the samples WAR create a tomcat-root/conf/Catalina/localhost/lcds-samples.xml file and add the following lines:
        CONTEXT antijarlocking="false" antiresourcelocking="false"   docbase="${catalina.home}/webapps/lcds-samples" path="/lcds-samples"   privileged="true">  
        

        Note: If a context file exists for your web application, add the element under the element.

    3. Increase the maximum memory to at least 512 MB by specifying the maximum segment size for the JVM in the JAVA_OPTS:-Xmx512m
    4. (Optional) To enable custom authentication, locate libraries under install_root/resources/security/tomcat Tomcat security resources.
      1. Place the fichiers.jar - tomcat-flex and flex-tomcat - server.jar in tomcat/lib folder.
      2. Add the following line in the file descriptor context for your web application:

        You can now perform authentication against the current Tomcat realm. Generally, the default configuration for authentication stores information user in conf/tomcat - users.xml. See the Tomcat documentation for more information on realms. See the LiveCycle Data Services documentation for more information on custom authentication.

      3. You may also update her active > in /WEB-INF/flex/services-config.xml in each deployment of a LiveCycle Data Services WAR file. For Tomcat, ensure that the TomcatLoginCommand is active in the section:
        ...
        
    5. (Optional) To use the JMSAdapter with the Message Service, install and configure a JMS (such as ActiveMQ or openJMS) for use with Tomcat.
    6. Restart Tomcat.

    original doc is here

    I hope this will help.

  • How can I get the name of the channel scale?

    Hello.

    I am trying to adjust a scale for a channel programmatically in a task. Attached is an excerpt of what I'm trying to do. I am unable to find the name of scale associated with the channel. Ideally when I "ChanType" I'd scale name and move to the scale property node and create the VI of scale.

    Thanks a bunch.

    (I just noticed the error line not be connected at the beginning.) Has been corrected, but I did not bother to repost.)

    Never mind.

    Once I simulated the device on my machine, the appropriate properties became available. It's all good.

  • 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

  • automate the creation of channel in max

    Hello all, I searched this topic in this forum and have not had a previous post. I was wondering if this is possible:

    I would write a VI to the Max and settup automatically tasks the virtual channels instead of manually configure these in MAX.  So this VI can interact with MAX or write in its configuration file. I don't want to "create channels and tasks" in my main application VI. My app will pick up the channels or the MAX running tasks.

    I would like your advice on how to achieve this. Thank you!

    Bryan

    Take a look at this palette:

    Measurement of e/s > NOR-DAQmx > advanced > system configuration > storage

    (Yes, it's a shallow)  But there are some functions to save the task to MAX called DAQmx Save Task.vi

  • NOR-MAX recorded do not channel setting correctly

    I'm developing a system using Modules of field Point. I use 7 LabVIEW and NOR-MAX 3.0 to create commands and attributes for the FP-PG-522 module.

    To create an attribute of channel using NOR-MAX 3.0, I selects the FP-PG-522 module in the section of remote systems, select the desired channel, select the string attribute, then select Create point.

    A new item now appears in the data area. When I select this element, there is a description in the section 'Channels used on this point', which describes the attribute. For example, I chose the market time attribute. For this article, it says "this element represents the 'On Time' of the channels selected attribute. This attribute can be set to any integer between
    1 to 65535. "

    Then, I hit the SAVE button, which shows how to save the IAK file locally, so to save it on the module of ps2000.

    If I close OR-MAX 3 and restart, when I select the same new element in the data area, the attribute has changed. It doesn't seem to be any pattern, but I had such combinations as the "control" attributes, instead of the attribute "Generate impulses", etc..

    Then I have to delete all these channels and start again, however, data are still once, not saved correctly.

    Someone else knows this and knows a way around it?

    Chris,

    This problem has been identified and the fix will be included in the next version of FieldPoint software.

    I just wanted to let you all know.

  • effect of channel more saturation

    Hello

    I have a .vi to acquire 8 channels, with a map of 6062E and a Council of the BNC-2115.

    For each channel, I created a scale, so that I get physical units. Until today, I used to read Volts, then multiply the signal by the sensitivity and adding an offset, but I want to do the conversion correctly (and so, for example, I will save on disk data with channel names, units and so on).

    But here's the part I don't understand.

    If I set the slope to 1, otherwise said, I can read Volts, the measure is very good. I compare it with a multimeter reading and both agree. Readings from 1 to 5 v range.

    So, I then put the gain at its real value: 22.5 (Physics/volt units) and no lag (ordered originally = 0). And here's the weird stuff: reading will get saturated at much lower than expected (5 * 22.5 = 100), it saturates when you reach 11.87.

    If I set the slope to 1 once again, readings again match the multimeter reading, ranging from 1 to 5 v.

    Thus, a final check: I put again the 22,5 slope and also measure with the multimeter: the multimeter is the same reading as always, read the value going to saturate at 11.87.

    This value of 11.87 depends on the ordinate originally I set, you can not say right now the tests I did, but has not only the amount to the y-intercept as I entered, he changed with apparently no sense.

    Please, someone has an idea of who's going, / what I'm doing wrong and why?

    Hello

    Well, I finally solved it. In fact, I finally found what I was doing wrong.

    My main mistake was not carefully reading the error I mentioned above, just see the error, code, & read about.

    In fact, since the scale is done before the channel definition, MIN and MAX values correspond to units of implementation scale and not the volts. I got the error because the value entered, even in units on the scale, was off the beach. And as I was entering the corresponding values of volts (1 to 5), these values in units on the scale where really low, so he could saturate at 11.87 which corresponds to the maximum readable content, adjusted by the values MAXIMUM and minimum is entered.

    So finally the problem is resolved. Once again, thank you very much for your time and effort, it's really interesting to have a forum like this with active people, helping us to the newies.

    Thank you.

  • Help the evolution of the scaling of a virtual channel?

    Can anyone help me please with this block of code that I have?  I don't understand why on the first run it works fine without error exception daq, but on the second run, I get an error.

    More detailed, I create a virual channel in a Sub with a button click event.  This virtual channel is set to the default values (MIN = - 10, MAX = + 10, linear scale with scale and Offset 1 and 0 respectively).

    The click event, is where I'm having difficulties in the other slot.  In this Sub I am creating custom scales and assigning values to them, setting the MIN and MAX values of the virtual channel on the same minimum and maximum values of the custom scale being used and assigning custom for the channel finally this new scale virtual to use.  The code works for the first run.  When I change the scale and then run the code again to a second iteration, I get an Exception of daq error.

    Its seems that the MIN and MAX are ready on the second run, but the scaling is not reset to the new scale of values.  Can someone check and if so, what is wrong and must be changed in my code?

    First execution of the click event of the 'Download' button to assign the custom scale with its values to the virtual chanel... works very well.

    Change the scaling, in the case of 400 to 600 and then run the same code with the 'Download' button click event and I get the daqException error

    myTask.Control (TaskAction.Stop)

    PreScaledVals.TrimExcess (): PreScaledValsArray = PreScaledVals.ToArray
    ScaledVals.TrimExcess (): ScaledValsArray = ScaledVals.ToArray

    If chkBoxTblScale.Checked = True Then
    Try
    min = ScaledValsArray.First
    Max = ScaledValsArray.Last
    Catch ex As Exception
    MessageBox.Show (ex.) Message & "" scale of table must contain at least two values prééchelonnés and two nationally. ")"
    Return
    End Try
    Else if chkBoxLinScale.Checked = True Then
    min = numEdtMIN.Value
    Max = numEdtMAX.Value
    Else if chkBoxMapScale.Checked = True Then
    min = numEdtSMin.Value
    Max = numEdtSMax.Value
    End If

    LinScale = New DAQmx.LinearScale("Linear Scale", scale, offset)
    RMPScale = New DAQmx.RangeMapScale("Ranged Map Scale", prescaledMin, prescaledMax, scaledMin, scaledMax)

    If chkBoxTblScale.Checked = True Then
    Try
    TblScale = New DAQmx.TableScale ("Table scale", PreScaledValsArray, ScaledValsArray)
    Catch ex As DaqException
    MessageBox.Show (ex.) Message)
    End Try
    End If
    Try
    If cboBoxChannels.Text = "6" then
    ChannelSelected = 6
    Else if cboBoxChannels.Text = "7" Then
    ChannelSelected = 7
    Else if cboBoxChannels.Text = '8' then
    ChannelSelected = 8
    Else if cboBoxChannels.Text = '9' then
    ChannelSelected = 9
    Else if cboBoxChannels.Text = "10" Then
    ChannelSelected = 10
    Else if cboBoxChannels.Text = "11" Then
    ChannelSelected = 11
    Else if cboBoxChannels.Text = "12" Then
    ChannelSelected = 12
    Else if cboBoxChannels.Text = '13' and then
    ChannelSelected = 13
    Else if cboBoxChannels.Text = "14" Then
    ChannelSelected = 14
    Other: ChannelSelected = 15
    End If

    Select the ChannelSelected box
    Box of 6
    myTask.AIChannels (lblCh6Wfg.Text). Minimum = min
    myTask.AIChannels (lblCh6Wfg.Text). Maximum = max
    If chkBoxLinScale.Checked = True Then
    myTask.AIChannels (lblCh6Wfg.Text). CustomScaleName = "linear scale".


    Else if chkBoxTblScale.Checked = True Then
    myTask.AIChannels (lblCh6Wfg.Text). CustomScaleName = "Table of scale".
    Else if chkBoxMapScale.Checked = True Then
    myTask.AIChannels (lblCh6Wfg.Text). CustomScaleName = "stood at the map scale.
    End If

    TblScale = Nothing
    RMPScale = Nothing
    LinScale = Nothing

    Thank you

    Look at what you are doing with the New .

    If the object does not exist then prompts you to create it, but when it is created, you must be change it.

  • custom scales

    Is there a way to get custom scales that appear in my Explorer in MAX?

    Thank you

    Steve

    Hi, SCD,.

    The functionality of adding a scale existing DAQmx (maximally) to a project (and vice versa) has not yet been transposed. There is a proposal for a project, so that this feature will be added in the future. If all goes well, it will be as simple as drag / move, in addition to programmatically add the scales by reference VI or something similar.

    In the meantime, there are some workaround solutions, depending on your current situation. If you already have all your ranges able & Automation Explorer (MAX), you can export (file > export) scales only and then import them into the project. I suggest you create your ranges in MAX first that will allow you to do.

    You can find a VI 'DAQmx save Scale' under this palette:
    Configuration of the IO system"measure DAQmx' DAQmx advanced" "DAQmx storage

    After you have created your scale in LV, call this VI and it will record it as a "persistent scale" in MAX.

    DylanC

  • the scale of data acquisition and data entry error

    I have a USB 6211 camera set to MAX for 11 different channels: the first 10 channels are configured with a scale factor of 2 while the last channel is configured with a scale of 1.  I connected battery 9 V for the first two channels, ai0 & ai1, (level 2) and the last channel, AL10, (1 scale). The input pins were 15, 17 and 20 for input voltage with pin 28 connected as a reason. Then, I checked the feature in MAX.  Surprise! I expected to see 18 volts for the first two channels and 9 volts for the last channel, but much to my surprise I got all channels showing data about 10.86 volts and the last channel showing a value of 7.79 volts!  How is it that I see the values for channels not connected! In addition, why are values of cable channels so screwed up! With a 9 V battery and a scale of 2, I expect to see 18 volts, not of 10.86, and where the 7.79 volts for the channel which has a scale of 1!  If I run MAX continuous mode instead of the sample N mode I get a few other strange results: I get a single horizontal line and 1 sinewave!  It's amazing because I have a 9 volt battery connected to the unit! I don't even how arrays of the VI that uses these signals is like since they are all screwed.  Will you please advise me on this one because I'm completely stumped.


Maybe you are looking for

  • Playing files on Stor e TV HD

    I know .mkv files are not supported by this player, but like, I've converted these files for different file types (assumed file supported according to the package directions). XviD, MPEG 4 (* ts) and so on, but it still does not play, even through an

  • G62-450SA: HDD Test failed

    Hi, I did a test drive on my laptop and I get the following, ID of the failure; OQF3OJ-5P17RL-XDO14j-6OQMO3 Product ID; XF483EA #ABU I need to replace my hard drive? Regards Shay

  • Internal microphone will turn not on/stopped working... help

    OK... so The Interal Mic has stopped working - it will not record audio in videos or recordings. It is not the PC speakers because they work perfectly. The internal MIC is on & I also never used any other USB Mic.  Another thing, I tried Mic TROUBLES

  • How to develop a slide show with music

    I need assistance to develop a slide show accompanied by music.  Thanks for the help!

  • Game saying lack of msvcr110.dll

    I'm playing an older game, but it won't work because it is said that msvcr110.dll is missing. I've been on this site several times, downloaded and installed files, made sure all of my updates and drivers are up-to-date and restarted my computer. When