How do you separate UDP data streams

Hi.  I'm currently using LabVIEW 2013  to read in a UDP data stream (packet) that contains various parameters.  I am successful in receiving the UDP packet using the UDP Open and UDP Read vi.  On the data out of the UDP Read I have it running into the "Unflatten to String" function and the type I have created a cluster containing 32-bit floating point (Single Precision in LabVIEW) numeric constant, since that is the type of data I am receiving.  To be able to separate the different parameters coming in, I have created the same number of numeric constants blocks to equal the number of parameters.  Is there an easier way to separate the data from the UDP data out so that I don't have to create so many numeric constants to represent the same number of data I have coming in?  Sometimes we will way more than what is listed below.
Any help will be appreciated.  Thank you in advanced
Attachments:
Example layout (Not actual).vi ‏11 KB

If all the data is the same type, then you can wire an array as the datatype instead of a cluster. Set the "data includes array or string size" input to False (the default is True). The output will be an array, and you can index out the values you want.

Similar Messages

  • How do you separate global data running in different threads of TestStand

    I have created a DLL which I want to call from multiple threads of TestStand. I also need to have some global data that is local to each thread. VC++ allows me to use the declaration:
    __declspec(thread) int foo
    to create "Thread Local Storage"
    (ie global data that is local in the each thread -- not shared between threads).
    This works fine from a VC++ application, but when I try to access data declared with this from Test Stand I get the following error.
    Win32error code 998 - Invalid access to memory location
    This occurs when I try to set a variable declared using this convention in my DllMain function.
    I get a -17502; System Level Exception when I access it from a function that I call in the DL
    L.

    Russell -
    I found the following comment in Microsoft's MSDN and I know that TestStand dynamically loads DLLs:
    If a DLL declares any nonlocal data or object as __declspec( thread ), it can cause a protection fault if dynamically loaded. After the DLL is loaded withLoadLibrary, it causes system failure whenever the code references the nonlocal __declspec( thread ) data. Because the global variable space for a thread is allocated at run time, the size of this space is based on a calculation of the requirements of the application plus the requirements of all of the DLLs that are statically linked. When you use LoadLibrary, there is no way to extend this space to allow for the thread local variables declared with __declspec( thread ). Use the TLS APIs, such as
    TlsAlloc, in your DLL to allocate TLS if the DLL might be loaded with LoadLibrary.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • HT1277 how do you eliminate a message stream so each email will be separate and not a continuation?

    How do you eliminate a message stream so an email response will be separted from related emails?

    Mail Preferences/Composing. Check (or uncheck) the appropriate boxes under 'Responding'.

  • How do you separate the iCloud on two iPads that use the same Apple ID

    How do you separate iCloud accounts for people using the same Apple ID

    You can share an AppleID between individuals for purchases from iTunes (music, movies, TV shows, books, etc.) while each having an individual iCloud account for syncing your personal calendar, contacts and iCloud files.
    In my household......
    We have a single AppleID for iTunes purchases which is used on all 8 of our iOS devics and 3 computers. That way all apps purchased from the Mac or iOS app stores or content from iTunes can be used on any device.
    Each of us (3 of us) then has our own iCloud account. None of our iCloud accounts are the same as the AppleID. The iCloud accounts are used for device backups, contact and calendar syncing, iCloud document files and photostream.
    This way, we all share apps and media, but our contacts and calendars are not mixed and neither are our documents. Each person having their own iCloud account also helps with space when dealing with device backups.

  • HT5538 How do you separate multiple iOS devices using the same apple id account for Face Time calls and iMessaging?

    How do you separate multiiple ios devices using the same apple id account for Face Time calls and iMessaging?

    The only way I have seen is to have each device use a if fervent email account, if they all are on the same email the FaceTime connection is either to a phone number or to an email address.  If they ar all on the same email, it is up to the user to decide which to use.

  • How do you transfer the data from your Ipad to a new pc?

    How do you transfer the data from your Ipad to a new pc?

    Sync with new computer
    http://discussions.apple.com/docs/DOC-3141

  • How do you separate corrupt files from good files on a external hard drive importing them to my macbook pro

    how do you separate corrupt files from good files on a external hard drive importing them to your macbook pro

    You open them one at a time into thier respective programs and see if they are good or not and then send the bad ones to the Trash and the good ones to the appropriate folder.

  • How do you change the date of the photo?

    How do you change the date of the photo? 

    Photos Men -> Adjust Date and Time
    Regards
    TD

  • How do you merge the data of two MIDI regions?

    How do you merge the data of two MIDI regions into one MIDI region without using copy and paste functions in the piano roll editor?

    Sorry - didn't make myself clear. The glue tool would be no good here. I meant that I wanted, for example, to merge the MIDI contents of two regions that are perhaps on different tracks but play back at the same time, i.e. I want to add the 2nd region's MIDI to the 1st region's MIDI, but without having to go into the piano roll editor and cut and paste the data.

  • How do you separate tracks using Creative Wave Studi

    Hi , having transferred my analogue music onto the "timeline" how do you separate it into individual tracks ? Any help appreciated !

    How do I get the itunes library that has all of there songs/apps transferred to their itunes library then?

  • How do you change the dates on your iphoto pictures?

    How do you change the dates on your iphoto pictures?

    You'd need an app that can edit EXIF data. You can't do that natively on an iPhone but there may be apps in the App Store that will let you do it. Take a look at Snapseed. I think it might.

  • HT201250 how do you restore iCal data in Snowleopard?

    how do you restore iCal data in Snowleopard, as was it was wiped during sync update?
    Where is the file? Can it be restored using time machine?

    wrince wrote:
    Where is
    <~/Library/Calendars>
    Can it be restored using time machine?
    Yes.

  • How do you connect to photo stream on the Mac Pro?  When I sign onto iCloud there's no option for it.

    How do you connect to photo stream on the Mac Pro?  When I sign onto iCloud there's no option for it.

    You set it up in iPhoto or Aperture on your Mac or in Settings on an iOS device. Please see
    http://help.apple.com/icloud/#/mmf1896412ec

  • How do you make your data into a chart?

    How do you make your data into a chart?

    Dick,
    Your table should look like this:
    You're looking at 1 Header Row and 1 Header Column. Headers are shaded by default. Adding a shading to a regular column doesn't make it a header. Use the Table Inspector.
    When you Select the data and Insert a Table, you will get this:
    Got it?
    Jerry

  • How to efficiently log multiple data streams with TDMS

    Ok, first off, I'll admit I am completely clueless when it comes to logging, TDMS in particular.  That said, I'm trying to work out the best way to log some data from an existing LabVIEW-based control system, so that users can later access that data in the event of catastrophic failure or other situations where they might want to see exactly what happened during a particular run.
    I've got a total of between 6 and 12 data points that need to be stored (depending on how many sensors are on the system).  These are values being read from a cRIO control system.  They can all be set to Single data type, if necessary - even the one Boolean value I'm tracking is already being put through the "convert to 0,1" for graph display purposes.  The data is currently read at 100ms intervals for display, but I will be toying with the rate that I want to dump data to the disk - a little loss is OK, just need general trending for long term history.  I need to keep file sizes manageable, but informative enough to be useful later.
    So, I am looking for advice on the best way to set this up.  It will need to be a file that can be concurrently be read as it is being written, when necessary - one of the reasons I am looking at TDMS in the first place (it was recommended to me previously).  I also need an accurate Date/Time stamp that can be used when displaying the data graphically on a chart, so they can sync up with the external camera recordings to correlate just what happened and when.
    Are there specific pitfalls I should watch for?  Should I bundle all of the data points into an array for each storage tick, then decimate the array on the other end when reading?  I've dug through many of the examples, even found a few covering manual timestamp writing, but is there a preferred method that keeps file size minimized (or extraction simplified)?
    I definitely appreciate any help...  It's easy to get overwhelmed and confused in all of the various methods I am finding for handling TDMS files, and determining which method is right for me.

    I need to bump this topic again...  I'll be honest, the TDMS examples and available help are completely letting me down here.
    As I stated, I have up to 12 data values that I need to stream into a log file, so TDMS was suggested to me.  The fact that I can concurrently read a file being written to was a prime reason I chose this format.  And, "it's super easy" as I was told...
    Here's the problem.  I have multiple data streams.  Streams that are not waveform data, but actual realtime data feedback from a control system, that is being read from a cRIO control system into a host computer (which is where I want to log the data).  I also need to log an accurate timestamp with this data.  This data will be streamed to a log file in a loop that consistently writes a data set every 200ms (that may change, not exactly sure on the timing yet).
    Every worthwhile example that I've found has assumed I'm just logging a single waveform, and the data formatting is totally different from what I need.  I've been flailing around with the code, trying to find a correct structure to write my data (put it all in an array, write individual points, etc) and it is, quite honestly, giving me a headache.  And finding the correct way for applying the correct timestamp (accurate data and time the data was collected) is so uncharacteristically obtuse and hard to track down...  This isn't even counting how to read the data back out of the file to display for later evaluation and/or troubleshooting...  Augh!
    It's very disheartening when a colleague can throw everthing I'm trying to do together in 12 minutes in the very limited SCADA user interface program he uses to monitor his PLCs...  Yet LabVIEW, the superior program I always brag about, is slowly driving me insane trying to do what seems like a relatively simple task like logging...
    So, does anyone have any actual useful examples of logging multiple DIFFERENT data points (not waveforms) and timestamps into a TDMS file?  Or real suggestions for how to accomplish it, other than "go look at the examples" which I have done (and redone).  Unless, of course, you have an actual relevant example that won't bring up more questions than it answers for me, in which case I say "bring it on!"
    Thanks for any help...  My poor overworked brain will be eternally grateful.

Maybe you are looking for