Share cluster data between 2 timed loops

What is the best and safest way of sharing cluster data between 2 timed loops running. I could use locals, but that is risky, would shared variables work better? All I need to do is modify a couple of datatypes in a cluster that both threads use.
Thanks...

You could go the LVOOP route and create a singleton object. The object can be passed to parallel tasks an dsince it is singleton they will all share the same value. Ue of a DVR inside the object would allow you to have a single copy of the data. Your class would also give you the necessary accessors for reading/writing data.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • How the hell does a person share session data between JSP page and a Servle

    1. How the hell does one share session data between a servlet and a JSP page without using a bean but rather using a normal string variable.
    2. When using session scope to access a bean the application complains about not finding the bean on the specified scope, however when I use an application scope the save the same bean, the application does find it.
    Please help!!!!!!!
    SERVLET:
    HttpSession session = request.getSession(true);
    ServletContext servletContext = session.getServletContext();
    customerID = result.getString("CustomerID");
    userName = result.getString("UserName");
    session.setAttribute("UserName",userName);
    session.setAttribute("CustomerID",customerID);
    System.out.println("Customer UserName = " + session.getAttribute("UserName"));
    response.sendRedirect("/economics/subscriptions/default.jsp");
    JSP PAGE:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root xmlns:jsp=http://java.sun.com/JSP/Page mlns:c="http://java.sun.com/jsp/jstl/core" xmlns:sql="http://java.sun.com/jsp/jstl/sql" version="2.0">
    <jsp:directive.page isThreadSafe="true" session="true" contentType="text/xml"/><jsp:output omit-xml-declaration="false"/><jsp:scriptlet>response.addHeader("x-xslt-nocache", "true");</jsp:scriptlet><pml>
    <page type="web" search="y">
         <pageName>Commercial Banking</pageName>
         <jsp:directive.include file="/economics/header.inc"/>
         <jsp:directive.include file="/login.inc"/>
         <jsp:directive.include file="/economics/leftMenu.inc"/>
         <!--<jsp:useBean id="UserName" type="java.lang.String" scope="session" />-->
         <content>
         <searchSum>Commercial - Main Content</searchSum>
         Value = <c:out value="${request.session.getAttribute("UserName")}"/>
         </content>
         <jsp:directive.include file="/economics/rightNav.inc"/>
         <jsp:directive.include file="/footer.inc"/>
    </page></pml></jsp:root>

    For a start, just "session" instead of "request.session" would work better. But why did you post this here and not in the JSP forum? Doesn't seem to have anything to do with Java programming.

  • How to share the data between two or more frames

    How to share the data between two or more frames based on the database relationship in JDeveloper?

    You can pass data between frames by passing it as parameters.
    That is when you are invoking another frame, pass your data as arguments through the constructor to that frame .
    You can also achieve this through static or public methods, but static variables as we know is not suggested which might occupy more memory space.
    Regards,
    Srinivasan AShwath
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    How to share the data between two or more frames based on the database relationship in JDeveloper? <HR></BLOCKQUOTE>
    null

  • Past data between timed parallel loops

    Hello
    I am working with a piezo-motor system and a test machine.
    -I send a comand every 20 ms to a motor to generate a movement on a strenght test machine.
     I have a timed while loop where I send the comands to the motor. The data I send is a SGL format number.
    -I read the force (with an other device) generated by the motor movement.
     (The device generate internally measures every 20 ms and save it on the device memory. The measures include force data and  time stamp).
     I have a second parallel timed loop where I send a command every 20 ms to read the last data on the device memory
    What I need is to get a measure with the last sended motor position and the force value at that time (synchron) every 20 ms (as accurate as possible). I know its not possible because I am not working with a real time system. What I would like to know is the best way to do it as accurate as possible.
    I am using local variables to get the data from the motor and the force device. I have a third parallel while loop where I read both local variables every 20 ms. The quesions are:
    -Since I cant not use queues or notifiers to pass data between loops because the loops sould be timed loops, witch is the best way to past the data between loops (local variable)?
    -Should I use one of my device loops (motor loop, or force device loop) as a master and get the value there of the other device?
    I cant post my code because the motor and the force device have small subVIs with license. Sorry.
    Thanks

    Navarro_ wrote:
    Hello
    I am working with a piezo-motor system and a test machine.
    -I send a comand every 20 ms to a motor to generate a movement on a strenght test machine.
     I have a timed while loop where I send the comands to the motor. The data I send is a SGL format number.
    -I read the force (with an other device) generated by the motor movement.
     (The device generate internally measures every 20 ms and save it on the device memory. The measures include force data and  time stamp).
     I have a second parallel timed loop where I send a command every 20 ms to read the last data on the device memory
    What I need is to get a measure with the last sended motor position and the force value at that time (synchron) every 20 ms (as accurate as possible). I know its not possible because I am not working with a real time system. What I would like to know is the best way to do it as accurate as possible.
    I am using local variables to get the data from the motor and the force device. I have a third parallel while loop where I read both local variables every 20 ms. The quesions are:
    -Since I cant not use queues or notifiers to pass data between loops because the loops sould be timed loops, witch is the best way to past the data between loops (local variable)?
    -Should I use one of my device loops (motor loop, or force device loop) as a master and get the value there of the other device?
    I cant post my code because the motor and the force device have small subVIs with license. Sorry.
    Thanks
    I'm not sure you need something so accurately timed?  The motor movement isn't going to be instantaneous, so when were you planning on starting the event?  When will the resulting measurement be valid?  I suppose there will be ringing?
    Or maybe the motor movement needs to be continuous and you take measurements at very accurate time intervals.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Share application data between 2 ipads when the app doesn't run on a PC

    Hello - we have (2) iPADs and on both we purchased a landlord software. We want to be able to have the data shared automatically between both iPADS. The application itself does not have an option to do this (whereas applications like "our groceries" allow for dynamic updates of the grocery list between 2 iPADs).
    The application does not have a MAC/PC based software so we can't "remote control" a PC or MAC.
    Are there any 3rd party applications that would take the app data to the cloud so we can share the data? Or - are there any applications that let you remotely access one iPAD from another? This would be a way to share the data.
    Note that synching via iTunes is not really an option as it's just this one app that we want to share.
    Any ideas?

    Frothandpeppy-
    Is there an option to print anything? If so, look there to see if it also includes an option to send data via eMail.
    I suggest you contact the program developer and explain what you are trying to do. It might be easy for them to add a way to transfer the data via eMail, if they don't have a better alternative.
    Fred

  • Share form data between PDFs

    I have a series of 26 PDFs that are all different forms to be filled out during a real estate short sale. Each form is unique but there are several pieces of data that need to be repeadidly entered (i.e. client's name is on every single form normally multiple times.) Is there a way that I can connect the form data between each PDF so that when I fill in the data on one form it auto populates the form of the other PDFs?
    I know how to do this within a single PDF (Just name the different fields the same and it copies the contents of that form box to all of the others) but I was hoping to be able to keep these PDFs seperate as normally only about half of the forms are actually needed.
    Thank you for your help in advance.

    Why don't you store the user's information in an ACCESS database table, and pre-populate the PDF from the datasource using a 3rd party form tool.
    Tools clients will need:
    Internet access
    PDF Reader
    Tools developer will need:
    iText (PHP/JAVA), iTextSharp (.net), or FDFToolkit.net (.net)
    MS Access
    (PHP Editor, Notepad or Visual Studio)
    For more information:
    http://www.fdftoolkit.net/

  • How do I share wifi data between iMac and windows based computer on wifi network?

    I have an unsecured wifi network at home and need to easily share photos between computers>  I have an iMac and a couple window based computer> Is ther an easy way instead of using a thumb drive?

    Since photos are typically large files it will probably be quicker with the thumb drive. The other way is to set up sharing where the files are located and directing the other computers to look there.

  • Share Palm data between 2 users?

    Is it possible for 2 users on the same Mac to share a single Palm desktop data file? I'm able to synch fine for the main account, but when I tried to set up the second account, the Palm desktop software couldn't find the destop data file. I tried both setting the file protections for full access, and also moving the file from my Documents folder to a shared folder. In both cases, when I manually tried to point the Palm software to the data file, I was able to navigate to it, but it was greyed out so I couldn't select it. Also having it search for existing users didn't work either.
    I have just the one Palm device (model Vx), but my wife and I both need to access the address book, calendar, etc. from our separate acconts, and make updates. Thanks for any advice anyone may have.

    Welcome to Apple Discussions.
    This is not possible to do as you envision the process, as you are attempting to cross the barrier which separates users in a multi-user environment while simultaneously trying to share a set of single user applications and data files.
    Instead, consider assigning the responsibility to create the basic contact records you wish to 'share' to one user, and have that user send a copy of the file to the other user via electronic mail. Beyond that point you can either make no changes, make changes individually but not provide these changes to the other user, of have either user who makes a change send a copy of the changed card or cards alone to the other user.
    If you want to 'share' calendaring records, consider creating and publishing individual calendar files which will be read-only to the subscribing user.
    If you had separate Macintosh computers, you could use MySync or .Mac Sync to synchronize the user files on one computer with the other, maintaining identical copies of your contact and calendaring data on each. To do that, however, you need to have two separate Macintosh computers.

  • Want to share application data between Mac's on home network.

    Hello,
    We currently have one iMac at home and I would like to start using separate logins for different family members, but I want to be able to share applications (Mail, Address Book, ICal, iPhoto, etc.) across accounts. Can it be done? I would hate to have to set up all the email account information again or have duplicate copies of the large iPhoto library. Or two separate versions of address book and iCal.
    This issue is also the #1 reason why I hesitate to purchase another iMac or MacBook for our house. I want to be able to be sitting downstairs on the MacBook and access the, for example iCal and not have to run 2 different versions and worry about synching them.
    Any input is appreciated.
    Thanks,
    Brad.

    Hi Brad, OSX is setup to keep all this account info seperate, but on iPhoto for example, you can...
    Move iPhoto libray...
    http://support.apple.com/kb/HT1229
    Might also see Old Toad's posts here...
    http://discussions.apple.com/thread.jspa?threadID=1627454&tstart=150
    And Old Toad's Cellar here...
    http://web.mac.com/toad.hall/ToadsCellar/ToadsCellar.html

  • Share cell data between Numbers documents

    I know that keynote can reference a table from Numbers and remain updated as that table updates. Can the same be done from one Numbers document to another? Can I have say, one commonly accessed table in a document that many other documents would have a path to and access. Or said more simply can seprate Numbers Documents share cell information?
    Thanks

    Hi k,
    I hope you also saw in other threads the recommendation to Provide Numbers Feedback to Apple where there are features you would find it useful to include in future Numbers versions. You'll find Provide Numbers Feedback in the Numbers menu in Numbers '09.
    Regards,
    Barry

  • How to make the exchange of data between 2 while loop in real time

    hello
    I have 2 while loop
    the 1st while loop includes the data acquisition program
    the 2nd while loop includes the control program
    my question is how to make the exchange of data between 2 while loop in real time
    I tried with the local variable and direct wiring between the 2 while loop
    it does not work (there is a delay)
    Solved!
    Go to Solution.

    Bilalus,
    Queues are only good to transfer data if your application isn't deterministic. Since you are using Real Time, I am assuming that your application requires determinism. If you are using Timed Loops and you use queues to transfer data between your loops, you are losing determinism. In this case, you need to use the RT FIFO functions. 
    Warm Regards,
    William Fernandez
    Applications Engineering
    National Instruments

  • Using events (?) to share data between tab pages

    I don't know whether this is an event question or an Object-Oriented design question or a JTabbedPane question.
    I'm pretty new to Java, so be patient!
    I wish to have a JTabbedPane with a tab to do 'Import' of data, and a tab to do 'Export' of data (the SAME data which was imported). Now, how do I share the data between the 2 tabs?
    It seems the data belongs at the JFrame level, but then how does the data in each tab access it? In other languages I would pass a reference to the data object in the window to each tab.
    Or how do I get (or set) the data when the tab changes? And how do I know when the tab changes?
    I think I need to set trigger some sort of event to the parent window, who I suppose has a listener, and then it can then query the appropriate pane? If so, I'm not sure what sort of event trigger I should be using, where etc.
    I know if I had one tab with an import/export functionality then I could declare the Collection within that panel.
    Help!!!
    Thanks ;)

    I think this is an OO design question.
    You basically have two views (the two panes) of the same data. So I'd suggest the Observer pattern (see the Design Patterns book) where one model holds the data and the model is observed by several views.

  • Sharing static data between all WD components

    Hello
    I'm looking for a way to share static data between all WD sessions of a WD application. Static data is static (language depended) value lists for instance. How can this be done in WD for ABAP?
    Is this recommended at all?
    Regards, Mathias

    Hi,
    if these lists are static, you can use z-tables with in the key a 'spras' field.
    do the selection while loading the application with sy-langu on those tables to fetch the language dependant lists
    (example table makt, for material descriptions)
    if you mean you want to share these data between several wda components of 1 application,
    you should use the same assistance class in all of them and fetch the data in the main component to store it in the assistance class.
    this class will be instantiated and all the other components will have access to the data (instance will be recognized automatically as of SP11)
    grtz,
    Koen
    Edited by: Koen Labie on Mar 6, 2008 5:06 PM

  • Synching calendar dates between 2 handhelds

    Computer idiot here.  Sorry if this is a dumb question.  My wife and I each have a Zire 72.  We want to get the calendars on each of them to show the same appointments etc.  We've tried synching them thru the desktop (we have separate user names on the desktop) but that doesn't seem to work.  Have also tried to beam but the handheld says calendar data can't be beamed.  EIther way, we can't seem to make it happen, but I have to think that there must be a way to do this!  Can anyone tell me how it can be done?  Thanx!
    Post relates to: Zire 72

    You should be able to beam the data, sounds like you are trying to beam the calendar database file thats why its saying it can't do this, instead go into the calendar application then select menu and select send event.
    There is also a program called SyncUs this will allow you to share pim data between devices with each device having its own username.
    Post relates to: Centro (Sprint)

  • While loop and data acquisition timing worries

    Hello everyone, 
    I apologize in advance if this is a silly question, but I could not find the answer around here. 
    I have made a VI to record continuously from 64 analog channels at a 5kHz sampling rate. I then stream this data to a tdms file. The data acquisition and write functions are in a while loop. 
    I the same loop, I have a bunch of other loops, that each run on their own wait timers to help limit the amount of memory they take up. I am now worried that this may somehow affect my data acquisition timing.
    If I put a bunch of timed loops within another loop, does the outer loop run at the same pace as the slowest of the inner loops? And could that mess up my sampling rate?
    I have attached my VI, in case what I just wrote makes no sense at all. 
    Thanks for any tips...
    Attachments:
    Record_M8viaDAQv3.vi ‏237 KB

    Well, looking at your code you will only write to your TDMS file one time. You have multiple infinite loops within the main/outer loop. That means that the main loop will only run a single iteration because it cannot complete an iteration until all code within it completes. With at least two infinite loops inside the loop it will never complete. Not too mention the only way to stop your code is to hit the stop/abort button. NOt a very good way to stop your code. As someone once said using the abort to stop your code is like using a tree to stop your car. It will work but not advised.
    As Ben mentioned try to understand data flow better. You have unnecessary sequence frames in your code where normal data flow will control the execution sequence.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Maybe you are looking for

  • Emctl start db console is not getting started

    hi all i trid to open 10g db em in browser vt http://servername:portno/em but it displays page cannot displaed emctl stauts dbconsole is showing oralce Em 10g is not running so i tried emctl start dbconsole from command line then i got message below

  • Convert  Album to Slideshow

    I created an Album with photos and matching music, but I realized I probably should have done this in SlideShow.  Can i convert an album to a "slideshow"  If so, how?

  • Conversion of batch master record

    Dear Sap Experts, How do create conversion of batch masters record. Pls give me Guide lines. Regards, Prabhakar

  • Need Information about IP21 and IHistorian

    I'm need to connect IP21 plc and IHistorian db.But I don't have that much knowledg about these two things.Can I have document or link which provides infomation about IP21 and IHistorian or else any depth explanation about these two. Please provide me

  • CRM Quality mangement

    Hai all, Can anyone send me the best link for CRM quality management either in portal or SDN. I want to know about it. Thanks in advance. Regards.