Asynchronous serial

It appears that when calling viReadAsync, it will not return until it times out or it receives at least as many bytes as I requested.  Is there a way to make it return when it finds any data in the buffer?  Currently, I am setting 'count' to 1, but this seems a bit inefficient. 
Once viReadAsync and viWaitOnEvent have completed, I am having problems getting the number of bytes read.  Is this always going to be the same number I requested?  I tried using viGetAttribute to get VI_ATTR_RET_COUNT, but couldn't make that work.  When I use the device session as the first arg, it returns VI_ERROR_NSUP_ATTR.  When I use the job ID from viReadAsync or VI_EVENT_IO_COMPLETION, VI_ERROR_INV_OBJECT is returned.  What is the secret to getting the number of bytes read?
Will viReadAsync ever return more bytes than I requested?  What do I need to do to get all bytes in the input buffer?  Do I need to check the number of bytes in the buffer, then request that many?  How do I do this (I can't find that function/attribute)?

Are you using CVI? This is the LabVIEW forum. I can tell you though, that you can be use the VI_ATTR_ASRL_AVAIL_NUM to determine how many bytes are actually in the buffer and only do a read if the byte count is greater than 0. You will never get more bytes than what you request but you can get less. You will get less if you have the termination character enabled and the data includes the character. A VISA read will then terminate when the term character is detected, no matter how many bytes you specify.

Similar Messages

  • Asynchronous serial com with DAQ6034E

    Hello,
    I am a new CVI programmer, and i would like to submit a problem.
    I use a DAQ6034E card with LabWindows/CVI. I would like to communicate with devices via an asynchronous serial bus. Is it possible to do such a thing with a digital I/O, and how can I do (especially for reception) ?
    Thank's for your help !
    Franck...

    Frank,
    You could use the DIO lines on the 6034E. But keep in mind the limitations of the DIO lines on this card. These DIO lines are programmed IO only. That means, that data transfers (in or out) can only be done via software timing. You cannot do any hardware timing on the DIO lines for this card. If you need hardware timing on this operation, you will need to use a DIO card.
    But, if you can work with only software timing, you have the advatage in this card of being able to configure line direction on a line by line basis, which I think can be very beneficial in serial communication.
    Nick W.

  • Asynchronous serial input with an sbRIO FPGA

    Background:
    As part of my capstone project, I'm trying to read data transmitted serially from an IMU. The host is an sbRIO 9602.
    As far as I'm aware, the protocol is not exactly standard: data is sent asynchronously in packets. Each packet consists of 12+ bytes in immediate sequence, each having a start and stop bit, and then the line goes idle [high] until the next packet. Each data byte is preceded by a frame bit, and only contains 7 bits of actual data, so the packet has to be further processed to get actual useful data.
    I've seen the FPGA serial I/O example program floating around. The code I inherited was actually based on it, but it's overly complex for this application, and I'm not convinced it would actually work for this protocol at all. I couldn't get it to work, at any rate. I rewrote the sampling code in its entirety twice trying to get it to work, but haven't made a lot of progress. -On the bright side, the current VI is much simpler and more straight forward than my first attempt...
    The problem:
    I can read the first 70 or so bits of a packet fine, then the program skips a bit. That throws off the start/stop bits, and basically renders everything after meaningless. In this screenshot the data is as read in, in order from top to bottom:
    I'm fairly certain this means my sampling interval isn't perfect [this suggests about 1.4% too long], but I'm totally stumped on how to avoid it. What's worse, this is actually on the lowest possible output setting from the IMU, 2400 baud. Realistically, we're hoping to have it working at either 230.4k or 460.8k baud.
    The prior version of my code had the packet being read in 10-bit [1 byte] chunks, processing, then reading the next chunk. I encountered exactly the same error. I assumed that having too much code in the sampling process was causing the timing to be thrown off, so I changed it to read off the entire packet into a bit array and then process it afterward [while no data is coming in]. I've attached this version of the code for reference. It's cleaner, but no change as far as the error is concerned.
    Am I correct in my evaluation, or is there something else going on? More to the point, is there a way of fixing or working around the problem so that I can get reliable samples [even at 100-200x the bit rate]?
    As an aside, I've only been working with LabVIEW for a couple weeks; please tell me if I'm using poor habits or doing anything incorrectly.
    Any help will be immensely appreciated. Thank you.
    Attachments:
    IMU_serial_in.vi ‏61 KB

    Hi Ryan,
    I have a suggested methodology, but I don't currently have any example code to share that would get you started.
    The challenge you have is even if you sample at the exact right baud rate of your incoming signal, the phase of the FPGA clock will not be exactly the same as the source signal.  Now complicate that with your sample frequency and baud rate will always be slightly different, and you will get the sampling drift effect you described where data eventually is clocked in wrong.  On short transmissions, this may not be a problem because the sampling can be re-aligned with a start bit, but for long, continuous streaming, it eventually fails as the sampling and source signals drift out of phase.
    I would suggest over-sampling the DIO line, using a debounce filter if necessary, and use a measured time between edge detections to constantly adjust your sampling period and phase to keep your sampling aligned with the incoming data.
    The proposed LabVIEW code I imagine would be a single-cycle timed loop based state-machine.  Essentially the state machine could detect edges that occur near the baud rate you expect to receive, and then would adjust the sampling period to ensure you are sampling the data inbetween transitions while the incoming waveform is stable.
    With this method running at 40MHz, you would essentially have ~43 clock ticks/samples of each clock cycle at 921.6kbps, and you should be able to pull out the right samples at the right time in the waveform.
    Hope this helps, and if I find a good example of this, I'll send it your way.
    Cheers,
    Spex
    National Instruments
    To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be...

  • Asynchronous serial message read

    Hi, everybody.
    I have the message based device. I don't know when the device will send the message, so I didn't know how should I create the VISA read function to read whole string from the device(because it reads only data, which are enabled at serial port buffer).May be it can be done by using VISA bytes at port in while loop, but I don't know exactly how.Can you explain it to me?Or do you have any other solution?Thank you for your help.
    Solved!
    Go to Solution.

    Hi
    I reworked the basic serial read and write example, just to give you some programming hint. Also remember that then reading from the serial buffer, you do not need to read all the content. Read the number of bytes you need. The serial buffer is FIFO type. So the oldest content will always be first in the queue to read. 
    My example is somewhat simple, and I did not test it but should work. Check out queues and notifiers (in example finder) for more advanced programming techniques.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Basic Serial Write and Read async.vi ‏33 KB

  • Blocking sales view when serial number is active

    Dear all,
                 I want to block aq material. The basic data i.e. proc. view is alleadyu blocked, but the material will can sale. I want to block the sales view too. As there is serial no profile & serial level its not able to block the same. The poblem is serial level is improper in material, so when i m going to block material by sales view i.e. xdist. chain status & d. chain sp. status, while saving system throws an error "The field Serialization level is defined as a required field; it does not contain an entry". Even i given the serial level 1, again it throws an error" Asynchronous serial-/equipment numbers exist".
    How to block the material by sales view.
    Awaiting for reply.
    Thanks & regards,
    Manish K. Bachate

    Hi, Firstly if you have stocks along with serial number attached in the stocks then first you need to clear that, and then try to do the changes in 'Plant data storage 2' view in Material Master,
    Then also check in T-code OMS9 for u2018Field sel. Groupu2019 44 Field name u2018MARA-SERLVu2019 & u2018MARC-SERNPu2019 is mandatory w.r.t. Field reference for material master, if there then change that,
    Make new status for Sales purpose if required in OVSU & ten try to assign in material master.

  • Asynchronous communication using HSDIO

    All-
    I am trying to create an application for asynchronous serial communication using a PXI-6541 HSDIO card.  I have one RX and one TX line to/from the device I'm trying to communicate with. The device uses 25-bit words with the first 3 bits representing "labels" or commands.  There are only 7 labels that can be transmitted to the device and 2 that the it uses in response.  I currently have a sniffer set up so I can monitor the 2-way communication.  I am oversampling the data in WDT for viewing purposes but I am having a hard time extracting the data into something useable.  Has anyone used HSDIO for asynchronous communicaton and if so, can you send me some examples on how you triggered the data?  
    The serial bus is similar to Arinc429 http://en.wikipedia.org/wiki/ARINC_429 if that helps.  Any suggestions are appreciated.  
    Thank you!
    -Jason

    I was wondering, have you taken a look at the built-in examples under LabVIEW»Help»Find Examples»Browse»Hardware Input and Output»Modular Instruments»NI-HSDIO (High-Speed Digital I/O)? Under the Demo folder, there's one example called Dynamic Acquisition Hardware Start Trigger.vi. It has a pattern match start trigger option. 
    Just a thought...
    Nathan S.
    Applications Engineer
    National Instruments

  • Sync write with Visa 2.6/LabVIEW 6i

    I setup a vi with 2 parallel paths; one sends 100 bytes at 300 baud to COM 2, and the other 100 bytes at 9600 baud on COM 3. The path for 9600 baud should complete before the 300 baud path, but no matter what setting I select for VISA write (sync/async), the 2 paths will not run separately.
    What am I doing wrong?

    LabVIEW-man:
    You're not doing anything wrong, at least not based on what you've said here. Asynchronous Serial VISA writes aren't really completely implemented in NI-VISA 2.x but we're working on a better implementation for our next version (NI-VISA 3.0). Fortunately, there are a couple of possible solutions (workarounds) for you in the meantime.
    1) Put each VISA Serial write in a separate VI in a separate LV execution system. You can set this in the VI properties. LV will then call each VISA Serial write from a different thread. This is not the most elegant solution because it requires you to redo parts of your code.
    2) Assuming this is Win32, go into MAX and choose Tools>>NI-VISA>>VISA Options. Change the Minimum Async Transfer field from 102
    4 (the default) to something lower like 64. NI-VISA will then perform the Serial writes in separate threads even though LabVIEW makes all VISA calls to viWriteAsync from the same thread.
    Regardless of your platform, you should probably call VISA Set Buffer Size with mask 32 (I/O output buffer) and set it to a non-zero value. The default is 0, which tells VISA to not return from a VISA Write (sync or async) until all data bytes have been sent from the OS to the UART. In this way it is equivalent to other buses (such as GPIB) and if you are doing a query then you can immediately start your VISA Read operation. If you set the output buffer to a non-zero value (the exact value really isn't important because most OS's ignore it), then VISA will let its Serial write operations potentially return sooner. You should then call VISA Flush Buffer with mask 32 to guarantee that the data has been sent. This last part will likely *not* change in 3.0 because most users prefer knowing that th
    e data has been completely sent.
    Hope this helps,
    Dan Mondrik
    Senior Software Engineer, NI-VISA
    National Instruments

  • Hardware Needed for Cisco 2911 as a console server

    Hi,
    We need to setup Cisco 2911 router as a console server for OOB (Out of band) connectivity to console of each DC device (upto 20 devices) Could someone please respond to the following questions we had:
    1. What interface module can we install on the 2911 ISR for this purpose?
    2. What cable (part number please) will go to the that 2911-ISR interface slot and then we can connect the consoel ports of out network devices to that cable.
    It needs to be something similar to the cisco octal cable which I know we used for Cisco 2500 series for console purposes to other devices. But not sure about Cisco 2911.
    I would highly appreciate your information and help.
    Thanks
    Lovleen

    You would need an interface providing asynchronous serial ports. Something like the HWIC-8A or the HWIC-16A. Needing 20 ports you will most likely use one of each type (having then 24 ports).
    The cable to connect to the HWIC is the CAB-HD8-ASYNC. If you attach routers and switches console ports directly to the RJ45 plugs everything is fine. If you have other types of serial ports to serve (DB-9 or DB-25) then you need the according adapters. I don't know if they have product numbers...
    Or to have it all on one single PDF follow this link
    BR
    Björn

  • Do you GOOP?

    I have been programming LabVIEW for about a year, and am starting to
    get to the point where my programs are complex enough that I can get
    myself in some real trouble and create some real hairy looking programs
    if I'm not careful. So I've been trying to read up more on methods of
    maintaining order and structure to my programs. In doing so I came
    across the Graphical Object-Oriented Programming application note, and
    then the software download. It seems to add structure, but I don't
    like to use wizards to create stuff, they never seem to be an exact fit
    for what I'm doing. It seems to be a pretty big departure from what
    I'm doing, with a learning curve that could take a little while. I can
    do the class and object thing in C++ without much t
    rouble.
    So, has anybody out there tried implementing it? Is everybody doing it
    and I just didn't know about it until now? Is it worth it? I'd be
    interested in answers. Any GOOP believers out there that wouldn't mind
    sharing some example code so I can see some implementation?
    If you don't GOOP (or if you do), how do you handle programs that allow
    the user to make a lot of decisions (many buttons, controls, etc.)? My
    diagrams get so full of case statements and wires that it gets jumbled
    in a hurry. If you can share any examples you are proud of, I'd love
    to see some of the better more elegant implementations.
    Thanks
    Spencer
    [email protected]
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    In article <[email protected]> "Kevin B. Kent" writes:
    >Spencer wrote:
    >[snip]
    >
    >> If you don't GOOP (or if you do), how do you handle programs that allow
    >> the user to make a lot of decisions (many buttons, controls, etc.)? My
    >> diagrams get so full of case statements and wires that it gets jumbled
    >> in a hurry. If you can share any examples you are proud of, I'd love
    >> to see some of the better more elegant implementations.
    >> Thanks
    >>
    >> Spencer
    >> [email protected]
    >>
    >> Sent via Deja.com http://www.deja.com/
    >> Before you buy.
    >
    >Spencer,
    >Maybe I am hard of thinking, but I dont see that much advantage to using
    >GOOP
    >in my typical applications. I think OOP has it's place, but I think many
    >times it is
    >used simply because it exists not because it is the best solution.
    [ Deletia ]
    Some opinions from an occasional-to-moderate LV user. Corrections of
    misperceptions appreciated:
    I looked at the LV GOOP documents and worked through the examples presented
    there and also looked up some other introductions to OOP based on C++ and
    Java. My first impression is that [G]OOP imposes overhead and it was
    not clear to me where the payoff came, at least on the scale in which I write
    and maintain code. With reference to LV and DAQ in particular, I did not see
    how the process of isolating data from methods and the like
    affects the issues such as:
    1) Trying to understand complex diagrams with many cases and conditions,
    especially those written by others
    2) Understanding how dataflow and interrupts work together
    3) Talking to hardware and the timing issues that crop up
    3) has given me some troubles recently as I was working with serial I/O and
    with buffered DAQ. The specific methods of implementing solutions required
    going into VIs that talked to hardware and adding waitstates so that the CPU
    did not get hogged by one process over all the others.
    It was always my impression that waitstates were considered very bad
    programming practice as they make a program highly processor dependent. I
    would think that many of the areas in which GOOP is to have a major impact
    such as multiprocessor and/or networked execution would still depend
    critically on low-level routines and drivers which require specific attention
    to processor and configuration details. I believe it is only recently, with
    the beta release of VISA, that asynchronous serial I/O is implemented, for
    example.
    One place where I have seen some immediate usefulness of GOOP came from
    James Kring's timer VIs, posted to this group about a week ago. These VIs add
    some functions to LV that I needed and I have been using them with
    success. The key advantage is that reentrancy seems to be handled
    transparently. Create a timer, use it, destroy it and have as many as you
    need running simultaneously. James informed me in email that he used GOOP
    philosophies but not the Wizards in creating his code. His company's website
    (http://www.calbay.com) has some nice tips on state-machine architecture which
    I think will be more important to me in the short term than [G]OOP.
    Based on what I have read, [G]OOP is akin to the Pointy-Haired Boss management
    philosphy in which hierarachies are created for their own sake and in which
    the low-level tasks of getting something done are considered much less
    important. The Org charts do look pretty, though. I'd like to echo Kevin's
    statement that locals and globals do not appear to be intrinscially evil
    things. Ultmately they were the only way I could get some recent code
    implemented.
    Again, these opinions could be off-base and I'd be interested in comments from
    those who have successfully used these practices.
    --- Ravi Narasimhan
    Ravi Narasimhan
    Dept. of Physics and Astronomy, UCLA
    http://www.physics.ucla.edu/~oski
    [email protected]

  • Problems with asynchronous visa read with USB to serial port adapter

    I have an application that sends and recieves data from a power supply and on most computers (desktop PCs), the application runs fine. I found that on at least one computer, using a Keyspan Tripp Lite USB to RS232 adapter, in one out of 25 queries, I wasn't getting the whole reply back from the instrument. After some debugging I found out if I switch the VISA write and read calls from synchronous to asynchronous I don't see the error any more. Is there a way to disable asynchronous mode for that computer? I'd rather not have to find all the VISA write calls in my application and update each one just to support that computer.
    CLD (2014)

    Try playing with the Tx ACK Advance setting on that port first.  (From the Keystone config utility)  You might also look into the Rx FIFO buffer settings (16 is a short default buffer)
    There is no (Easy) way to universally disable Async .   VISA Async tranfers MAY complete synchronously anyhow (It throws a warning when that happens)  So if Keystone settings do not help you might want to swap out to a FTDI chip enabled USB - serial device.
    Jeff

  • CNiVisaSession::Read() Serial asynchrone, is it possible?

    Hello,
    System: Measurement Studio 6.0
    We want to use Serial with VISA in asynchrone mode (with handler if possible). We have made a small program (based on CDialog) to test it, but every time we call CNiVisaSession::Read(,,jobID) (jobID for asynchrone mode!), it returns VisaSuccessIoSync, why? (what conditions are missing; event queue in place of handler; or serial VISA cannot be asynchrone at all?)
    In fact, we want that CNiVisaSession::Read() returns immediately and uses asynchrone mode (actually, it blocks).
    We use the following code (in class CMyClass):
    Header:
    class CMyClass: public CDialog
    ViByte m_nSerialBuffer[255];
    CNiVisaJobId m_nSerialJobId;
    CNiVisaSession m_nSerialSession;
    void InitNIVisaSerial();
    ViStatus OnNIVisaEvent(CNiVisaEvent& nEvent);
    Body:
    CMyClass():m_nSerialSession("ASRL1::INSTR", VisaExclusiveLock){}
    void CMyClass::InitNIVisaSerial()// called from OnInitDialog
    // initialize serial
    m_nSerialSession.SetAttribute(VisaSerialBaudRate, (uInt32)9600);
    m_nSerialSession.SetAttribute(VisaSerialParity, VisaParityNone);
    m_nSerialSession.SetAttribute(VisaSerialDataBits, (uInt16)8);
    m_nSerialSession.SetAttribute(VisaSerialStopBits, VisaStopOne);
    m_nSerialSession.SetAttribute(VisaSerialFlowControl, VisaFlowNone);
    m_nSerialSession.SetAttribute(VisaTimeout, (uInt16)5000); //time out of 5 secs
    try {
    // we want the 0x0D character termination
    m_nSerialSession.SetAttribute(VisaSerialEndIn, VisaEndTermChar);
    m_nSerialSession.SetAttribute(VisaTerminationChar, (uInt8)0x0D);
    // OnNIVisaEvent is called on completion,ok
    CNiVisaEventHandlerId nID;
    m_nSerialSession.InstallEventHandler(VisaEventIoComplete, *this,
    OnVisaEventHandler(CMyClass, OnNIVisaEvent),
    nID);
    m_nSerialSession.EnableEvent(VisaEventIoComplete, VisaHandler);
    catch (CNiVisaException* e)
    e->ReportError();
    e->Delete ();
    // called from Read button
    void CMyClass:nReadBtn()
    // here we send asynchrone read, but every time
    // the command complete in synchrone mode, for which raison?
    ViStatus nStatus = m_nSerialSession.Read(m_nSerialBuffer, 255, m_nSerialJobId);
    if(nStatus == VisaSuccessIoSync) // go always in this condtion after timeout
    AfxMessageBox("Reading synchrone");
    Thanks a lot,
    Alain

    Alain:
    NI-VISA performs asynchronous I/O differently based on the bus type and whether you are using the queue or the handler. For Serial, to make the callbacks work efficiently, there is a threshold level that you need to set in MAX. Go to the Tools menu and choose the VISA options. Set the Minimum Async Transfer to a smaller number of bytes (probably 250) and then try your application again. It should now do the I/O in another thread, and that is the thread where your callback should occur. You can verify this in NI Spy.
    Dan Mondrik
    Senior Software Engineer, NI-VISA
    National Instruments

  • Mapping asynchronous to a serial interface

    Hello everybody,
    i got an ISR3845 with PVDM2 inside. The goal is to map a incoming call depending on the caller number to a dedicated serial interface.
    How do i configure a static mapping from a asynchronous to a dedicated serial interface ?
    Thank you very much for your support
    regards
    stephan

    You have to install NI-VISA.
    It is possible to avoid this seperate install by including all of the required support files.
    I believe there is a knowledge base article that lists all of the files that need to be included in your build.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Serial asynchronous architecture

    Hi,
    I have a problem with which way would be best in terms of some architecture.  At present I have an existing program which consists of 4 asynchronous loops running in parallel.  Each loop is a state machine which is controlled via a global notifier to start the state machine off.  I also have 4 Marposs digital acquisition systems for which i have written the Drivers from scratch using VISA.  All of these marposs devices communicate through 1 serial port.  I have successfully, in isolation managed to acquire data using the three vi's listed below.
     - Start Acquisition (Start.vi)
     - Read Digital Array Values (Read.vi)
     - Stop / reset Acquisition (Stop.vi)
    This gives me data acquired from the device timed in the hardware at say 0.25mS/Sample (Which i need this speed)
    The problem I have is in putting this same process into each of the 4 mentioned asynchronous loops.  I know they will cause conflict as they stand.  However I was thinking of putting the Acquisition into a Daemon and only executing the acquisition (With a notifier / rendezvous) when all stations are ready for measurement.  This I have done in the past however I believe this could have an adverse impact on throughput, which is already close to specification Limits.
    Another method maybe to put the subvi's into some kind of wrapper which has some kind of access control?
    Is it possible to put each of the Marposs devices onto a virtual Serial Port? even though they use one Physical Port? <-- Long shot but would be nice!
    I am hoping someone has already had a similar problem to this before and can advise me on the proper way forward.  If not i think i will go ahead and go down the daemon route, which i am not too keen on doing.
    Thanks in advance
    Craig
    LabVIEW 2012

    Hi, Thanks for the Questions.
    The Units are on a RS485 bus going through a USB adapter (Not Ideal).  The units used to be polled in a similar fashion you suggested.  However this is not enough for our needs as we need to profile the measurements for better accuracy and post processing etc.  What the new method needs to do is Tell that probe to start Acq, wait untill part / movement has been made then collect that data from the FIFO within the hardware.  At the moment there are 3 low level vi's that have this functionality but I am having trouble trying to see how these might go into a Daemon type polling loop which can supply all 4 asynchronous stations.  Each station is in effect a state machine which sets a bunch of automation controls in a sequence then "Measures"using the Marposs devices so I suppose the timing for the acquisition is indeterminant to a degree unless some sort of notifieris used.
    LabVIEW 2012

  • Questions on the @ServiceClient annotation and Asynchronous webservices

    1. Is their a way to invoke a webservice in an asynchronous manner without using the @ServiceClient annotation? I’ve tried a few things to get access to the async versions of the web methods and each time I get an exception stating “java.rmi.RemoteException: Asynchronous methods can only be invoked from stubs with the ServiceClient annotation”.
    2. Is their anyway to generate a dynamically sized array of service port variables with the @ServiceClient annotation? All the examples that I have seen only have a single port variable annotated with @ServiceClient. I’ve tried creating a class that uses the @ServiceClient annotation, and while it does compile it fails when I try to invoke the services methods. I also found in some documentation a restriction that the @ServiceClient annotation can only be used in the core java (jws) webservice class.
    3. Is their a way to use a single service port variable with the @SeriviceClient annotation to invoke multiple calls to an asynchronous web method if that web method is part of a conversation? When I tried this I found that even though the asynchrounous calls were going out with any problems they were being processed serially on the target services side (I assume due to the conversation).
    The problem I am trying to solve is I need to invoke a stateful webservice in an asynchronous manner multiple times from the same starting service.

    Hi
    That is how I understand that document:
    Locking: Forms, by default, locks a row as soon as the user starts modifying the data. That is pessimistic locking. Apex, on other hand (and optionally forms also) do not lock the record, but before applying any changes checks if the data has changed since the user queried it (what for some reason is called optimistic "locking")
    DB connections: I am not sure why they used the terms synchronous/asynchronous, but the difference is that Forms, by default, keeps an permanent DB connection while the user is using the application, while Apex gets a connection from a connection pool every time a page is requested/submitted.
    Architecture: Forms (in its web version at least) has 3 tiers: the browser, the appserver where the forms service runs and the database. As Apex runs inside the database, there are only 2 tiers: the browser and the database (though you still may need an http server in between which serves static content, I don't think it is considered part of the application in this context). If you are talking about client/server forms, then there are only 2 tiers.
    I hope this helps!
    Luis

  • How can we tell if a VI is already running before calling Start Asynchronous Call?

    The new Start Asynchronous Call node is awesome for spawning multiple instances of reentrant VIs.  However, I've stumbled a bit in using it for non-reentrant VIs.  The old practice of using the "Run VI" method would allow us to check the Execution.State of the VI before invoking the method to run it.  That way if the State was Running or Run Top Level, we could skip the invoke node and just use a property node to open its front panel.  WIth the Start Asynchronous Call node, it looks like we have to use a strictly typed static VI reference, and when we open the VI reference, the VI gets reserved and its Execution.State = Running.  So, how can I tell if it is not just reserved by the thread but actually executing before making a redundant Start call?
    By the way, the redundant Start has interesting behavior.  It will actually cause the targeted VI to be executed again after it stops.  Even if you hit the Abort button on the target VI, it will immediately execute again and again equal to the number of times the Start Asynchronous Call node was run.  There's nothing wrong with that, and I suppose the simple answer is to just go back to using the old "Run VI" method.  It's just that the ability to wire up those inputs directly to the connector pane is so nice.  Perhaps I am missing something obvious.  Oh, I am referring to the Call and Forget mode (0x80).
    Thanks,
    Dan
    Solved!
    Go to Solution.

    Just throwing it out there, I know I'm a year.5 late on this but if it's a psuedo-modal dialog or some other window that you only want a single instance visible at one time, you can check the FP.State property on the strictly typed vi reference. If it's loaded and visible to the user it will be "Standard", if it was closed or not opened prior then the state will be "Closed".
    I think the standard behavior of serializing execution on another thread would be great for doing a pre-set number of iterations with a sub vi in a non-blocking sort of way but for sub vi's meant for UI interaction checking FP.State works.
    Philip
    CLD

Maybe you are looking for

  • Additional field in adhoc query

    Hi all, I need to be able to report on the IT105 subtype 0001 system ID for employees who are withdrawn from the company, however, when someone leaves their IT105 record is delimited so adhoc query will not output anything.  Has anyone coded an addit

  • IPhone 5 won't download apps. I click the button to purchase and it starts to install but then cancels it. help

    Hi all, I recently just got an iPhone 5 and I discovered that I am unable to download apps on the phone. The minute I click the download button on the apps store, the button will download, immediately stop, and return to having the plus sign signifyi

  • HD DVR QIP 7216-1, sound and picture issues.

    Just got fios yesterday, and i am very pleased with picture quality. although right from start, i had issues. First off, I run the HDMI cable right into my receiver Onkyo TX-SR606 and then from there into my TV. Well, i saw a green screen. No big dea

  • IPad mini screen remains blank.

    Hi, I have had my mini for about a year now and just ran into a problem where an app I was using started to freeze. Closed the app and deleted it. My mini started acting weird then out of no where the screen went blank as if it died. I charged it, I

  • Email duplicating

    I started using my new iPhone 3g on Tues. Got the email inbox to work, but no outgoing. On Wed. both my PC desktop and laptop started receiving emails in duplicate, along with the inbox on the iphone. ATT hosts my mail and tech says no way to differe