Synchronous AI, AO and DI

Hello LabVIEW community - I am have some difficulty in getting my application to work properly - specifically monitoring the status of a DI line during AI and generating an AO waveform.
The equipment I am using consists of:
cDAQ 9172 chassis,
9401 DIO module (slot 5),
9239 AI module (slot 6),
9263 AO module (slot 3) and,
9481 Relay module (slot 2).
  What I’m trying to accomplish is the following:
Measure three AI channels on the 9239
Generate a single channel AO waveform on the 9263
Monitor the status of line 2 on the 9401
I have the AI and the AO parts working well.  I have one task to measure the three AI channels and one task to generate the AO using a waveform (operating at the same frequency as the AI which is 1613 Hz).  Both tasks are started by a trigger from line 0 of the 9401 (via the /DIO/PFI0 which is why the 9401 is in slot 5).  This part works great because the AO and AI start at the same time and everything works in perfect concert.
What I am having difficulty with is trying set set up a task to monitor the input on line 2 of the 9401 during the AI and AO operations.  I need to know when the line goes high in relationship with the AI and AO data.  The DI tells me when a set of contacts on an external relay are closed and I want to know the timing of this event in relationship the the AI measurements.  I tried to create a task to read the line status in a similar fashion the the AI task (same sampling frequency same starting trigger, etc.) but I get an error saying this is not supported because the 9401 is not in slot 1-4 where its input can be buffered.  If I move it there then I lose my ability to trigger the AI and AO tasks using the DI line 0 input.
I can read the status of DI line 2 by putting a single read task inside the same "Do While" loop wherein I read and chart the AI data but I can't do this with certainty of the timing of the DI read in relationship to the timing of the AI and AO operations.  Any ideas on how to get all three things accomplished more or less simultaneously?

