Unflatten data using only the output from flatten to string

Using the Unflatten from String vi requires that you provide the type. This is not always possible - you may not know it (or you have a number to choose from). In a situation where the original data is flattened, then the Type String & Data string are clustered & flattened again, you have a common structure no matter what the source data. Unflattening will return the Type & Data strings of the original data, however I have seen no vi anywhere that either converts Type String to Type, or Unflattens data given only the Type & Data strings. How is either of these done?
Attachments:
Type_conversion.vi ‏48 KB

You are asking too much from LabVIEW or any compiler for that matter. When the the datatype is unknown or undefined at compile time, it can't change the code to adapt to the incoming data. That is the programmer's job to do this and provide code to detect the incoming datatype and branch to appropriate routine to handle each datatype after it has been cast to a known type.
The compiler has to know the datatype before generating the code. Can you imagine executing your diagram in debug mode and see the wire change type from one iteration to the other as the incoming data changes type? That's the programmer that knows what datatypes are to be expected.
The original poster suggested to bundle typestring and flat data: you essentialy have
a structure similar to a variant. If you want to use undefined datatype, you should use variants instead of flattened strings since it includes the datatype. See my presentation on OpenG.org http://openg.org/tiki/tiki-index.php?page=2003-05-06+Group+Meeting
to see how to manipulate variant data at run-time.
LabVIEW, C'est LabVIEW

