"Waiting for real-time target (RT PXI target) to respond" error when the program waits interrupts

Hi there,
I have developed an application to detect interrupts generated by a electronic card and act in consequence. The program has been developed in labview but it calls a dll; that was created with labwindows. The dll is programmed to open the visa communication, enable events and install the interrupt handler and when an interrupt is detected, it reads the value of the different registers of the card and returns it to labview to visualize them. 
The problem is that when the program waits for an interrupt, a prompt appears with the message "Waiting for real-time target (RT PXI target) to respond" and the only option I have is to click on the button to disconnect from the pxi or just wait. If I wait and I generate an interrupt, the prompt disappears and the application visualize the data like it was expected. 
To wait for the interrupt the following code has been programmed in the function:
                while (flag == 0)
                                Sleep (1000);
When an interrupt occurs, the value of flag changes to 1 and the function continue without any problem. I am not really sure, but probably here is the problem and probably this is not the best way to wait for an interrupt because the sleep function suspends the thread for the configured time, but at least the computing load in the PXI is between 0% and 1%. I was wondering if somebody knows how to wait for an interrupt without "lost" the communication with the PXI and if there is a better way to do it. 
Any answer will be welcome and thanks for them,
Jaime
Solved!
Go to Solution.

Hello Naity,
First of all, in which thread runs the waiting process? Is it scheduled in another thread than the function setting the flag?
It scheduled in the same thread that I use to configure the communications and configure the card. Anyway, here is the pseudo code of the function interrupt that I programmed under labwindows,.
char* interrupt(void)
1. Open visa communications
2.Install handler interrupt --> status = viInstallHandler (instr, VI_EVENT_PXI_INTR, IntrHandler, VI_NULL);   // the function IntrHandler will be called when an interrupt occurs
3. Enable event PXI interrupt
4. Wait
while (flag == 0)
              Sleep (1000);
5. Visualize the data coming from the interrupt (registers and values measured with the card)
6. Uninstall handler interrupt
7. Close visa session
The interrupt handler function IntrHandler is called immediately when an interrupt occurs and the pseudo code is like this
ViStatus _VI_FUNCH IntrHandler(ViSession instr, ViEventType etype, ViEvent event, ViAddr userhandle)
1. Disable some functions of the card to avoid damages. 
2. Read registers and put them in a buffer
3. Change the value of flag ---> flag = 1;
In labview, I call the function interrupt with a call library function node (see the capture attached) and the program reads and saves the data from returned from the function.
Secondly, I am not sure this method is the most elegant. You could for example register an event with the function and, insteand of setting a flag to 1, trigger the event and schedule it in another thread (if the function is thread safe). This could reduce your CPU Load even more and seem a bit cleaner to me.
I've never used events before in labwindows but I will try to do it in this way. But anyway, I suppose that I should; somehow, wait the event to occurs in labview while the waiting for the event is programmed inside the dll...and probably the same prompt that i am trying to avoid is going to appear again, because I am not returning the "control" to labview (I mean, labview executes the dll and waits for the event to occur. Then the execution of the labview program is stopped in the call library function node executing the dll)
Third point, which environment of development are you using?
I am working with LV 2010 sp1 and Labwindows cv 10.0.1 and with the real time module.
I did also another test, I divided the program in different functions, one to initialize the communication, another to wait until a interrupt has been detected and the other to obtain the data from the interrupt and close communications. With labview I call first with the call library function node the function to initialize, later I call inside a while loop the wait function like this
int waitAseconds (double seconds, short stop_waiting)
if(flag==1 || stop_waiting == 1)
flag = 1; //to detect the stop_waiting button
printf("flagAA =1 stop waiting = %d time = %d\n", stop_waiting, clock());
return flag;
else
SleepUS(seconds*1000000);
//a++;
printf("flag a= %d stop waiting = %d time = %d\n", flag, stop_waiting, clock());
return flag;
 and when the program detects an interrupt, the function returns to labview the flag and stops the loop. Finally, it reads the values and close communications. 
In this way, the prompt appears but after running the application for 10 or 20 minutes and also i checked that there is a time gap between the executions in the loop.
Thanks for your reply and your help,
Jaime
Attachments:
capture.png ‏40 KB