I'm not sure about your particular hardware, but I have a case where I use the exact same clock signal to drive the AO port as what drives the AI acquisition.
I have to tell the AO task to get its clock from the AI SCAN CLOCK, but that's a simple VI call at configure time, and it's all automatic from there.
If you're running a timed DI task, then consider doing something similar - use a DAQ MX TIMING property node and set the SAMPLE CLOCK to your AI SAMPLE CLOCK source.
Then your digital data should occur exactly in sync with your analog data.  You'll still have to search thru it, but a 1D SEARCH ARRAY ought to handle that for you. 
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Similar Messages

  • I cant synchronized my Itunes and iPad..any body help me??

    i cant synchronized my Itunes and iPad..any body help me??

    Thanks I do relise this but I was asking becouse it is an access to the account and I wasn't sure if I had to remove a restriction or something along those lines, or if I had inenvetently fumbled a setting on the phone or something do I thought I'd ask if any one had encountered this issue before ..... But thank u for taking the time to respond ..... 

  • HT1386 I cannot synchronizing my iphone 5. The problem is during synchronizing contacts, calendars and notes. If I do not mark this step it synchronizes perfectly

    I cannot synchronizing my iphone 5. The problem is during synchronizing contacts, calendars and notes. If I do not mark this step it synchronizes perfectly

    Oh I also tried restoring my phone and starting all over again. That didn't work either!

  • Synchronizing analog input and output

    I am in the middle of converting some Traditional NI-DAQ code to the
    DAQmx API (I am using C++).  Most of it is going quite well: my
    code complexity has been greatly reduced and (since upgrading to 7.4)
    my CPU usage has plummeted.  However, in one particular case I
    need my input and output buffers to be synchronized.  I.e. sample
    0 of my input buffer should be read at the same instant sample 0 of my
    output buffer went out on the line.  In Traditional NI-DAQ, I
    synchronized my input and output start triggers using the following
    method (which I believe I found in an example somewhere):
    error = Select_Signal(addr, ND_PFI_6, ND_OUT_START_TRIGGER, ND_LOW_TO_HIGH);
    error = Select_Signal(addr, ND_IN_START_TRIGGER, ND_PFI_6, ND_LOW_TO_HIGH);
    This then allowed me to setup my input thread, then initialize
    everything in my output thread and when my output got the start
    command, so did my input.  The result was that I could perfectly
    match buffers of output data to buffers of input data (after taking all
    the appropriate buffering into account).
    When I try the same method with the DAQmxConnectTerms function, my
    buffers don't line up.  They are off by 15-20 ms out of a 400ms
    buffer (sampling at 10kHz).  I tried cutting out the middle man of
    PFI6 with similar results.  So my current "synchronize" block
    looks like this:
    error = m_fnConnectTerms("/Dev1/ao/StartTrigger", "/Dev1/ai/StartTrigger", 0);
    I get no error.  This also seems to cause my output loop to hang
    after a few seconds, although that could be a side effect of something
    else that I haven't tracked down yet.  Is there a better way to do
    what I'm trying to do here?  Perhaps it is a misunderstanding of
    the way buffering works on the M series cards (I am currently using a
    6221).

    Don't use Connect Terminals. Use the technique shown in this example program
    C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Synchronization\Multi-Function\ContAI-Read Dig Chan
    which is the sharing of sample clocks via the DAQmxCfqSampClkTiming function where the sample clock source of one task is set to the clock of the other task.  This example slaves a digital input task to an analog input task but the idea is the same for your application.

  • Synchronizing local database and server database

    Hi,
    I am working on an application where users store information on their laptops in a local database. Once a day, synchronizing has to take place with the server database. The clients will send their mutated data to the server and the server will send its mutated data, e.g. changed item file.
    The choice of database is Mysql for the laptop, and server resides on AS400, so DB2 is the platform.
    I am wondering what techniques could be used to accomplish this. Should it be done by sql or via text files? Through a socket or something else?
    Does anyone have an idea what the best approach is for this matter?
    And if possible, some sample code would be very much appreciated.
    Thanks in advance.

    Hi,
    There are numerous solutions to this. I have worked on a similar project a couple of years ago. The plan is as follows:
    1. A java client is run on the laptop (user) which connects to the remote server on calls a procedure passing the localdata as the parameter.
    2. the server parses the local data and updates itself and returns the updated data to the client.
    The main considerations:
    1. Connectivity: Connecting via internet to the server tunnelling through firewall or VPN ( I have no adequate knowledge on this).
    2. The amount of data transfer. I was working on relatively less transactional data and hence the connection thru a dial up was not a problem.
    3. The frequency of this operation. TO me it was once a day process, and hence I scheduled it during vee hours when the network was relatively free.
    This is all my thoughts about the scenario. Any comments and suggestions are welcome.
    Cheers,
    Sekar

  • Synchronous read file and status update

    Hi,
    CSV file to be loaded into the database table. ASP used as front end and ESB should be used for backend processing!
    A csv file is placed in a fileshare by an asp page. After that a button is clicked on the asp page which inserts a record into a database table(A) with the file details. There is a flag field in the table which will be set to 'F' initially.
    Now there should be an esb service which will be polling for any new records inserted into the database table(A).
    Once it finds any new record, the esb service should update the flag status to 'RF' from 'F' and read the records in the csv file(I think synchronous read file should be used inthe file adapter) and insert them into a database table(B). The flag field is updated to 'RF' so that the asp page informs the user that the csv file is being inserted into the table(B).
    After all the records are inserted, the esb service should once again update the flag in table(A) to 'Y' from 'RF' so that the asp page will indicate the user that the csv file is loaded into the data base table.
    The challenges that I have here are:
    1) I need to have the ESB service with such a sequence of execution that updates the table(A) at each stage so that the asp page can display the status to the USER.
    2) The csv file size can be huge. It can contain as many as 100 thousand records with over 50 fields in each record. I will have to probably debatch the file. Once we debatch, seperate instance would be created for each batch. Now we should see to that flag in table(A) is updated to 'Y' only when the last batch of the records are processed.
    I am using jdev10134 and oracle SOA suite ESB10134
    Someone please advice on how to go ahead.
    Cheers,
    RV

    Hi,
    CSV file to be loaded into the database table. ASP used as front end and ESB should be used for backend processing!
    A csv file is placed in a fileshare by an asp page. After that a button is clicked on the asp page which inserts a record into a database table(A) with the file details. There is a flag field in the table which will be set to 'F' initially.
    Now there should be an esb service which will be polling for any new records inserted into the database table(A).
    Once it finds any new record, the esb service should update the flag status to 'RF' from 'F' and read the records in the csv file(I think synchronous read file should be used inthe file adapter) and insert them into a database table(B). The flag field is updated to 'RF' so that the asp page informs the user that the csv file is being inserted into the table(B).
    After all the records are inserted, the esb service should once again update the flag in table(A) to 'Y' from 'RF' so that the asp page will indicate the user that the csv file is loaded into the data base table.
    The challenges that I have here are:
    1) I need to have the ESB service with such a sequence of execution that updates the table(A) at each stage so that the asp page can display the status to the USER.
    2) The csv file size can be huge. It can contain as many as 100 thousand records with over 50 fields in each record. I will have to probably debatch the file. Once we debatch, seperate instance would be created for each batch. Now we should see to that flag in table(A) is updated to 'Y' only when the last batch of the records are processed.
    I am using jdev10134 and oracle SOA suite ESB10134
    Someone please advice on how to go ahead.
    Cheers,
    RV

  • Process chain executed synchronously produces dump and hangs

    Process chain (RSPC) being executed synchronously hangs on a step (not first) with yellow status. Analysis of ST22 shows there is dump: RAISE_EXCEPTION
    The chain loads data from flat files on frontend to several characteristics (attributes and texts). All the steps are sequential.
    After the start first file is loaded successfully (info package), subsequent data transfer process has no errors too. But the second info package becomes yellow and hangs just after ( after some time timeout occurs and the step becomes red). In ST22 i see dump, text of the dump is below. Analysis of the dump reveals that 'GUI_UPLOAD' FM doesn't work during execution of the second info-package.
    The chain looks as follows:
    1. Info package 1
          V
    2. Data transfer process 1
          V
    3. Info package 2              <-------   hangs here because of dump
          V
    4. Data transfer process 2
         V
    Hangs on step 3 (infopackage 2).
    Text of the dump:
    Runtime Errors         RAISE_EXCEPTION
    Date and Time          10.10.2010 19:07:59
    |Short text                                                                                |
    |    Exception condition "NOT_SUPPORTED_BY_GUI" raised.                                            |
    |What happened?                                                                                |
    |    The current ABAP/4 program encountered an unexpected                                          |
    |    situation.                                                                                |
    |Error analysis                                                                                |
    |    A RAISE statement in the program "CL_GUI_FRONTEND_SERVICES======CP" raised the                |
    |     exception                                                                                |
    |    condition "NOT_SUPPORTED_BY_GUI".                                                             |
    |    Since the exception was not intercepted by a superior                                         |
    |    program, processing was terminated.                                                           |
    |                                                                                |
    |    Short description of exception condition:                                                     |
    |                                                                                |
    |                                                                                |
    |    For detailed documentation of the exception condition, use                                    |
    |    Transaction SE37 (Function Library). You can take the called                                  |
    |    function module from the display of active calls.                                             |
    |    -                                                                                |
    |How to correct the error                                                                          |
    |                                                                                |
    |    If the error occures in a non-modified SAP program, you may be able to                        |
    |    find an interim solution in an SAP Note.                                                      |
    |    If you have access to SAP Notes, carry out a search with the following                        |
    |    keywords:                                                                                |
    |                                                                                |
    |    "RAISE_EXCEPTION" " "                                                                         |
    |    "CL_GUI_FRONTEND_SERVICES======CP" or "CL_GUI_FRONTEND_SERVICES======CM00X"                   |
    |    "FILE_EXIST"                                                                                |
    |                                                                                |
    |    or                                                                                |
    |                                                                                |
    |    "CL_GUI_FRONTEND_SERVICES======CP" "NOT_SUPPORTED_BY_GUI"                                     |
    |                                                                                |
    |    or                                                                                |
    |                                                                                |
    |    "RSBATCH1 " "NOT_SUPPORTED_BY_GUI"                                                            |
    |    If you cannot solve the problem yourself and want to send an error                            |
    |    notification to SAP, include the following information:                                       |
    |                                                                                |
    |System environment                                                                                |
    |    SAP-Release 701                                                                               |
    |                                                                                |
    |                                                                                |
    |    SAP kernel....... 701                                                                         |
    |                                                                                |
    |    Patch level. 69                                                                               |
    |    Patch text.. " "                                                                              |
    |                                                                                |
    |User and Transaction                                                                              |
                                                                                    |
    |    Program............. "CL_GUI_FRONTEND_SERVICES======CP"                                       |
    |    Screen.............. "SAPMSSY0 1000"                                                          |
    |    Screen Line......... 6                                                                        |
    |                                                                                |
    |Information on where terminated                                                                   |
    |    Termination occurred in the ABAP program "CL_GUI_FRONTEND_SERVICES======CP" -                 |
    |     in "FILE_EXIST".                                                                             |
    |    The main program was "RSBATCH1 ".                                                             |
    |                                                                                |
    |    In the source code you have the termination point in line 8                                   |
    |    of the (Include) program "CL_GUI_FRONTEND_SERVICES======CM00X".                               |
    |Source Code Extract                                                                               |
    |Line |SourceCde                                                                                |
    |    1|method FILE_EXIST.                                                                          |
    |    2|* ...                                                                                |
    |    3|                                                                                |
    |    4|  CLASS CL_GUI_CONTROL DEFINITION LOAD .                                                    |
    |    5|                                                                                |
    |    6|*-check if valid GUI is available----
                             |
    |    7|  IF IS_VALID_HANDLE( ) NE 0 AND cl_gui_control=>www_active IS INITIAL.                     |
    |>>>>>|    RAISE NOT_SUPPORTED_BY_GUI.                                                             |
    |    9|  ENDIF.                                                                                |
    |   10|                                                                                |
    |   11|* check parameter, wild characters not allowed                                              |
    |   12|  IF FILE IS INITIAL OR FILE CA '*<>|"'.                                                    |
    |   13|  MESSAGE 'WRONG PARAMETER: FILE_NAME' TYPE 'I' RAISING WRONG_PARAMETER.                    |
    |   14|    EXIT.                                                                                |
    |   15|  ENDIF.                                                                                |
    |   16|                                                                                |
    |   17|* special handling for SAPGUI for HTML                                                      |
    |   18|  IF CL_GUI_CONTROL=>WWW_ACTIVE IS NOT INITIAL.                                             |
    |   19|                                                                                |
    |   20|    DATA: rc type i, filename(4096) type C.                                                 |
    |   21|    filename = file.                                                                        |
    |   22|    CALL FUNCTION 'ITS_QUERY'                                                               |
    |   23|      EXPORTING                                                                             |
    |   24|        filename = FILEname                                                                 |
    |   25|        query    = 'FE'                                                                     |
    |   26|      IMPORTING                                                                             |
    |   27|        return   = rc.                                                                      |
    |Active Calls/Events                                                                               |
    |No.   Ty.          Program                             Include                             Line   |
    |      Name                                                                                |
    |    8 METHOD       CL_GUI_FRONTEND_SERVICES======CP    CL_GUI_FRONTEND_SERVICES======CM00X     8  |
    |      CL_GUI_FRONTEND_SERVICES=>FILE_EXIST                                                        |
    |    7 FUNCTION     SAPLSFES                            LSFESU16                               96  |
    |      GUI_UPLOAD                                                                                |
    |    6 METHOD       CL_GUI_FRONTEND_SERVICES======CP    CL_GUI_FRONTEND_SERVICES======CM013     4  |
    |      CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD                                                        |
    |    5 METHOD       CL_RSDS_ACCESS_GUI_UPLOAD=====CP    CL_RSDS_ACCESS_GUI_UPLOAD=====CM001    74  |
    |      CL_RSDS_ACCESS_GUI_UPLOAD=>IF_RSDS_EXTRACT_DIRECT~EXTRACT                                   |
    |    4 FUNCTION     SAPLRSDS_BACKEND                    LRSDS_BACKENDU01                      304  |
    |      RSDS_DATA_PULL                                                                              |
    |    3 FUNCTION     SAPLRSSM                            LRSSMU17                             5422  |
    |      RSSM_CALL_RSAR_DATA_REQUEST_1                                                               |
    |    2 FORM         RSBATCH1                            RSBATCH1                             1327  |
    |      START                                                                                |
    |    1 EVENT        RSBATCH1                            RSBATCH1                              498  |
    |      START-OF-SELECTION                                                                          |

    If i load the step manually it works. The hung step is possible to re-execute after it gets red (with context menu) and it works then. After that it hangs on the 3rd info-package and so on.
    The file lays on a network drive, but i suspect it doesn't matter

  • Synchronizing IPTC/IIM and XMP metadata in JPEG images

    Excerpt of "IPTC Core Implementation Guidelines", section 2.2.1 available on http://www.iptc.org/IPTC4XMP/:
    The basic functionality of this synchronising mechanism [between IPTC/IIM metadata in IRB and XMP metadata] is:
    - To move metadata from the IRB to a new XMP packet in case an image file is opened with such an IRB but without an XMP packet. If the file is saved both the IRB and the XMP packet will be stored to the header section of this file.
    - To move metadata from the XMP packet to a new IRB in case an image file is opened with an XMP packet but without an IRB. If the file is saved both the IRB and the XMP packet will be stored to the header section of this file.
    - To update the metadata values of the IRB respectively the XMP packet from the newer source to the older destination. Which set is newer or older is detected by a hash value over each block of metadata. (More detailed information is available from Adobes XMP web pages at www.adobe.com/xmp and in the software development kits.)
    I have checked for Adobe XMP web site and searched in "XMP Specification, January 2004" and I have not found explanations about this "hash value over each block of metadata" mechanism.
    Moreover, it seems that it does not work regarding to the following simple experiment:
    - 1. add metadata to a JPEG image using Photoshop CS (which adds both IPTC/IIM data in IRB and data in XMP)
    - 2. edit these metadata using an "IPTC/IIM-only and non-XMP-aware" editor like IrfanView, XNView or any other one
    - 3. go back to Photoshop CS which displays the "old" XMP metadata ignoring changes done previously using the IPTC-only editor.
    Of course this experiment works using an "XMP-aware" editor like iView Media Pro or PixVue in step 2.
    So it seems very easy to get images with IPTC/IIM and XMP metadata not synchronized when the image workflow uses different programs to edit metadata.
    Am I missing or misunderstanding something ?
    I have found a radical method stripping XMP metadata (in a step 2 bis...) using David Crowell's JStrip, see
    http://davidcrowell.com/jStrip.aspx
    Do you know any other best method to keep IPTC/IIM and XPM data synchronized when an image workflow uses different metadata editors and some of them are not XMP-aware ?
    Patrick Peccatte
    www.softexperience.com

    Excerpt of "IPTC Core Implementation Guidelines", section 2.2.1 available on http://www.iptc.org/IPTC4XMP/:
    The basic functionality of this synchronising mechanism [between IPTC/IIM metadata in IRB and XMP metadata] is:
    - To move metadata from the IRB to a new XMP packet in case an image file is opened with such an IRB but without an XMP packet. If the file is saved both the IRB and the XMP packet will be stored to the header section of this file.
    - To move metadata from the XMP packet to a new IRB in case an image file is opened with an XMP packet but without an IRB. If the file is saved both the IRB and the XMP packet will be stored to the header section of this file.
    - To update the metadata values of the IRB respectively the XMP packet from the newer source to the older destination. Which set is newer or older is detected by a hash value over each block of metadata. (More detailed information is available from Adobes XMP web pages at www.adobe.com/xmp and in the software development kits.)
    I have checked for Adobe XMP web site and searched in "XMP Specification, January 2004" and I have not found explanations about this "hash value over each block of metadata" mechanism.
    Moreover, it seems that it does not work regarding to the following simple experiment:
    - 1. add metadata to a JPEG image using Photoshop CS (which adds both IPTC/IIM data in IRB and data in XMP)
    - 2. edit these metadata using an "IPTC/IIM-only and non-XMP-aware" editor like IrfanView, XNView or any other one
    - 3. go back to Photoshop CS which displays the "old" XMP metadata ignoring changes done previously using the IPTC-only editor.
    Of course this experiment works using an "XMP-aware" editor like iView Media Pro or PixVue in step 2.
    So it seems very easy to get images with IPTC/IIM and XMP metadata not synchronized when the image workflow uses different programs to edit metadata.
    Am I missing or misunderstanding something ?
    I have found a radical method stripping XMP metadata (in a step 2 bis...) using David Crowell's JStrip, see
    http://davidcrowell.com/jStrip.aspx
    Do you know any other best method to keep IPTC/IIM and XPM data synchronized when an image workflow uses different metadata editors and some of them are not XMP-aware ?
    Patrick Peccatte
    www.softexperience.com

  • Synchronous BPEL processes and dehydration

    Hi all,
    I am confused about dehydration behaviour of synchronous BPEL processes.
    The BPEL Developer's Guide says:
    "Dehydration enables the states of long-running processes to be automatically maintained in a database and correlation of asynchronous messages"
    IMHO this means that dehydration is applied to asynchronous BPEL processes only - not to synchronous processes.
    On the other hand I found a forum entry Re: dehydration ? saying the following:
    "Dehydration can optionally be disabled for synchronous flows"
    which means that by default synchronous processes will be dehydrated(?).
    Can anyone clarify the dehydration behaviour and configuration of synchronous BPEL processes?
    Thanks in advance
    Ingo

    Hi Ingo,
    The BPEL Developer's Guide says:
    "Dehydration enables the states of long-running processes to be automatically maintained in a database and correlation of asynchronous messages"
    This is true, as well as adding a checkpoint() in the Java Embedding Activity will force hydration.
    Cheers
    Pucha Anirudh

  • Synchronizing Mac Book and IMac

    I have Mac Book and recently I bought IMac. Have transferred all the data and settings to the IMac.
    Now I wonder how can I keep both synchronized??

    You might look into [SyncMate|http://mac.eltima.com/sync-mac.html] to see if it will fill your needs.

  • Palm Treo 800w Error Synchronizing Work Email and ActiveSync screen problems

    For some reason, yesterday my email stopped synchronizing.  Anytime I hit the "send/receive", it looks like it's going through the process but I get an "error synchronizing" error.  Normally it is on auto synch. My other email accounts work just fine.  When I go into the "ActiveSync" through programs to delete the acct and start over, the activesych screen just disappears within a second of me opening it.  I can't keep it open for me to make any edits or see if I can get a specific error message. Any thoughts? Not sure if Sprint can solve this or if I would have to go through Palm to troubleshoot?? 
    Post relates to: Treo 800w (Sprint)

    If you need help, you can always go to a corporate Sprint service store. To find one near you, go to http://storelocator.sprint.com/StoreLocator/Searchform.aspx. Enter your zip code in the box and choose the radio button that says "Repair centers near me".
    However, they are most likely going to just do what you can on your own to start with and that is a hard reset. A hard reset erases all data on the phone and returns it to the default factory settings. Backup any data that you need to keep and then go to http://kb.palm.com/SRVS/NUA/launchKB.asp?c=41108 for instructions on how to hard reset. Once you have reset your device, you will then need to reinstall any software that you added, restore your backed up data, etc. You might find the following link helpful when setting up your device again: http://kb.palm.com/SRVS/NUA/launchKB.asp?c=40086.
    Also, make sure to install the available patches on your device: http://kb.palm.com/SRVS/NUA/launchTab.asp?t=downloads&fn=treo&mn=800w&cn=sprint.
    Message Edited by wwejason on 04-09-2009 05:52 PM

  • IPhone synchronized with iTunes and lost songs, why?

    I synchronized my iPhone with iTunes and any one of my songs are gone and the iPhone does not appear in iTunes, it takes a lot to recover, because I have an important recording to be delivered to my lawyer!
    Please help me out!

    CJ201188 wrote:
    I synced my iphone 4S with my itunes on my Macbook Pro and now my iphone looks just like my Ipod Touch does
    It was not synced, it was restored with a backup from your iPod Touch.

  • Updating/synchronizing takes forever and never succeeds

    Hi! I have had my Iphone 3G a year now and I have never succeeded to update it. I have tried many many times, but I've always given up since it wont work. It takes forever, literally, to upgrade it. Last night I thought I'd give it another try. I hooked up my phone to my computer and pressed the update button. This morning, after eight hours, nothing had happened. It still said it was synchronizing and I had synchronized it just prior to the update. I have the latest version of ITunes and I am using the USB 2 port on the back of my computer. Why won't it work? I don't want to reset my phone and lose everything on it.
    Anyone?

    Problem resolved.
    I did another try yesterday to export a backup for my new snow leopard ical data and try to import it again. it takes a long time and never complete. so I believe it has nothing to do with the cross plaform or different version of ical.
    So I re-install the ical application again from the installation disc. it works perfect afterward. I think the first installation was missing some file.

  • Question on synchronized method / block and Thread Cache

    Hi all,
    I came across a blog post at http://thejavacodemonkey.blogspot.com/2007/08/making-your-java-class-thread-safe.html which is talking about making Java classes thread safe. But, I was surprised to see that a thread can have my class' instance variable in its cache. Also, I have couple of questions on the things posted in the blog. I want to get the opinion from Java experts here.
    1. Given the example class
    class MyClass{
         private int x;
         public synchronized void setX(int X) { this.x = x; }
         public synchronized int getX() { return this.x; }
    Having the following instructions in two threads won't guarantee that it will print 1 and 2 as other thread can get the slot and call setX to modify the value - Am I right?
    obj is an MyClass Instance available to both the threads
    Thread 1:
    obj.setX(1);
    System.out.println(obj.getX());
    Thread 2:
    obj.setX(2);
    System.out.println(obj.getX());
    It will print 1 and 2 (in any order) only if I synchronize these calls on "obj" as follows - Is my understanding correct or ???
    Thread 1:
    synchronized(obj)
    obj.setX(1);
    System.out.println(obj.getX());
    Thread 2:
    synchronized(obj)
    obj.setX(2);
    System.out.println(obj.getX());
    2. If my understanding on point 1 (given above) is right, What the blog-post says is wrong as I cannot even expect my thread 1 to print 1 and thread 2 to print 2. Then, again a question arises as why a thread cache has a object's instance variable value in its cache and need to make my instance variable volatile. Can anyone explain me in detail? Won't the thread always refer the heap for Object's instance variable value?
    Thanks in advance,
    With regards,
    R Kaja Mohideen

    your basic understanding (as far as i can understand what you've written) seems to be correct. if you run your first 2 threads, you can get "11", "12", "21", or "22" (ignoring newlines). if you run your second 2 threads, you can get "12" or "21".
    i'm not sure i follow your second point about your thread's "cache". i think you are asking about the visibility of changes between threads, and, no, there is not concept of a shared "heap" in the memory model. basically, (conceptually) each thread has its own working memory, and it only shares updates to that memory when it has to (i.e. when a synchronization point is encountered, e.g. synchronized, volatile, etc). if every thread was forced to work out of a shared "heap", java on multi-core systems would be fairly useless.

  • Synchronizing iCloud, iPhone and MacBook Address Book

    I have a MacBook running running 10.7.2 and an iPhone 4.  I've activated iCloud on both devices, but they don't seem to actually synchronize. Contacts I moved over from my old phone to the new iPhone are now showing up in my Address Book.  However, changes I made to the Address Book did not seem to make it to the iPhone.  Now, the old data on the iPhone has overridden the changes I made to the Address Book, and I'm back where I started.  Is there some sort of setting that I'm missing that makes the sync work correctly, or is this just a timing issue that will always create issues?

    Welcome to the Apple Community.
    You might also take a look at this User Tip, to ensure you understand the differences between the different accounts in Address Book

Maybe you are looking for

  • Error at PHASE LOADCRE_TMP in 4.71 upgrade

    hi i am getting the below error in R/3 Upgrade: UPGRADE/SWITCH: START OF PHASE LOADCRE_TMP working ... Creating empty ABAP load tables ERROR: 1 error messages found in LOADCRT.ELG. Analyze the log (refer to the upgrade guide and the notes) and remove

  • Bluetooth earpiece muffled when answering a call

    Has anybody have this problem when answering a call from your bluetooth head set and the caller says he can't hear you for a couple of seconds and then it sounds just fine? Tried different head sets and the same problem. seems like the head set has a

  • Mass Storage Error Code

    My iMac G5 will not boot OS X. The hardware tester gave me an error code when I ran an extended test. Under Mass Storage the error code "2STF/8/3:S - ATA Bus 0 - Master" appeared. What does this error code mean?

  • LDAP V5.1 on WLS61/WLP4.0?

    Before we upgrade, I was looking for a confirmation that someone has successfully deployed LDAP 5.1 on WLS 6.1 and WLP 4.0. It is probably suppported but since support can't tell me that this is a certified environment, I'm looking for a success stor

  • MessageDrivenBean not really deployed

              I am using 6.1sp4, and have come across a situation that I have been unable to           resolve. My set up is such that session ejbs send to the JMS queue (using a transacted           QueueSessionFactory) as part of its container managed