Similar Messages

  • What is the best way to run two programs simulataneously using the output from one to run the other?

    I just kind of wanted to get an opinion from some people on here. I have two main VIs. The first is a DAQ system that reads 99 different sensors and feeds that data into an array. The second is a real-time processing system that is designed to take the array and do numerous calculations. Both VIs output data to the front panel that I want to see, so I don't want to just use one as a SubVI.
    Is there a simple way to run both VIs, using the output from the DAQ system to feed the processor so that you can easily see the front panels of both VIs? I had considered just copying the real-time processor code into the DAQ VI, but I'm worried the resultant VI will be very large and unsightly.
    On a side note, am I over thinking this? Excuse me if this is a rather dumb question, it's been a long week...aaaand it's Wednesday.
    Solved!
    Go to Solution.

    There are a number of ways that you can go about this, but having both front panels open isn't a problem (assuming there is screen space!). Both could be sub-vi's of another "calling" vi, with their front panels set to open when called. The data from the DAQ side can be sent to the other through a number of ways, "producer-consumer" (many threads about this topic, examples in the LabVIEW examples, etc.) is one of the more robust techniques. If created correctly it allows one to run at a different rate than the other, although if the producer is "producing" much faster than the consumer can "consume" it will end up with problems.
    I guess I type too slowly
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • I have registered on my PC two devices iPhone 5 and iPod Touch 4 now I am using only the iPhone 5. I have two different apple ID`s and yesterday I have FB update and from app store wanted to sign in with the ID form iPod Touch 4 how to fix it?

    I have registered on my PC two devices iPhone 5 and iPod Touch 4 now I am using only the iPhone 5. I have two different apple ID`s and yesterday I have FB update and from app store wanted to sign in with the ID form iPod Touch 4 how to fix it? I want to use my current Apple ID not the old one. Regards!

    Try this
    http://support.apple.com/kb/ht1495
    Hope it helps.

  • Getting the output from a Perl script using Runtime.exec

    I cannot get the output from a perl script using Java. Can someone PLEASE help?
    I used the following code:
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    InputSream in = p.getInputStream();
    b...
    do
    System.out.println(b);
    while ((b = in.read()) > 0)
    But there is no way that I get the output in the inputstream. If I use the command "cmd script.pl", the output is displayed in the Dos box, but also not in the inputstream.
    I will appreciate any help.

    Try this
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    BufferedReader rd = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String str;
    while((str=rd.readLine())!=null){
    System.out.println(str);
    Manu

  • How can I select properties from dropdown lists using only the keyboard?

    Hi,
    I am using SAP Netweaver Studio and when modifying UI elements in views, I want to select the value for a property from the corresponding dropdown list in the Properties view using only the keyboard.
    When a property row is selected, "Enter" toggles to Edit mode, Alt+ArrowDown expands the list, but ArrowUp or ArrowDown directly selects the previous/next item list and changes to Selected mode.  Which key is used to navigate between the list items without selecting them immediately?
    Thanks a lot. I deal with lots of views and this would save me quite a few massage hours
    Maria
    Edited by: Maria Marinova on Feb 14, 2008 9:40 AM
    Edited by: Maria Marinova on Feb 14, 2008 9:40 AM

    Thanks Andrew. When creating an external table does it requires an access to SQL*Loader?
    CREATE TABLE dept_external (
       deptno     NUMBER(6),
       dname      VARCHAR2(20),
       loc        VARCHAR2(25)
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY admin
    ACCESS PARAMETERS
    RECORDS DELIMITED BY newline
    BADFILE 'ulcase1.bad'
    DISCARDFILE 'ulcase1.dis'
    LOGFILE 'ulcase1.log'
    SKIP 20
    FIELDS TERMINATED BY ","  OPTIONALLY ENCLOSED BY '"'
    deptno     INTEGER EXTERNAL(6),
    dname      CHAR(20),
    loc        CHAR(25)
    LOCATION ('ulcase1.ctl')
    REJECT LIMIT UNLIMITED;

  • ADDING A DATE FIELD IN THE OUTPUT SCREEN OF Tcode FBL1N

    Hi guys..I want to add a From-->To 'DATE' field in the output screen of Tcode 'FBL1N' in the line items header part....Please tell me how to do this..??

    Hi,
    Unfortunately you can't add these fileds using with Settings>Layouts>Current header rows, you can only add the field Open items as on date.
    Rgds
    Murali. N

  • Does anyone know how to convert the output from the standard report to xml?

    Does anyone know how to convert the output from the standard SAP report to xml?

    since it a standard report which you cannot modify you can only do the following.
    submit report exporting list to memory
    then
    list from memory and then
    use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
    but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list .

  • Is it Possible to upload the output from Oracle reports To Access database

    Hi All,
    Wish you All a Very Happy New Year.
    I have a query.Is it possible to
    upload the output from the Oracle reports
    to the Access database???
    Any suggestions would be appreciated.
    TIA
    sg

    Hi sg,
    Research the DDE option.
    Dynamic Data Exchange (DDE) is a mechanism by which applications can communicate and exchange data in Windows.
    I have imported data into the excel spreadsheet using DDE built in functions. I am sure it can work with MS Acess as well. If not, then you need to create a 2 step process .. reports -> excel -> access.

  • Openshot + Blender: No frame was found in the Output from Blender

    Can't get this to work. Anyone know why?
    Using  OpenShot version 1.4.0
    blender -v
    Blender 2.61 (sub 0)
    build date: 2012-01-05
    build time: 10:31:02
    build revision: unknown
    build platform: Linux
    build type: Release
    build c flags: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wcast-align -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type -Wstrict-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wno-error=unused-but-set-variable
    build c++ flags: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -D__STDC_CONSTANT_MACROS -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wno-invalid-offsetof -Wno-sign-compare
    build link flags: -pthread
    build system: CMake
    Blender command: blender -b '/usr/lib/python2.7/site-packages/openshot/blender/blend/blur.blend' -P '/home/user/.openshot/blender/fdd1c574-44dd-11e1-bf0d-54e6fc88c972/blur.py'
    Traceback (most recent call last):
    File "/home/user/.openshot/blender/fdd1c574-44dd-11e1-bf0d-54e6fc88c972/blur.py", line 150, in <module>
    bpy.context.scene.render.file_format = params["file_format"]
    AttributeError: 'RenderSettings' object has no attribute 'file_format'
    No frame was found in the output from Blender
    Blender render thread finished
    Last edited by whoops (2012-01-22 09:47:37)

    yes, that is correct that it crashes with the new code when i have both made it a separate library function node and when i incorporated it into an existing code.  the odd thing is that it actually seems to work now.  i believe that i was using the wrong environment to call the new codes, which is why whenever i tried to revert to the original code previously, it still crashed.  it seems that in order to be called, i need to use Deployment rather than Development and ppc instead of i386 in the active configuration and architecture in Xcode, respectively.  while playing around with the iphone app, it must have reset my defaults to a non-labview friendly form.  so now that i've got that part of the code working, i need to find out why it's still crashing on me.  at first, i thought it must be the random number generator, but testing that separately in the code works just fine, so there must be something internal in the code.  probably a memory allocation fault.  but now that i can actually get everything running once more, i should be able to sort that issue out myself.
    thank you very much for the help.  sorry i didn't actually have anything to fix, unfortunately.  i'm going to spend some time trying to debug this section of code to find where the fault lays.  i may come back if i cannot find it in there, but hopefully it will not come to that.
    take care and many thanks,
    justin 

  • How can i order more copies of a iPhoto book using only the order number

    how can i order more copies of an  iPhoto book I made
    by  using only the order number
    as I deleted by mistake a copy of it on my iphoto

    I know the horse is out of the barn but this tutorial might be of help for future books: iP12 - Archiving an iPhoto 9 (11) Book for Editing and/or Ordering at a Later Date.
    If you're starting over from scratch with a book I suggest you create a new library just for that book. Put the photos you want in the book in an album in your current library and use the paid version of  iPhoto Library Manager to copy that album into the book library.
    This will keep the book library small for easy saving to CD or DVD or to an EHD.  If you delete photos from your full library it won't affect the book library.
    Happy Holidays

  • What is the proper interpretation of the output from PID vi?

    Can someone clarify the meaning of the output from the NI PID vi's? From the documentation for the PID control toolkit, it appears that the output is an absolute quantity and not a delta (change) to the previous output. The problem I have is that if I am running proportional control only, and the controller is moving into a steady cooling air flow rate to achieve my setpoint temperature, the error goes to zero and the output from the controller drops to zero. This completely ruins the temperature control.
    Simply: assume that the output to the control valve I am using needs 12mA (4-20mA controlled) constant value (flow rate) to maintain my setpoint. When the error goes to zero, the controller output goes to zero. This, of course, leads to terrible oscillation etc.
    Other PID implementations I have used are all delta (change) based. In other words, you calculate a P, I, and D correction to the previous output.
    What am I missing? All of the NI labview PID examples use the output directly to drive I/O, and never use it as a change (delta).
    I read this newsgroup's archives and found a similar question, but the answer was not helpful.
    thanks much in advance!

    Hi Darth,
    You have read the documentation correctly. The output of the PID VI is an absolute value. If you are using a P algorithm then you will need to use the PID Output Rate Limiter VI to control the rate of the oscillation. Your other option is to use a PID algorithm rather than just the P algorithm. The I and D portion of the PID algorithm are based on the current and previous error and output respectively. For further information on how the PID output is calculated please reference chapter 2 of the LabVIEW PID Control Toolset User Manual
    Hope this helps!
    Brooks W.
    National Instruments

  • While recording a guitar do not record the output from other tracks

    Hi all,
    I'm an audition/recording newbie. I have Audition CC. I have recorded one guitar track. and now I'd like to record another one. The problem is that when I try to record it the output from the other one gets recorded as well. I do want to hear the output from the first track while recording track 2 but I want only to record my guitar playing in track 2.
    Thank you.

    The basic problem here is not actually caused by Audition, but by your sound device mixer, which appears to be letting you record everything you hear - so that will be the guitar part you are playing, and also the replayed tracks that you've already recorded. In Windows, the fix for this is generally to make sure that the recording source is set to be just the input you are using, and not 'what you hear' or whatever it is on your device. The playback part of the mixer should let you monitor both the wav playback and your source, which is what you need to be doing - it's only the record settings you need to look at.
    If you are using a Mac though, I can't help you because I don't know anything about how they work from that POV, but I'd imagine that it must be similar.

  • Can't use only the external monitor, leaving macbook open on Lion

    HW
    macbook pro 15-inch, Early 2011
    external samsung monitor, attached using HDMI to Thunderbolth adaptor
    Previous Situation
    With Snow Leopard I was able to keep the macbook screen open but turned off and use only the external monitor. This way I was able to use the front camera to make conference having everything only in the external monitor.
    Current Situation
    With Lion as soon as I open the macbook monitor the image splits between the two monitors and I'm not able to set the extenal one as only one.

    Support today quoted Apple's engineers as saying it is "expected behaviour" under Lion for the MBP's internal display to reactivate upon opening the lid, even if you want to use only your external display. A new version of the clamshell mode-related knowledgebase article (replacing HT3131) is due shortly confirming this.
    This is despite:
    - the obvious temperature-related benefits that were achievable (under Snow Leopard) by opening your MBP lid whilst continuing to output solely to, say, a 27" cinema display
    - potential wifi connectivity benefits of having the lid open
    - the waste of energy and inefficient use of graphics processing power in needlessly running two active screens (ie if running your MBP in clamshell mode would otherwise make it too hot and/or noisy or you need it open for wifi)
    - the negative longer-term impact on the battery and other components from running the MBP any hotter than it needs to be.
    To have any hope of getting the previous behaviour back, we need to lobby Apple to change how Lion handles clamshell mode. Options available to them include changing Lion's expected behaviour or adding a user-selectable option within System Preferences.
    If you haven't already submitted feedback, please do so below. Now the situation has been clarified as intentional, user feedback has become all the more important.
    http://www.apple.com/feedback/macosx.html

  • Reading the output from another program.

    I haven't used Java in a good long while so I need someone to point me in the right direction. I have a C program that I call from a command line (windoze boxen) and it spits out some neat data. I can call it from inside a Java program, but how do I then read the output from the calling Java program? I'd just alter the C program, but I lost the source.

    This article explains how to correctly execute another program from your
    Java program, and read its output:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Reading the output from a object running in the local machine.

    Reading the output from a object running in the local machine.
    By using a signed applet i am lunching a small application that returns an image object, how to read that without storing it in the hard disk.
    Which means i need to read the image object return by the local application using applet or jsp .
    i am using tomacat and an html page with an applet with it to lunch the application.

    You can write that image in a binary format using OutputStream for System.out and then read it in your applet.

Maybe you are looking for

  • Open link in new window

    Is there any way to get a link to one of my own files (or pages) to open in a new window the same way that external links can? I tried using the url as an "external link" but iWeb wasn't fooled.

  • How can i restore old backup without deleting my existing data

    how can i restore old backup without deleting my existing data. unfortunately i have deleted few of my old photos and restored them from my old backup. i got the deleted photos but lost my recent data and photos. how can i get those too.

  • App for air printing for hp 4500 all in one

    Is there an app for printing from ipad2 to a office jet 4500? I know that there is one for an e4500

  • Adding a new field in web ui at item level in sales order

    While creating the sales order in WEBUI,we select a product at the item level. Once the product is selected into the line item, the vendor associated with the product should be determined and displayed in the custom column field(vendor)  for that lin

  • Time limit Exceeded problem

    Hi , I have a file to idoc scenario . I have a file which generates many idocs (size atmost 5 mb) I am aware sap recommends to limit the message the file size to atmost 5mb. Do they mean file size of the payload ...because size increases in xi also .