Writing a string flattened to a Description DAQmx channel

Hi all

I have an application in which I have a main VI and VI configuration.  The latter configures how the façade will also look although the way in which the data acquisition system (which is driven by the main VI) will be exploited.  In the configuration VI, the user selects the channels as well as a good description of the string (which is contained in a cluster of enums, Boolean and numeric values).  I am able to write the description of each string in the description property of DAQmx channel as a string (example below) and then read the string in the back and reformat it as some type of delimited string in which I understand the structure and can decode correctly using different string functions (for example the tokenize string (, string digital, etc.).  I thought I'd get a little smarter on this subject and simply flatten the clusters to a string and write these binary strings in the description.  However, when I read this back from the description, I get error 74 - structure of memory or data corrupted.  Did anyone tried something like this before?  Is there a better way to do this?  What could I do it wrong?  Any help is appreciated.  Peace, Matt

Hi Matt,

There are a few screws LabVIEW for coding/decoding Base64: http://decibel.ni.com/content/docs/DOC-5544

I have not tried, but I expect that you can flatten to a string, convert the binary string to a string in Base64, and then define the string Base64 Descr property of the node DAQmx channel property. Data recovery would be the exact opposite.

Brad

Tags: NI Software

Similar Questions

  • ini to physical channel DAQMX channel

    I would like to save all my physical channels DAQMX as strings in an ini file.  My program reads information in string and convert to the physical channel DAQMX.  Is a kind ride the only way to convert a string to a type of DAQMX channel?  I wanted to tell all of my information communications in an ini in case something change.  Thank you!

    Not cataloged. You can wire a string directly to the entrance of the channel.

  • How can I remove DAQmx channels

    I'm a bit new to LabVIEW and many of you may see this as a very simple question, but how do I remove DAQmx channel (if it is the correct term, or is it jobs?).

    I have played and seem to have a few redundant channels and wish to remove them. I have searched for a while now and can't seem to find it anywhere.

    You must open DaqMX by clicking on:

    Once DaxMX is open, you need open channels box:

    Then, you click with the right button on the channel or the task you want to delete, then select Delete.

  • Writing to the nodes property DAQmx channel does not refresh the channel values

    Hi all

    I have a riddle.  I created a task programmatically in LabVIEW and programmatically added several analog input channels to the task.  It's easy.

    I wish that my user must be able to modify the individual channels within the task.  To this end, I created a set of screws that allow it to change the settings appropriate to the channel (for example, if it is a channel of thermocouple, it can change the type of thermocouple, CRC value, etc... If it is a strain gauge channel, it can change the coefficient of fish and so on).  These screws all works beautifully, like the VI where they live.

    The specific question that I have is that writing to the channel property nodes refreshes not communication channels.  See the images below.  The first image is the code that needs to define new channels of communication:

    Note that immediately after setting the property nodes, I read their values back, just to see what comes out back.

    The second image is an image of the public Service immediately after the execution of this VI.  Note that the values read from the channel property nodes did not updated to match to the set of values, but instead kept their initial configuration values:

    What I am doing wrong?  I fought this for a few days now and I'm stumped.

    Thanks for your time!

    Diane

    Hi, Diane.  A week ago, I also had a problem changing the channel properties (not sure that our situtions are exactly comparable, but...).  My 'solution' to want to change the appearance of the task was to just throw the original task and recreate all the elements of the task from scratch.

    I've not done enough 'experiments' to work when you can and cannot change, but am now much more cautious...

    Bob Schor

  • Bug: Types of data with descriptors of Type great crash Variant string flattened

    See here. (Sorry for redirection)

    Hi Jim,.

    I could reproduce the crash. I dropped the CAR # 198031 for the same thing. I'll post updates here in case we need more information. Thanks for reporting the accident.

  • High sampling rate for 18 strings in a single task - DAQmx

    Hello

    My current experiences require the acquisition of 18 channels (6 HAVE custom voltage with excitement, voltage AI 12) data at a sampling frequency of 50 kHz. My question is if it is faesible using a single cDAQ-9172 chassis. Used modules are 2 x NI 9237 and 4 x NI 9215.

    The previous researcher on this project used 2 different Renault to do this, but I was hoping that I could reduce it to a single DAQ to simplify the synchronization of all channels.

    I wrote a *.vi (attached) to do this and write to a TDMS file using a structure of producer-consumer; However, when I run the * .vi, I can run for minutes, but the number of samples recorded for the PDM is rarely more than 100 k. Subsequently a buffer size error (attempted to read from the samples that have been overwritten) with less than 200 k samples ever record. I checked the max sampling rate (using a property timing node) with the configured task as in the * .vi and it shows a maximum of 235kHz.

    I can't say if I make just the structure of the producer consumer incorrectly or if I ask too much of the cDAQ-9172 unique?

    Any help would be much appreciated.

    See you soon

    Bart

    Hi bart.s,

    TiTou speaks sampling aggregate not simultaneous, so sampling rate 50kS/s is the same for all channels.

    I see the problem in the loop of the producer. If your sampling frequency is 50kS/s/ch and you read that a single sample/ch you will lose data because the producer loop cannot run so fast. You should read more than one sample. I recommend you also to move your tracing to the consumption loop code and work with larger amounts of data.

    The second problem may be with the error handling in your loop of consumer. Merge the mistakes of loop of consumer and producer and also add a few general for two loops off if the error occurs (for example, using local variable).

    Best regards

    CaravagGIO

  • find daqmx channel by name

    How can I save a constant DAQMX queue (string) and back again?

    Is small question a standard function call that would do this for me?

    Thank you in advance for the help

    Hey,.

    A picture is worth more then a thousand words:

    That would be the way to search for a certain device. But remember that if you have more such devices, it must be one.

    You can also check if the device is simulated.

    See this just as a hint. You may need to do more to ensure that always have the right device!

    Christian

  • DAQmx channel chain

    I'm looking for in the abstract, of the user, the internal routing of counters in my data acquisition tasks.  So on the front panel, I have a control for device name to which I want to add specific channels for in my code.  The only way I can think to do is to concatenate the channel to it (for example, "Ctr0InternalOutput") and to mount the device name in a string, but how do I get this string to a single channel that can be used as a source for a schedule vi DAQmx?  Unflatten channel doesn't seem to work like this out just a string and I need a terminal type of NOR.

    See you soon

    As far as I know that you can treat it as a string. Just concatenate. (Note the slash)

    If you really want to be the right type (rather than let LabVIEW He has catalogued for you), you can insert a typecast.

  • Is there a programmatic access to the Calibration Wizard of DAQmx channel in LabVIEW?

    Hello

    I'm making my own external calibration of my SMU-4300 OR against a HP 3458 A using an amplifier to the source of several different voltage for the 4300 points. I use the channel calibration Assistant in the DAQ Assistant to my virtual channel manually set and save each point. This utility works great for me because I don't want to accidentally erase the external calibration constants and adjustments are seamless later (without having to apply one of the constants of calibration every time I have a measurement, it has simply everything for me in the background). The only problem is that manually configure each condition to calibrate is extremely slow and tedious; I want to speed up the process by creating a VI that opens/closes relay and resolve tensions that I want to calibrate.

    I was looking around the Calibration DAQmx palette, but I was unable to find a screw that had the same effect as the wizard of calibration channel without changing the external calibration constants. Anyone have any suggestions to achieve this? Worst: I'll create a linear scale and apply it to my channel, but I have to find a way to merge it with the already existing scale...

    Thank you

    Jack Grantham

    Validation engineer

    Texas Instruments

    Hi Jack,

    I recommend you to programmatically create a custom scale to correlate your reference known to your desired reading levels. You can then apply this custom scale for all the tasks you want to apply benchmarking. This knowledge base article explains how to create a custom programmatically through our API DAQmx scale:

    http://digital.NI.com/public.nsf/allkb/F7DAE47B4408A86F8625765700767FCD

    Who will work for you?

  • Sample quantity sample DAQmx channel property Node substitute in LabVIEW when = 1

    [cross posted from LAVA] 

    Problem:
    LabVIEW seems to be the substitution of a value of 1 to a value of 2 for the node property DAQmx Sample Quantity.Sample per channel for a continuous acquisition mode.

    Information:
    I have a task created in MAX (version 4.4.0f1).
    When I updated To Read samples 1 the task runs successfully in MAX.
    When I read the task in LabVIEW (8.5), the property node Sample Quantity.Sample per channel (i.e. the samples to read) is converted to a value of 2.
    If the value is greater or equal to 2 to the MAX, then the Sample Quantity.Sample by channel in LabVIEW property node returns the correct value.

    I get the same problem with a real or simulated device.

    Question:
    Is this desired behavior?

    Side note:
    If N samples (acquisition of buffer finish) is selected samples To Read cannot be 1 because it causes an error 200077 - must greater than or equal to 2.
    But no error will occur when the task is saved as a continuous (continuous buffer acquisition). I don't know if this is related. The error generated is:
    Error-200077 occurred to the DAQ Assistant
    Possible reasons:
    Measurements: Requested value is not supported for this property value.
    Property: SampQuant.SampPerChan
    You asked: 1
    Valid values begin with: 2
    Valid values ending with: 8589934590

    Shouldn't

    Hi JG,.

    Remember that the number of samples (one associated with DAQmx sync settings) is not relevant for continuous acquisition.  To read a sample at the same time, you simply specify this in your DAQmx playback function.  When you configure MAX to read an excerpt, it makes this same functionality automatically.

    You will not be able to get the value of another property node as the value is converted as soon as the channel is created (the value non-sous the constraint is not stored anywhere by the driver).  It should not be a need to this value in your code, if you want to read a sample to a schedule the DAQmx read simple example of function.  The amount of samples by reading is not part of the task itself, but is defined when running as an input to the function read DAQmx.

    You get the error message indicates that your device supports should not single-point HW timed - I would have probably asking which device you were using.

  • Best way to pass the name of the e/s DAQmx channel Veristand 2011 Custom Device?

    I'm building a custom device that will run a DAQmx task on the target of RT.

    I use VS2011 and alsoSimple custom device tool, which, at this point I'm not sure if it can work under VS2011...

    I created the fine libraries and custom device (a PWM input called InputPWM) has added to the Explorer from the system.  Running it returns the following error when I deploy:

    -----------

    LabVIEW: Type VI reference is not part of connector of VI.
    =========================
    NEITHER VeriStand: Open VI reference in Custom Devices Storage.lvlib-> pen device reference (Interface HW) .vi-> Custom Devices Storage.lvlib:Initialize Device (Interface HW) .vi OR VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi-> NI VeriStand Engine.lvlib:VeriStand Machine.vi engine-> Engine.vi NI VeriStand Engine.lvlib:VeriStand-> NI VeriStand Engine.lvlib:VeriStand .vi engine Wrapper (RT)
    c:\NI-rt\VeriStand\Custom Devices\InputPWM\InputPWM Engine.llb\InputPWM RT pilot VI.vi

    ----------------------

    On the console, it says that the error is 1026, LabVIEW: Refernece VI is not valid.

    I suspect that a potential problem is that I used a DAQmx e/s in the Configuration.ctl and the InputPWM RT pilot VI.vi in the framework can not deal with this type. So my questions:

    -What is the easiest way to pass the names of e/s to the custom device? For a quick test, I could go to hard code, but a more generic solution would also. Should be based on the address for the e/s MAX? Do I have to create the ctr under the DAQ hardware in VS?

    - or said by the way, is there a way to review these screw frame to see where the questions is, as you would with LV - RT?

    THX.

    L.

    If you use the tool of easy custom device, just put everything you need inside the cluster configuration data and these data will be in the home page of the custom (for the user to set) device and be available at runtime in the RT device custom code.

    You could have them type the name of the DAQ card and have an array of names for the channels to use. You then create the task running. or something like that. You like.

  • The null characters to flatten to a string

    Hi all

    I use the flatten the string function to convert a digital picture of a data string flattened in hexadecimal. When I do that, it adds 6-character null (zeroes) before each element of the array. How can I flatten my table without the addition of these null characters?

    Thank you

    Jasmine

    Change your data type to U8 (bytes) and a constant false to precede the wire size.

    With an array of bytes and not prefix size, you might also Type Cast

  • IMAQ flatten image for the 64-bit version of string

    Hello

    I noticed customer odd based on vision "flatten image chain" on labview 64-bit edition. In my program I use flatten image to the string (with compression to JPEG and kind of flatten Image) to compress and send data to another application. I noticed on the compressed image color missmatch. I say red (255,0,0) 32-bit RGB image and I flattened for string and then save this string as a binary JPEG using Write to vi. When I open the file of the picture is blue (0,0,255). It doesen't matter how data is written (big endian, little endian or native) the result is always the same. 32-bit edition Labview, the code worked correctly.

    I reported a bug in the NC and I'm still waiting for a solution to this problem.

    LabVIEW: labview professional development system 2010 32/64 bits (with vision development module) completely v10.0f2 lie

    Systems: labview 64 bit on windows 7 64 bit-> flatten image to string-> false color

    LabVIEW 32-bit on windows 7 64 bit-> flatten image to String-> colors OK

    LabVIEW 32-bit on windows 7 32 bit-> flatten image to String-> colors OK

    A picture of the block diagram that I used to test the conversion is attached.

    See you soon

    Hi 3DVision.

    I think I see the problem... you code looks like he expects that out of "flattening the image of the chain" will actually be a JPG file as a string, because you have chosen to use the JPG compression options. However, this is not the way that VI is intended to be used. It is simply a way to convert an image type of Vision in a string representation which can be easier to haul around (for example via the network, the user file format, etc.). It is a parallel to normal 'flatten' that can be used on any type of data from LabVIEW. The format of this string is the owner and has provisions for storing information that is specific to the Vision images that cannot be represented in the file formats normal image (overlay information, benchmarking, custom, etc. data info). If you are save the string flattened in a file and expects to open as a normal JPG file, it is unlikely to work properly. The only way that it would be guaranteed to work is if you switch to the corresponding VI "unflatten chain. I don't know why it works in 32-bit mode, but it sounds like a lucky fluke.

    For your use case, you probably want to use the VI "IMAQ write the string. This does not give a result string that is identical to the specified file format.

    Eric

  • Convert DAQmx task IDS in a string

    I'm using LabVIEW to perform a generation analog DAQmx and I call my LabVIEW of CVI code via a dll.  I want to make two separate calls, one to start a task DAQmx and one to stop the task, so I need to either:

    (1) move a task ID DAQmx CVI and then again to LV

    or

    (2) convert a string of the ID for the task, pass it to CVI and then back to LV and then convert back to a task ID in LabVIEW.

    I'm sure that option 2 is the easiest option, but I don't know how to convert back and forth between a string and a task ID DAQmx.  Can anyone help with this?

    Thank you

    Joe

    Nathand is correct, it's pretty easy convert from/to the task DAQMX and String.  The two below

    Hmmmm is note expected or a bug?

    Feedback probably need an expert of DAQmx to answer that - I think it might be related to level DAQmx tasks

  • Channel to channel physical DAQMX

    Hi all

    I have control of the physical DAQMX channel connected to a channel to create DAQMX (digital out).  The channal control will give options for each line, for example, cDAQ1Mod4/port0/4, but I want an option with a set of lines (without having to type in it).  Is it possible to put a range of line such as cDAQ1Mod4/port0 / line0:7 in option?  I don't want to ask the user to have the knowledge to do so.

    In addition, I won't need the user to know what the number of data acquisition and what are the module before running the test.  For example, cDAQ1 is 'tester1' and module4 is "digitial 12V output ' and I want to put these option in the user interface as checkbox, and I built the value of the physical channel in the program to supply DAQMX Create Channel.  How do I do that?

    Use an enum on your front control and write the text you want as the descriptions for channels. On the block diagram, use the integer value of the enum to the index in an array of physical string constants DAQmx.

    Richard

Maybe you are looking for

  • Air iPad 2

    air2 iPad no charging current display on itunes

  • disappearance of storage with Safari el capitan

    I have a macbook air 13 "mid-2011 running version 10.11.4 El Capitan.  It has approximately 17 GB of free space for HARD drive storage. When I run Safari (9.1) and let the system and Safari open my HARD disk gradually drops and finally will be reduce

  • Upgrading processor on Tecra S2-163

    I think about upgrading the processor in my Tecra S2 - 163 and wondering if she can handle the Pentum M 780... I thought that, of what is written in the manual, it would be at least treat the Pentium M 770, is this OK?

  • Search for a compatible graphics card

    Hello I bought a desktop computer (Compaq Presario SR1921IL) in 2006. Configuration: PD-820(2.8GHz), 256 MB of RAM, 160 GB SATA HARD, Combo DVD player, MODEM, FREE DOS drive. It has integrated graphics card Ati Radeaon xpress 200 . Later I upgraded R

  • 2545 HP printer all in one: printing problems.

    Printing device do not at all. According to Hp scan doctor, there were questions wz the print queue and the game port and both have been resolved. However still does not print anything. Could someone who are facing the same problem and found the solu