Similar Messages

  • Process speed necessary for real time livetype & Motion

    Does anybody remember the minimum processor speed necessary to
    run LIVETYPE and MOTION from WITHIN FCP5...not as seperate apps?
    The online spec sheets indicate the speeds necessary for running as seperate apps,
    but not for real time from withing FCP5...at least, not the ones I can find.
    Thanks.

    Where did you encounter the promise of real time in FCP?
    Can't be done AFAIK.
    Even if possible, you'd only get a few misleading preview frames.
    We've got our new biga$$ Macs arriving in a few weeks. I'll let ya know if anything happens real time in FCP.
    bogiesan

  • Pxi 1042 configuration for Real-Time

    I have purchased
    PXI-1042
    controller 8187
    one module for data capturing.
    I want to configure the said pxi for Real-Time purposes,
    so what steps should I follow?
    thanks
    Abbas
    Solved!
    Go to Solution.

    The Real-Time Deployment License is different from the LabVIEW RT module.
    When you purchase a PXI controller, part of what you are buying is the operating system that is installed on it.  If you purchased the controller with Windows on it then you purchased the copy of Windows that came with it.  Now that you want to put the real-time operating system on it, you need to purchase the license for it.
    But that's all legal stuff.
    And you are correct that there is a copy of the RTOS on the controller.  But if your controller has its disk formatted as NTFS you will not be able to use it.   The RTOS requires that the hard drive be FAT32. 
    If your controller is FAT32 then you can boot into BIOS (hit delete while booting), and select Real-Time in the Boot Configuration to make your controller boot into Real-Time.
    If you controller is not FAT32 then you will need to format the controller first, using the disks I have previously mentioned.
    Please let me know if you have any questions.
    Justin Parker
    National Instruments
    Product Support Engineer

  • MAX support of SNTP for Real-time controller​s

    Hey everyone,
    I have some PXI systems that allow me to enter a Time Server IP address directly into the MAX setup for the device but I have some other PXI chassis that don't. Does this have to do with the version of Real-time they are running? Can anyone tell me what version of RT and MAX started supporting Time Servers natively through MAX for real-time controllers?
    Thanks,
    Craig

    Hi craige,
    It looks like SNTP synchronization is not fully supported for PXI systems:
    http://forums.ni.com/t5/LabVIEW/Configuring-PXI-81​84-controller-to-synchronize-to-SNTP-server/td-p/1​...
    However, for CompactRIO, synchronization with SNTP servers began with LabVIEW Real-Time 8.6:
    http://digital.ni.com/public.nsf/allkb/F2B057C72B5​37EA2862572D100646D43
    The forum post I linked above does have some links to customer created examples relating to NTP and SNTP Time Servers.
    Please note that those examples are both unsupported and a little bit on the older side.
    Regards,
    Joel I.
    Applications Engineer
    National Instruments

  • Hi am trying to save Data into a write to measurement file vi using a NI PXI 1042Q with a real time mode but it is not working but when i run it with uploading it into the PXI it save in to the file

    Hi am trying to save Data into a write to measurement file vi using a NI PXI 1042Q and DAQ NI PXI-6229 with a real time mode but it is not working but when i run it without uploading it into the PXI it save in to the file please find attached my vi
    Attachments:
    PWMs.vi ‏130 KB

     other problem is that the channel DAQmx only works at real time mode not on stand alone vi using Labview 8.2 and Real time 8.2

  • HT1476 if i bought my ipod touch 32gb in germany where the voltage is 220v and i live in America where the voltage is 110, i will have to wait to get to my home to charge it for first time or I can charge it here and change the voltage of the battery in A

    if i bought my ipod touch 32gb in germany where the voltage is 220v and i live in America where the voltage is 110, i will have to wait to get to my home to charge it for first time or I can charge it here and change the voltage of the battery in America?
    please i need help, im worried that if I connect my ipod here, it will burn or sometihng bad.

    Just connect it to a computer's USB port.
    Most wall chargers are dual voltage (110- 220 volts) and only require a plug adopter. Check the wall charger to see if yours is.

  • FI CO Integation: Document type for real-time integration with FI not there

    Dear Gurus,
    This is the error message that I got and I am looking for a solution could anyone help me please.
    I was doing simultaneous costing and doing Product Cost Collector reports.[KKBC_PKO]
    This is IDES 6.00 ehancement package 4,
    How do I define a document type for real-time integration with FI?
    Message no. FAGL_COFI003
    "Diagnosis: For CO documents to be transferred into Financial Accounting in company code 1000, -the system requires a document type".
    How do I go about with this, need steps to resolve this please
    Thank you
    Saleem

    Hi,
    1. Check which variant is assigned to your company code '1000' using this IMG path
    IMG->Financial Acctg (New)->Financial actg global settings (New) ->Real-Time integration of Controlling with Financial Actg ->Assign variants for Real-time Integration to Company codes.
    2. Check if document type is assigned to the variant assigned to your Company code in this path:
    IMG->Financial Acctg (New)->Financial actg global settings (New) ->Real-Time integration of Controlling with Financial Actg -> Define Variants for Real-Time Integration.
    Hope this helps.

  • Waiting for network time"?

    I thought I had set up Apple TV correctly, and paired it with my silver remote it came with, but whenever I turn it on now, the screen says "Waiting for network time". Has anyone else had this issue? I can't seem to find the answer online or in the manual of how to correct this.

    The "menu+down" reset did not help. It rebooted the Apple TV, but upon reboot it displayed the same message.
    Taking the device away from the hotel and to my in-laws house let me use it just fine while there. It recognized that it didn't have a network connection and I was able to tell it to join the WiFI and give it a password. I hoped at that point that when I took it back to the hotel that night it would have forgotten all about the hotel WiFi and let me configure it to join the ad-hoc network from the laptop. But no luck. The Apple TV still remembered the hotel WiFi and got stuck again.
    I guess the only way to make it forget a network once it's joined is the "restore" option, which reverts it to factory settings (meaning you'd have to re-apply the firmware update). I haven't done that yet, though I ought to while I'm at home and the thing is working, so I don't forget next time we take a trip to a Hampton inn and have it mess up again.
    It seems there ought to be a way to make it "forget" WiFi networks, like the iPad and Macs can. Of course it shouldn't get itself into a state where the remote doesn't function and the settings menu produces errors either.

  • Defining Account Determination for Real-Time Integr

    Dear all,
    I haven't understood yet about Account determination for the real-time integration of Controlling (CO) with Financial Accounting (FI).
    Please tell accounting process that use this account. And give me a detail example.
    Thanks so much
    Minhtb

    Hello
    This is the new feature in New GL accounting
    During allocations in Controlling, most of the postings created do not affect Financial Accounting. These postings do not update any G/L account transaction figures; they are postings within Controlling. If, however, an allocation in Controlling leads to a change in the functional area or any other characteristic (such as Profit Center or Segment) that is relevant for evaluations in Financial Accounting, a shift occurs between the affected items in the profit and loss statement. For this reason, this information has to be transferred to Financial Accounting. This reconciliation between Controlling and Financial Accounting takes place by means of real-time integration.
    As a result of real-time integration, all Controlling documents that are relevant for General Ledger Accounting are transferred from Controlling to General Ledger Accounting in real time. This means that Financial Accounting is always reconciled with Controlling.
    A document is created in Financial Accounting for each posting in Controlling. This means that the detailed information contained in the CO documents is always available in reports in New General Ledger Accounting. This information can be sorted by the following, for example:
    ●     Functional area
    ●     Cost center
    ●     Internal order
    Real-time integration replaces the reconciliation postings from the reconciliation ledger. Consequently, you do not need a reconciliation ledger.
    If, however, you do not set the Reconciliation Ledger Active indicator in Customizing for the controlling area, you cannot use the reports belonging to report groups 5A* (5AA1-5AW1). You set this indicator in Customizing for Controlling under General Controlling ® Organization ® Maintain Controlling Area. The reconciliation ledger serves as the data source for reports belonging to the report groups 5A*. You find these reports in the SAP Easy Access menu under Accounting ® Controlling ® Cost Element Accounting ® Information System ® Reports for Cost and Revenue Element Accounting.
    Replacement reports are available as follows:
    ●     You find the reports in the SAP Easy Access menu under Accounting ® Controlling ® Cost Element Accounting ® Information System ® Reports for Cost and Revenue Element Accounting (New).
    ●     You can create additional reports in report group 5A21. You can assign the report group to any drilldown report of New General Ledger Accounting using the report-report interface.
    ●     From the report Financial Statements Actual/Actual Comparison, you can call up the report Cost Elements: Breakdown by Company Code. You find the report Financial Statement: Actual/Actual Comparison in the SAP Easy Access menu under Accounting ® Financial Accounting ® General Ledger ® Information System ® General Ledger Reports (New) ® Balance Sheet/Profit and Loss Statement/Cash Flow ® General ® Actual/Actual Comparisons.
    You can define account determination for each controlling area. You do this in Customizing for Financial Accounting (New) under Financial Accounting Global Settings (New) ® Ledgers ® Real-Time Integration of Controlling with Financial Accounting ® Account Determination for Real-Time Integration. In this way, you use the same account determination as for the reconciliation ledger (transaction OK17). You can then use the reconciliation ledger reports to compare FI balances with CO balances.
    Prerequisites
    If you use real-time integration in at least one company code, you need to have activated company code validation for the related controlling area. You do this in Customizing for Controlling under General Controlling ® Organization ® Maintain Controlling Area ® Activate Components/Control Indicators. Otherwise, the reconciliation between Financial Accounting and Controlling at company code level is not possible.
    In Customizing for Financial Accounting (New), you have processed the IMG activities under Financial Accounting Global Settings (New) ® Ledgers ® Real-Time Integration of Controlling with Financial Accounting.
    Activate real-time integration for all company codes between which you want to make CO-internal allocations.
    In the IMG activity Define Variants for Real-Time Integration, do not select all CO line items for transfer. If the same line items are to be transferred as through the reconciliation posting from the reconciliation ledger, select the following line items:
    ●      Cross-Company Code
    ●      Cross-Business Area
    ●      Cross-Functional Area
    ●      Cross-Fund (if you use Public Sector Management)
    ●      Cross-Grant (if you use Public Sector Management)
    Features
    Value flows within Controlling that are relevant for General Ledger Accounting – such as assessments, distributions, confirmations, and CO-internal settlements – are transferred immediately. The FI documents are posted with the business transaction COFI. They contain the number of the CO document. This means that you can call up the CO document from the FI document, and vice versa.
    Activities
    If a document could not be transferred because the posting period was blocked in Financial Accounting or no account was found, for example, the document is included in a postprocessing worklist. You need to check this worklist regularly and process any documents in it. From the SAP Easy Access menu, choose Accounting ® Financial Accounting ® General Ledger ® Corrections ®Post CO Documents to FI.
    Example
    An internal order for business area 0001 is settled to a cost center of business area 0002. The document from this allocation is transferred in real time to Financial Accounting.
    Reg
    assign points if useful

  • How configure Define Account Determination for Real Time Integration

    Hi All,
    I am doing configure of new company just know about how do i configure for Define account determination for real time intergration. what is the use? Pleaes give me some clarity with example.
    Thanks
    Pankaj

    Hi,
    Please go through the below link:-
    http://help.sap.com/saphelp_erp2004/helpdata/en/22/c2cf4031288131e10000000a1550b0/content.htm
    Regards,
    Gaurav

  • Is vision development module in labview 8.6. sufficient for real-time image acquisition and analysis using a webcam

    Hi, 
    I'm new to labview and trying to develop an eye-tracker using labview 8.6. It has the vision development module and i was wondering if this was sufficient for real-time image acquisition and processing or would i be needing any other software tools.
    Solved!
    Go to Solution.

    Hello, certainly it is possible and sufficient for real-time tracking!
    About eye tracking - if you need an example, you can find the code here:
    https://decibel.ni.com/content/blogs/kl3m3n/2013/10/08/real-time-face-and-eye-detection-in-labview-u...
    The code uses OpenCV functionalities along with the LabView UI (and some other functions like overlay).
    Hope this helps a bit.
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • LR6 wait for some time hoping to launch as soon as D750 can not connect!

    LR6 wait for some time hoping to launch as soon as D750 can not connect!

    RAW is supported for D750 in versions later as 5.7
    I suppose tethering will be added with next version, which probably is LR6.

  • 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'

  • Do sth for 5 sec. or 5 min.? How does Java wait for some time ?

    How can I show a text in a label for 5 sec. and then make it disappear ?
    How can I make my app wait for some time ?
    What's the command ?
    thanx!

    The above is correct, but since painting is done in a separate thread, the likely result would be a blank space for 5 seconds, followed by a brief flash of text. You need to look at methods like invokeLater in SwingUtilities. You could also try forcing a paint(Graphics g) rather than a repaint before you wait.

  • I had itunes working properly for a long time till one day, it was configuring to open the program then i get a message out of nowhere that says could not acess network location %APPDATA%\  i cant even uninstall without this, whats the big deal?!

    I had itunes working properly for a long time till one day, it was configuring to open the program then i get a message out of nowhere that says could not acess network location %APPDATA%\  i cant even uninstall without this, whats the big deal?!

    With that particular variety of 1606 (it's a 1606 error message even though the 1606 error message number isn't returned by the iTunes installer), the following Microsoft document is worth a try:
    You receive an "Error 1606" error message when you try to install or remove a Microsoft program

