How to count occurences of a certain string in incoming real-time data? Also displaying RTC data. Current VI included

I use LabView student Express 7 on a Windows XP system.
Time-frame: we are doing final integrations for our balloon experiment today. We just got told that the press wants to view real-time data, which we haven't programmed for. I need help to get a working VI at the latest by 25.02.2004 before 0800(morning) (GMT+1).
Note on license
It is a student balloon flight, and the data will not be used in scientific work, so the I am not breaking any license agreements (I hope).
Problem synopsis:
The balloon continually transmits data at 9600baud. The data is a semi-repeating header followed by a constant lenght data-package arranged like this:
BEXUS[h][m][s]BEXUS[h][m][s]
[Raw binary data, 7channels*8sub-channels*8bits]
What the groundstation is doing right now:
Take all incomming data and save (append) the data to a file without any data-handling. (We figured we would go post-processing).
What I need to change in less than 24 hours:
- Add a "package" counter
- Add a display of the clock data (RTC)
How I planned to implement the changes:
-RTC display:
The RTC data is in BCD format, since that means that if you look at the data as hex numbers, you get the hours and minutes and seconds out in "clear text". That is 12 hours is 0x12hex. I figured that I can do a match pattern BEXUS and pass the "after substring" to another match pattern BEXUS from which I feed the "before substring" to a type-cast VI (casting string to u8) and displaying that, which should give me a display of "123000" for the time 12:30:00... I couldn't get it to work at all when I tried out the supplied "beta" vi.
- Package counter:
Counting how many BEXUS that gets detected and dividing by 2. I don't know how to do this. I've looked on the forum (a good thread on the problem: "how do I count the number of *'s in a string") but these use either loops or arrays... and I'm not sure how this works when I'm getting the data in at realtime. I cant make an array and then count it, since then the array would grow fast and possibly interfere with saving of the data??? Saving the data is critical.. without that file we cant do post-processing.
Since my time is so limited (I'm not even supposed to do the groundstation software but they called on me in the last minute because no-one else had time/wanted too/could do it) I hope that you could make an exception and provide me with working VI's (based on the one I have attached) so that I can show something to the press! (Free comercial for NI!! Since the student version shows the National Instruments water-mark on all VI's!!! Possible TV time!!)
Thanks!
PS: even if you are to late (after 25) post anyway!
Why:
-I can learn from it
-the launch might be delayed due to weather conditions
-others might find it amusing!
Thanks again!
Attachments:
BexusII_groundstation.vi ‏46 KB

I have a valid example data file attached to this thread.
If you open BEXTEST.bin in a hex-editor of your choice, you'll see the BEXUS as 42 45 58 55 53 and then the time as 00 28 09 etc.
I couldn't get Joe Guo's VI to work. It doesn't count packages correctly, and the time is not displayed correctly either.
The file was saved using a straight save to file VI.
The data is from actual launching area tests performed a few mintues ago. The time displayed is "On time" e.g. how long the gondola has been powered up.
I have a spare T-junction, so I can hook into the balloon real-time data as we fly, in case anyone care to see if they can figure out why the latest version of Joe Guo's program is not displaying correctly.
I will monitor this
thread during and after flight to see if anyone can make it in time!
Thanks for the great effort!!
Attachments:
bextest.bin ‏53 KB

Similar Messages

  • How to Integrate real time data between 2 database servers

    How to Integrate real time data between 2 database servers
    May 31, 2006 2:45 AM
    I have a scenario where the data base (DB2 400) is maintained by AS 400 application and my new website application based on j2ee platform access the same database also but the performance is very low. So we have thought of introducing new oracle data base which will be accessed by j2ee application and all the data from db 400 database will be replicate to oracle data base. In that scenario the only problem is of real time data exchange between 2 databases. How do we achieve that considering both the application As400 and j2ee website application are running in parallel and accessing the same information lying on DB2 400 database. We have to look at transaction management also.
    Thanks
    Panky
    DrClap
    Posts:25,835
    Registered: 4/30/99 Re: How to Integrate real time data between 2 database servers
    May 31, 2006 11:16 AM (reply 1 of 2)
    You certainly wouldn't use XML for this.
    The process you're looking for is called "replication". Ask your database experts about it.
    I predict that after you spend all the money to install Oracle and hire consultants to make it replicate the DB2/400 database, your performance problem will be worse.
    panks
    Posts:1
    Registered: 5/31/06 Re: How to Integrate real time data between 2 database servers
    May 31, 2006 11:55 PM (reply 2 of 2)
    Yeajh I now that its not a XML solution.
    Replication is one of the option but AS400 application which uses DB2/400 DB is highly loaded and proposed website also uses the same database for retrieval and updation purpose.All the inventory is maintained in the DB2/400 database so I have thought of introducing new oracle database which will be accessed by new website and it will have all the relevant tables structure along with data from DB2/400 application. Now whenever there is a order placement from new website then first it should update the oracle database and then this data shuold also migrate to db2/400 application at real time so that the main inventory which is lying on db2/400 should be updated on real time basis because order placement is aslo possible from As400 application. So the user from As400 application should not get the wrong data.
    Is it possible to use MQ products??
    -Panky

    Hi,
    the answer to your question is not easy. Synchronization or integration or replication data between 2 (or more) database servers is very complicated task, even though it doesn't look like.
    Firstly I would recommend to create good analysis regarding data flow.
    Important things are:
    1) what is primary side for data creation. In other words on which side - DB2 or Oracle - are primary data (they are created here) and on which side are secondary data (just copies)
    2) on which side are data changed - only in DB2 side or only on Oracle side or on both sides
    3) Are there data which are changed on both side concurrently? If so how should be conflicts solved?
    4) What does it mean "real time"? Is it up to 1 ms or 1s or 1 min or 1 hour?
    5) What should be done when replication will not work? I mean replication crash etc.
    BTW. The word "change" above means INSERT, UPDATE, DELETE commands.
    Analysis should be done for every column in every table. When analysis is ready you can select the best system for your solution (Oracle replication, Sybase replication server, MQ, EJB or your proprietary solution). Without analysis it will be IMHO gunshot into the dark.

  • How to get real time date from Sunny Boy Inverters through SMA Webbox?

    Hello,
    I was looking on how to communicate with three Sunny Boy Inverters that are linked to a SMA webbox. Currently we get a daily summary of the solar production, but we would like to have real time data uploaded into LabVIEW. The people of SMA said that I needed to use "RS485 protocols" with a software they have called YASDI (http://www.sma.de/en/products/software/yasdi.html); however, I keep finding other information that says that I can communicate with my inverters using the SMA OPC server (http://www.sma-america.com/en_US/products/software/sma-opc-server.html). I also found this forum, http://forums.ni.com/t5/LabVIEW/Sunny-Island/m-p/809129/highlight/true#M368718, where I understood that I don't need to use the OPC server, but instead I can use UDP communication to get the data. I found another forum that talks about using the YASDI :http://forums.ni.com/t5/LabVIEW/help-with-Sunny-Boy-inverter/m-p/293273/highlight/true#M153892. 
    I've tried to communicate with the people of the forums and I haven't gotten any responses; therefore, I wanted to see if I can get cleared up on this issue. Do I need to use OPC server to communicate with my inverters through the webbox or can I just use UDP in LabVIEW?
    Any help would be greatly appreciated,
    Thanks
    Jose

    Hello,
    I got a response from Vincezo: http://forums.ni.com/t5/LabVIEW/Sunny-Island/m-p/1794786. I'm currently working with the VI to communicate with the webbox through UDP. Since the PRC protocols to communicate with the webbox are in JavaScript Object Notation (JSON), I'm not sure if the data-in string has to be in JSON format. However, the only error I'm getting is 56 in the UDP read function. I've tried increasing the size of the bytes and timeout, but I keep getting this error. If anyone can help me with this part I would very grateful. 
    Thanks,
    Jose

  • How do I set an email to send at a specific time/date in the future e.g. tomorrow at 9am. I am on an iMACX using apple's version of windows

    how do I set an email to send at a specific time/date in the future e.g. tomorrow at 9am. I am on an iMAC using apple's version of windows

    apple don't have a version of windows
    only microsoft have windows
    as how one automatate windows to send mails at a time
    googled it for you
    http://www.howtogeek.com/125045/how-to-easily-send-emails-from-the-windows-task- scheduler/
    more options in the search
    https://www.google.dk/search?client=opera&q=automatically+send+email+in+windows& sourceid=opera&ie=UTF-8&oe=UTF-8

  • I have iphone5 and now been given Nokia lumia 520 for work. How can I ensure that my calendars all sync in real time between each phone? Many thanks for any advice

    I have iphone5 and now been given Nokia lumia 520 for work. How can I ensure that my calendars all sync in real time between each phone? Many thanks for any advice

    Well if you got the Phone Pggray43 at a Local Corporate store in your Area)  you should be able to return it as long as you have all the contents.!  Phone, Charger and any other accessories that came with it the Box of Course.. As long as you have not went past the 14 Day return.. the store can go over what you used as in Air Time and Data..
    Now if you've went past the 14 Day return you be Liable to pay a E.T.F =  Early Termination Fee the fee for this is around $300 so hopefully you have not went past the 14 Day return window the Manager if Available is the one I would talk to tell them your on Social Security and you just can't afford a phone as this I'm sure they'll work with you to get something solved..
    Hope ya have Good Luck.! b33

  • How to get the real-time data from a CCD camera in labview?

    I am going to setup a monitor system and need to acquire the intensity of each pixel at each second from a CCD camera. Also, I need to to some simple calculations with these real-time data at every moment to get my finanl output in this monitor system.
    How may I do this using Labview?
    Thank you very much.
    Kai

    We don't have special powers, so we can't guess if you have Imaq Vision or not, if your camera comes with a LabVIEW driver, if it has an USB interface, or firewire, or a dedicated NI card, if you just want to detect a move, or a change in intensity, etc...
    So, try to be more specific with your question, that will helps a lot  
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to identify the Stanadard Extractor  will support for Real time Data

    How to identify the Stanadard Extractor  will support for Real time Data  Acquisation . Enabled

    Hi
    In the ROOSOURCE table you can find the extract structures, go through all the fields of the extractor and if you find all of your equired fields exist ok else try to enhance for teh needed fields and go with user exit to populate the data for that fields'

  • How to create a c++ shared library (.so) for linux real time (for myRio) with Eclipse to use in LabView?

    I tried already these Tutorials and Advices but I didn't find a solution:
    - http://www.ni.com/tutorial/14625/en/
    - http://www.ni.com/tutorial/14690/en/
    - http://forums.ni.com/t5/LabVIEW/Shared-Library-on-myrio-Linux-Real-time-system/m-p/2842540/
    - http://forums.ni.com/t5/LabVIEW/How-to-create-shared-library-for-linux-real-time-target-in/m-p/28218...
    - and some more
    I want use c++ codes on linux real time. For testing reasons I want to have a function that adds 2 values and gives the result.
    I've done these steps:
    1. writing a c++ file in Eclipse (see screensot 2)
    2. building a shared library (.so) from my c++ project in Eclipse (with Cross GCC)
    3. putting this file on myRio (path: /usr/local/lib/)
    4. creating a VI that calls this library from Labview with a "Call Library Function Node" (see screenshot3)
    5. Setting the properties for the "Call Library Function Node" (see screenshots 4-7)
    After I run this VI i get this error message: LabVIEW:  (Hex 0x627) The function name for the ... node cannot be found in the library. To correct this error, right-click the Call Library Function Node and select Configure from the shortcut menu. Then choose the correct function name. (see screenshot1)
    I've tried a lot things to solve this problem but I couldn't find a solution. Would be very happy if anyone can help me. I guess that I have to edit my c++ code to export my function (symbol). But I have no idea how to make it. I also tried it with a dll file in the same folder but it didn't help.
    Perhaps someone can send an example which works on myRIO.
    Thanks!
    screenshot1
    screenshot2
    screenshot3
    screenshot4
    screenshot5
    screenshot6
    screenshot7

     can see it in the screenshot8 there is a function called "_Z8AddierenddPd" instead of "Addieren". I copied this name to Labview (see screenshot9) and it worked.
    I'm sure that there is a way to compile the shared folder with gcc without decorations (mangling). But I don't know how. If someone has a recommendation I would be very glad!
    Prepend each function declaration that you want to be available without name decoration with
    extern "C" <your function declaration>
    Or if you have multiple functions you want to export you can in the header file where you declare your functions simply use:
    #ifdef __cplusplus
    extern "C" {
    #endif
    <all your function declarations>
    #ifdef __cplusplus
    #endif
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Does anyone know of a VI or how to go about writing one that will prevent the computers time/date from being disabled while an application is running.

    Does anyone know of a VI or how to go about writing one that will prevent the computers clock/time from being disabled while an application is running. The time and date can normally be reset while an application is running by clicking on the time/date in the lower right-hand corner of the computer screen. I have an application that runs over several days and it is critical that the time and date of the computer not be changed. Is there an easy way to lock this out from the user? Note that I am what I consider an advanced beginner in LV.
    Thank you,
    Chuck
    Solved!
    Go to Solution.

    That is not something you can do from LabVIEW, as it is an operating system operation, and it will depend on the operating system that you're using. On Windows you can use a group policy to control this. Please Google on "prevent time and date change in windows".
    Also, please try to refrain from stuffing your entire message in the subject block. Keep the subject short, but descriptive enough so it can be understood what you are basically asking. Thanks.

  • How to calculate rms voltage, rms current and frequency from real time data?

    Hello,
    I need to calculate the real time rms voltage, rms current and frequency of the received voltage and current graphs using visa read. Actually am trying to monitor the voltage and current parameters of AC load, in this case, am using a set of 4 light bulbs at the moment. Expected frequency is 50 Hz, and rms voltage close to 240v AC, current about 1A. 
    Attached is the vi picture of what I have been able to achieve so far, courtesy of labview forums. But I need to finally finish this vi by calculating the Vrms, Irms and frequecy. The front panel shows the voltage (Chart V) and current (Chart I) after scaling. Chart VI represents ADC value 0 ~ 1023 of received data. Aray V & I show the binary bits received up to 10 bits of useful data from ADC. Each sine wave from ADC is sampled at 25 samples for the ADC conversion, and sampling frequency of 1.28kH.
    I have tried using the RMS vi, but seems I don't know how to configure it correctly to get desired results. Also when I make changes like switching of one of the bulbs so that their is current change, I need to refresh the SERIAL port first before changes show up on the VI. Any ideas on how to improve on this are highly appreciated.
    Otherwise, I would appreciate if somebody helps me MODIFY my VI to read the rms values and frequency from received data. This is the last piece of my project, I do appreciate all the help rendered. Am currently using labview labview 2014, student version!
    Gavin.
    Attachments:
    Test_revised1.vi ‏39 KB
    Test_frontpanel.png ‏196 KB
    Test_blockdiagram.png ‏187 KB

    hello,
    note that peak voltage (Vpeak) is (240 * 1.414) = 399 V and peak current about 1.414 if intended rms current is 1A.
    Gavin.

  • How to plot cross-corr​elation in terms of the real time?

    Usually the cross-correlation or the auto-correlation results are plotted vs. the lag(tao). But how can I plot it vs. the real time of the input signal? I have two same length input signals having same input time.

    I am using LabView 7Express. What I use is the "convolution and correlation" VI, without the 'Express' however ... I mean, if both my input signals are L-length, the result of the correlation will be 2L-length, i.e. the length is doubled. But I want to keep the original signal size, making the result L-length as well, and have the same time origin as the input signals. I mean, if my input signals are from 0-1 second, I also expect to see the cross-correlaton is within 0-1 second, having the same data points. Thanks a lot!

  • How do I talk to 1-Wire devices with LabVIEW Real-Time?

    Hello, I'm trying to use LabVIEW Real-Time to talk to some older 1-Wire devices that my company has previously communicated with using C code.  We are currently developing on a cRIO and are trying to use a Dallas Semiconductor 2480 serial port device to talk to some iButtons and a secure SHA 1-Wire device.  I have run into a few problems where the 1-Wire device stops communicating and just repeats the data sent to it.  I was wondering if anyone has successfully created any VI's to talk with 1-Wire devices via the serial port that do NOT use any kind of Java or .NET or Windows based device drivers supplied by Dallas Semi.  A last resort would be that we keep the C code and place it in a block in LabVIEW and run it as is but I would prefer to have some LabVIEW-native code.  Any help would be greatly appreciated.  Thanks.

    Brian_T,
        Thanks for that link about compiling a shared library for use on a VxWorks cRIO.  The only thing they mention that I don't understand is this bit:
    "GNU toolchain distributed with Wind River VxWorks"
    I have been unable to locate a compiler for VxWorks so I am assuming that is located in this GNU toolchain thing?  Does that come with the cRIO?  I think I noticed a VxWorks C compiler somewhere else online but we're talking a totally different product I would have to purchase, assuming it would even work.  I guess once the stub and the shared library are all good to go, I just call the C functions in the shared library and when it comes time to talk to the serial port, just slap a VISA Read/Write VI on the block diagram.  I've been using a cRIO and COM1 access for some time now so I do understand at least that much.  Let me know how to get ahold of this "toolchain" thing.  Thanks.

  • Error 5 on Start up (Windows Error 7) - why and how do I overcome it? Have removed and reloaded several times and also tried repairing, but to no avail.

    I am experiencing Error 5 on Start up (Windows Error 7) - why and how do I overcome it?  I have removed iTunes and reloaded it several times and also tried repairing, but to no avail.

    apandua2105
    To properly uninstall iTunes for Windows see this link:
    http://support.apple.com/kb/HT1923
    After redownload iTunes from Apple and reinstall:
    http://www.apple.com/itunes/download/

  • How to stop a thread in java 5 for a real-time system??

    Hi,
    In Java 5, thread.stop is deprecated. We need to modify some variable to indicate that the target thread should stop running. "The target thread should check this variable regularly........"
    We are currently developing a simple real-time operating system using the basic features of java. It is running on top of SunSPOT (JAVA5). My question is I need to stop a thread in a scheduler loop of a real-time operating system. We cannot check it regularly. Otherwise it is not a real-time operating system.Is there anyway else to do this?
    Thanks,
    Qing

    That's rather hard to answer. You say you are writing in Java, but you're writing an OS. BUt what's executing the Java - you need a VM of some form. Is that a real-time or non-real-time VM? How it does things ultimately controls how effectively you can do what you are trying to do.
    The simple answer is that Thread.stop() is deprecated and that it will not stop a thread in all situations anyway - eg trying to acquire a monitor lock. But all Thread.stop does is make an exception pending on the thread, and as the thread executes it polls to see if there is an exception pending. When this happens depends on the VM: it might be after every bytecode; it might be when the thread transitions states (eg thread-in-java, thread-in-vm, thread-in-native) - it all depends. But it is polling - just the same as checking that variable - it's just implicit in the VM rather than explicitly in your code.**
    The RTSJ adds a new form of asynchronous termination requests through the AsynchronouslyInterruptedException (AIE). But it only affects code that explicitly declares that it expects AIE to occur, and there are also deferred sections where the AIE will remain pending. Writing code that can handle AIE is very difficult because the normal Java rules are "bent" and finally blocks do not get executed inside AIE-enabled code.
    So as I said this is very hard to answer, it really depends what exactly you are running on and what you are trying to achieve.
    ** Note: some people used bytecode rewriting tools to add this kind of polling as a post-processing step. Perhaps that is something you might be able to do too.
    David Holmes

  • Count occurence of words in string

    hi guys. i need some help.
    my problem is. i have a string, and want to know how many times each word appears in it, and print out only the word that appear more than 2 times.
    has any one an idea of how this is possible?

    There are many solutions, but here is the outline of one possible method.
    1) Split your string in words with the StringTokenizer class
    2) Create a HashMap
    3) look up your word in the hash map
    4a) If the word is not in the hashmap, create a new entry in the HashMap, where the key is your word from the original string, and the Value is (new Integer(1))
    4b) if the word is already in the hashmap, get the value from the hashmap, add one to it, then put the new Integer value in the hashmap
    5) for each value in the hashmap, print out the key , if the value is an Integer > 1
    With any luck, that will help you

Maybe you are looking for