Maybe you are looking for

  • I want to love iPhoto just a I love iTunes.

    I love iPhoto, but: 1. The iPhoto library package's upload is slow, because is a folder full of little files. The FTP app read all the paths one by one and it's slow down. It's hard to keep a backup updated. The compressed folder -zipped- is much fas

  • OSA-Error message shows up in R3, but not in Portal(BSP)

    Hello, I'm working on Objective Setting & Appraisal with workflow & portal. At the template level I've put some business check which if not met at the document level throws up error msg. This works fine in R3 and the error msg is shown at the bottom

  • LocationAPI getLocation timeout don´t work

    Hey, I´ve a Problem with the LocationAPI. I want to update my Position everey 500ms. Here my Code: while(true){      try {           location = locProvider.getLocation(5);          // Lokalisierung (timeout: Provider default)           coord = locati

  • Acrobat 8 Pro, change form background

    Hi there, We are currently making a lot of interactive forms in Acrobat. We design the form in InDesign, and then export as PDF and generate a form on that. But sometimes there is a small change in the InDesign file, and we have to create the entire

  • People category in Organizer 11

    It seems that if the facial recognition software does not recognize a person as a person the photo will not go into the People category. I have not found a way to manually tag someone. Is there a way to do this? Is there a way to display in the Peopl