Multiple copies of functional global using vi references

I have several producers aquiring data into a functional global (one functional global per producer). These functional globals are identical except for the name. Would it work to have only one functional global VI and obtain a separate reference for each producer? The matching consumer would also use the proper reference to consume the data.
The functional global contains an array of the data which must be parsed by the consumer. It is possible that the array of data may not contain a complete set of data on a single "store" operation by the producer. The consumer, of course is written to check for a complete data record before completing processing on the record.
Solved!
Go to Solution.

Les__Bartel wrote:
tst wrote:
Regardless of whether there is a better way, the answer to the question is yes. The FGV needs to be reentrant and the reference you open needs to be reentrant too and then you can use the CBR node to run the specific copy of the FGV.
I thought a reentrant vi would not maintain the state of the uninitialized shift register from one call to the next.
A reentrant VI will maintain the state of its uninitialized shift registers.  However, you need to be really careful how you do this.  First of all, you need to make sure it is set to Preallocate Clones.  What will happen in this situation is that each different place you call that subVI will each be a different clone.  This means that each call will have its own data.  The problem with this is that you can't share the data across multiple instances and therefore multiple loops.  If you don't believe me, go play with the Mean Point By Point VI.
So what happens if you set it to shared clones?  A big freakin' mess.  You will have no control over which clone will be called where and there will be some major data corruption.
This is why FGVs are almost always non-reentrant.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Multiple copies for Payment advice using standard program RFFOAVIS_FPAYM

    Hi Experts,
    I have one requirement, need to print the payment advice form twice (one for account section and other for vedor). According to the existing process it uses standard SAP print program RFFOAVIS_FPAYM OR RFFOUS_C (for cheque payment) to print the output.
    When I tried to print the output by giving number of copies, it prints test pages but not the actual output. The actual payment advice note with proper values getting printed only once. I actually need to print this actual payment advice note twice.
    Do you experts know how to achive this? is there any configuration available to get this requirement? OR how can i do this without chaning Standard SAP program?
    Thanks in advace for your help..
    Regards,
    Prashant

    Hi,
    2 times printing can be done using Sap script.however, it would call for changes to your driver prog...
    in function call CALL FUNCTION 'OPEN_FORM'....u need to add  g_ITCPO-TDCOPIES = '2' and pass g_itcpo to OPTIONS structure of the FM.With this you can ahve 2 copied of ur output. I just test printed it.
    So in your case as yours is a standard program, you could probably create a copy of the Standard program and  add the above logic in your program.
    hope this help
    Cheers,
    Varna

  • Generate Multiple copies of same Invoice using XML Publisher

    Hello All
    I have a requirement wherein the existing XML report Output should print the same Invoice twice one orginal and one a Customer Copy.
    i.e say Earlier the Invoice was INVOICE-ABC Customer and ran into 3 pages with Page 1 of 3, Page 2 of 3, Page 3 of 3.
    Then now the requirement is to print same once more with a new Heading Invoice Copy- ABC Customer Page 1 of 3, Page 2 of 3 Page 3 of 3.
    Has any one of you faced a similar requirment.
    Suggestions/Inputs would help a lot.
    Thanks!!

    as idea
    create main concurrent and run INVOICE-ABC Customer and Invoice Copy- ABC Customer by
    fnd_request.submit_requestso if you want to use one template and changing Heading for 'COPY' then you can add parameter for invoice concurrent for identify type (copy or not)
    so in parameter not 'COPY' then Heading is 'INVOICE-ABC Customer' else 'Invoice Copy- ABC Customer'
    if you can't change template then copy and change Heading and in main run two concurrents

  • Using an iTunes card to purchase multiple copies of an ITunes item

    Does anyone know of a way to purchase multiple copies of an app using an iTunes card for a single account?  I know that Apple offers a volume purchasing program however all items are not available in the program such as books and videos.  I am open to legal suggestions if this is not possible.

    The MAS is a complete mess for non-individual purchases. I handle most of the Apple purchase orders at my college and for digital distribution via the MAS the key is number is a quantity of 20 or more.
    First of all, you should have some kind of contact within Apple's NZ Education Sales department. If not, you should find out who that is.
    For FCPX, if you need three copies, you need to create three individual Apple IDs and make three separate purchases. This is absolutely asinine, but that's how it's setup. Even better, in America, there's no way to become tax exempt, so they charge us tax and then we have to request a refund, where they then mail us a paper check.
    If you want 20 or more copies of anything, I contact my Edu sales rep and get a quote for it, then we pay via purchase order. Then we receive an E-Mail with individual MAS redemption codes for the number of licenses we ordered. Then you just redeem one code, download the app, and deploy it out, either through ARD (Apple Remote Desktop), or however else you want to.
    So in summary, try to order 20 or more of anything. Once you hit 20 there's a price break of roughly 50% and your Apple NZ Edu sales rep should have a PDF of their Edu product matrix pricing. If you order less than 20 of a product, it's a huge pain in the ***. Establish one centralized MAS Apple ID, or at least one per dept. For example: [email protected] (music dept's redemption account). Redeem one code for whatever App you've purchased, deploy the rest out however you prefer and just keep track of the amount of licenses you've used vs. the amount you've ordered.

  • Function global shift registers

    Hi all,
    I have a functional global that has multiple function.  I can create a file and store the reference in a shift register, open that file and append to it, close the file, etc. 
    If I need to create and append for two files, I can't just use that function, since the reference would be lost.  What would be the best way to use functional global to save reference and process multiple files? 
    Thanks!
    Yik
    Kudos and Accepted as Solution are welcome!

    jyang72211 wrote:
    Hi all,
    I have a functional global that has multiple function.  I can create a file and store the reference in a shift register, open that file and append to it, close the file, etc. 
    If I need to create and append for two files, I can't just use that function, since the reference would be lost.  What would be the best way to use functional global to save reference and process multiple files? 
    Thanks!
    Yik
    It really depends on how you want to control which of the files get acted on. You could duplicate all of the code for another and add actions unique to thta file or you could keep an array of file refs internally and use a "reference" to control which file you are working on at that call. But if you are going to pass a ref around, it might just as well be a ref to a LVOOP class and that's where mtat's reply comes into play.. but that is hardly an Action Engine answer.
    So please tell how the new file compares with the other and to what extent you see this growing in the future.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Printing Multiple Copies of Same Image on Multiple Pages

    I have Photoshop Elements 11 on a Windows 8 platform.  I can NOT get it to print multiple copies of the same file on multiple pages.  I need one file printed on one page multiple times.  I have tried the CTRL-ALT-SHIFT and nothing changes.  It still just prints one and is done.
    I use this for label printing, so I need it to print more than one copy at a time.  It also is not saving the settings, so everytime I hit print, I have to readjust the print requirements.  This just is not going to work when you need to print a few hundred copies at a time.

    You can create your own picture package, if none of the options in the PSE print window>Type of Print work for you. Just make a blank file, copy/paste your image and alt drag it to make multiple copies. You can use the move tool to position things as you want them.
    Generally speaking, though, for something like label printing, it's simplest to use PSE to create the image, then use your word processing/desktop publishing program to print the actual labels.

  • Problem with 4250dtn printing multiple copies Windows 7 64 bit

    We can't print multiple copies from within some, but not all, applications to a Laserjet 4250dtn from Windows 7 64-bit workstaitons.  Windows 7 32-bit ones work fine.  The printer is served from a Server 2003 printer queue, but even when we print direclty to the port we only get one copy. Setting copy count from the printer dialog works fine, but we need to have the applications invoke multiple copies. We are using the UPD 64-bit driver;  could not find a legacy driver for this printer for Win 7 64 bit. I've tried various tricks found elsewhere on this forum, including turning off mopier mode, printing directly to the printer, disabling advanced features, etc. to no avail. Help, anyone! Thanks. Jerry TurnbowUSBO

    Thanks very much for the feedback. I was getting worried!
    The command window opens when I double-click on the Developer Day VM and I get a few lines that scroll off the window about loading Linux .... These lines never come back and I can't scroll in the command window.
    As soon as the above messages come into the command window the whole process stops. The window stays open but I get no response from it. I get no login prompt or anything.
    Do you think it could be a VirtualBox setup issue? I downloaded and installed the product along with the extension pack with no apparent problems and when I start VirtualBox I see the Developer Day VM listed in the left panel. All I do at that point is double-click it like the download web site said but I don't get the same results, i.e. no chance to login. It seems all I can do at that point is close the window by clicking the 'X' and it asks me 3 things about what to do with the VM and I usually say to shut it down. None of the other options look any better either.
    Any other suggestions are most welcome!!
    Thanks again!
    -gary

  • 1300 suddenly stops printing multiple copies

    My Laserjet 1300 suddenly stopped printing multiple copies. I am using the driver supplied with win7 and it has been working for the last year. I have tried installing PCL6 driver instead of PCL5 and I can print multiple copies for one job only and then the computer does not recognize the printer. Has HP sent an update that has changed the way win7 works with the printer? Any one with a solution or idea?  Thanks, John

    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial printer. You can do this at Printers - LaserJet.
    Click on New Post.
    I hope this helps.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Create Multiple Copies of a Field - Mac

    I'm trying to make multiple copies of a field using DC on a Mac. The directions/support indicate that I should "right click" on the field - which, of course, cannot be done on a Mac. So how do I create multiple copies of a field on a Mac?
    In general, all of the directions for creating forms assume I am on a PC. Where/How do I find directions for creating forms with DC on a Mac?
    Thanks,
    Lawrence

    Hi Lawrence,
    Please let me know the os version and hardware model of your mac.
    Please refer this link, it 'might' help with your mac right click issue - http://www.wikihow.com/Right-Click-on-a-Mac
    I have replicated this issue for you on my mac, please refer the below screenshot and let me know if you still face a challenge.
    and this would lead to the following window :
    Now does this helps? Please feel free if you still have any question.
    Regards,
    Rahul

  • Do I need to use a semaphore when reading/writing a functional global from reentrant VIs?

    I have a program that spawns multiple reentrant VIs running simultaneously.  These VIs write their status to a functional global.  The VI that monitors them periodically polls this global to check out how they're doing and takes action based on their collective status.  (BTW, I'll mention that this monitoring VI is NOT the parent that spawned the reentrants, just in case this might affect memory management as it pertains to my question.)
    Anyway, 90% of the time, stuff goes off without a hitch.  However, once in a while the whole thing hangs.  I'm wondering if there's any chance that I've overlooked something and that some kind of collision is occurring at the global.  If that's the case, then should I be setting a semaphore for the global read/writes?
    And, if this is a problem, then there is something deep about functional globals that I don't yet understand.  My notion of them is that they should negate the need for a semaphore, since there is only one global instance, which cannot be simultaneously called by the various reentrants.  Indeed, this is arguably THE WHOLE POINT about functional globals, is it not?  Or am I missing something?
    Thanks,
    Nick 
    "You keep using that word. I do not think it means what you think it means." - Inigo Montoya

    Thanks Uwe,
    This is a good hunch.  However, functional globals typically run at "subroutine" priority.  With this priority, it is not possible to select a specific execution system; it is always "same as caller."
    I will try your suggestion by switching to "time-critical" priority.  However, I do not know if this could lead to a different set of issues (non-determinism?).  It will probably take a little while to hear back from my guys on whether this makes a difference or not, because the error is sporadic, and sometimes doesn't come along for quite a while.
    While probing all of this, I looked at the execution settings for my reentrant VI.  It has standard settings: "normal" priority, running in the "same as caller" execution system.  My impression has always been that LV creates the clones with unique names.  This allows the clones to be in the same execution system with no problem, and the fact that the execution dialog allows me to choose "same as caller" for a reentrant VI supports this assertion.  This is logical, since there could potentially be many more clones than available execution systems.  "Preallocate clone for each instance" is selected, which is what I want, I think, though I don't know if it matters in my application.
    In summary, I am trying out your suggestion, but with skepticism.  Any other suggestions from anyone out there?  Any misunderstandings on my part that need clarification?
    Thanks,
    Nick 
    "You keep using that word. I do not think it means what you think it means." - Inigo Montoya

  • How to use functional global with a large amount of variables?

    Hi all,
    I'm currently developping a LV program which control and acquired data from a device. Up to now I used global variables ( very conveniente to use for experimental parameters). But now my program is become to be too large and I have too much "global" variables to continue to use a global.vi.
    I'm wondering if functional global can help me. If someone has an exemple of how use functional global with a large amount of variables...
    thanks

    I agree with Ben.
    Using queues is better than a number of Globals or Action Engines (Functional Globals).  If you need to pass data to a sub-vi, you can simply wire the queue out to a queue control of a sub-vi, or a reference.  See attached example of passing data to a sub-vi using a queue.  The example is an extremely simple, undocumented tid-bit of code that sends the loop count to the consumer VI.
    Run the main program called QueueProducer.vi.
    R
    Attachments:
    QueueProducer.vi ‏18 KB
    QueueConsumer.vi ‏14 KB

  • What's wrong with a "regular" global in this case? AND WIl ActiveX objects stored in functional globals remain valid (when used in an executable)?

    I've written a plugin layer for a LV executable.  When this layer makes a call to the plugins' initialization functions, I want each plugin library to be able to initialize and maintain its own global memory (where things like VISA resource names or ActiveX objects are stored).  However, I've found that I can't manage to keep my global VIs "alive."  I'm inclined to switch to functional globals, but I suspect that this will be a problem for things like ActiveX objects (that in this particular case reference a CAN interface).  I believe that the functional global will indeed store the object from run to run, it's just that I'm somehow disinclined to think that the object will remain valid.  I think you'll have to re-initialize it.  Can anyone speak for or against this hunch?  (If you can't tell, I'm trying to avoid building a whole little test executable just to debug this problem.)
    I suppose the more profound question is "Why don't the globals stay in memory?"  I'm attaching an image of what the application layer that calls the plugins' intializations looks like.  Next I'm attaching an example of an actual initialization routine.  You'll notice that I've even gone so far as to explicitly open the ref to the global VI that I want to keep in memory.  Then I just leave it there dangling - but it still gets dropped!  In my mind I shouldn't even have to do this, since the dynamically-called subVI "MC_CMO Init.vi" actually initializes the globals and runs with AutoDisposeRef = False. 
    Lastly, this is my first-ever attempt at writting plugin software.  So if you look at my code and have any criticisms/pointers, I'll greatly appreciate them.
    Thanks in advance,
    Nick
    "You keep using that word. I do not think it means what you think it means." - Inigo Montoya
    Attachments:
    AppLayer.JPG ‏60 KB
    InitPlugin.JPG ‏103 KB

    I am not sure if I follow you completely on your work-around.
    Everything I have to say on this topic is based on obesrvations and threads I have read on Info-LabVIEW. Therefore it is subject to corecttion by those who know better.
    LV is smart enough to know when "something" that had been opened, can be closed. It is not perfect.
    If for instance you open a VISA refnum and pass the refnum  to a LV2 AS A REFNUM the refnum in the LV2 stay alive as long as the VI's are running.
    If you start another VI that uses the LV2 to fetch the refnum, it should get a valid ref as long as it starts before the first goes idle.
    You then be able to work with refnum usign the VI launched second as long as stays active.
    I often create action engine that can be invoked where required throughout an application. If the action engines get a ref in one state (like init) and use it another, I will generally write a "tester" that calls the action engine action to test the engine. In this case, my "tester" stays live and it keeps the ref's fresh.
    I suspect if you tried to trick LV you could. If you type cast the ref nums to I32 and stored those in a LV2, I could see how LV could loose track of the resource sharing, but that is something I would avoid.
    So I encourage you to do some experimenting with keeping track of who's running when to see if your work-around will work.
    If you think you understand it better than I explained it, please post.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Functionality in SAP to allow you to print multiple copies of a form

    I've been asked by a SD functional team member how to: 
    This is the table and field names for  Number of Messages functionality in SAP which should allow you to print multiple copies of a form at one time.
    Program Name:SAPMV13B
    Screen #:0211
    Transparent Table: NACH
    Field Name: ANZAL
    Data Element: NA_ANZAL
    How do I go about setting up this functionalilty?
    Thanks,
    Laurie

    Hi Laurie,
       There are three possible ways -
       1. Predefined number of copies - You can define number of copies in the print parameters while creating condition record. Ask you functional team member how they are setting up condition records. You have an option to setup print parameters on condition record screen. This is the only option if you are using output determination.
       2. If you have an isolated print program then you can choose to let user enter print parameters by using parameter " DIALOG = ' ' " in "open_form".
       3. If you have an isolated print program and do not want to let user control other print parameters you can take input from user ( or hard code ) number of copies and use that in parameter " OPTIONS " in "open_form".
    Cheers,
    Sanjeev

  • Advise on using DBMS_XA with multiple branches under one global transaction

    Dear all
    I need some advise on using DBMS_XA from PL/SQL with tightly coupled multiple branches under one global transaction. Basically, I've successfully written some PL/SQL code that in 3 different sessions attaches to 3 different branches of one global transaction and before ending each branch they can see each others uncommitted data. So far so good.
    However, I'm not sure I completely understand how each branch must call xa_end, xa_prepare and xa_commit correctly using two phase commit and my calls result in errors like:
    ORA-24767: transaction branch prepare returns read-only (XA error code 3 = Transaction was read-only and has been committed)
    ORA-24756: transaction does not exist (XA error code -4 = XID is not valid)
    ORA-02051: another session or branch in same transaction failed or finalized
    This is the structure of my programs (3 SQL*Plus sessions):
    main: Uses xid 123|0 (branch 0 of global transaction 123). This should be the coordinator that commits using two phase commit across the 3 branches
    m1.xa_start tmnoflags
    m2.DML
    m3.Wait for thread A + B to manually be started and run xa_end
    m4.xa_end tmsuccess
    m5.xa_prepare
    m6.xa_commit false
    thread A: Uses xid 123|A (branch A of global transaction 123)
    a1.xa_start tmnoflags
    a2.DML -- thread A can see main and thread B's data
    a3.xa_end tmsuccess
    a4.xa_prepare -- required?
    a5.Should we also call xa_commit false?
    thread B: Uses xid 123|B (branch B of global transaction 123)
    b1.xa_start tmnoflags
    b2.DML -- thread B can see main and thread A's data
    b3.xa_end tmsuccess
    b4.xa_prepare -- required?
    b5.Should we also call xa_commit false?
    The failing steps are:
    m5
    m6
    a4
    a5
    b4
    b5
    Before starting calling xa_end I see 3 rows in V$GLOBAL_TRANSACTION, eg (hex 7B = decimal 123):
    FORMATID GLOBALID BRANCHID BRANCHES REFCOUNT PREPARECOUNT STATE FLAGS COUPLING
    203348753 0000007B 00000000000000000000000000000000 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    203348753 0000007B 0000000000000000000000000000000A 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    203348753 0000007B 0000000000000000000000000000000B 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    Thanks a lot in advance.
    Cheers
    Finn

    OK, I've figured it out. This is poorly documented as it's not well explained how to handle the various return codes. Turns out that all but the last xa_prepare calls return dbms_xa.xa_rdonly (tightly coupled branches are combined -- "read only" optimization), the last one returns dbms_xa.xa_ok and this is when you should call xa_commit.
    Now my next problem is that DBMS_XA doesn't work from within jobs (DBMS_JOB and DBMS_SCHEDULER), which makes it very difficult to use DBMS_XA. My purpose of using DBMS_XA is to coordinate work across multiple sessions in one transaction but if I can't easily create the multiple sessions, I'm stuck.
    When called from a job, xa_start throws:
    ORA-24789: start not allowed in recursive call
    on Oracle 11.2. In Oracle 11.1 it works, but xa_end fails with
    ORA-25352: no current transaction
    so I guess in fact the xa_start call didn't really work either, even though it returned tm_ok.
    I'm now trying to find a workaround on how to use DBMS_XA from within jobs, please comment if you have any suggestions. Or if you have any suggestions on other means of establishing the concurrent sessions (I wouldn't like to resort to external programs that need username/password to connect as password management would be a security issue).
    Thanks in advance.
    Cheers
    Finn

  • We have a large family, 5 kids and two adults all with iPads, iPhones, Mac Books, Servers....  How can we combine our purchases to use on all our devices.  We have two Apple ID's and sometimes buy multiple copies because of how we are limited...

    We have a large family, 5 kids and two adults all with iPads, iPhones, Mac Books, Servers....  How can we combine our purchases to use on all our devices.  We have two Apple ID's and sometimes buy multiple copies because of how we are limited...

    Hello Halfback71,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/ht5622
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    Best of luck,
    Mario

Maybe you are looking for

  • How to call User Define Function

    Hi, I need a help.... In my Project I have Login.jspx page in which there is a textbox Username. I have second success.jspx page which has its success.java bean class in which i have define a method "display()".Now i want to cal display() in my succe

  • SNP Data extraction issue

    Helllo to all community. We have custom Planning Area-Planning book-Data view for some Capacity calculations. Also we added some custom key figures with 001 shemantics (LC Time Series) and we use them to make and store different calculations in Plann

  • Captivate 3 not listing app I want to record

    I'm testing Captivate 3. I'm trying to record an activity in my company's application. I select Record new project, then select Software simulation, Application. Then I get a dialog box that asks me to specify the application I want to record, but it

  • Usb 3 card for ENVY Phoenix 810-003a

    Hello All, First time poster. could somebody advise me as to the best, or at least, compatible USB 3.0 pcie card for my new HP ENVY Phoenix 810-003a . 4 ports are preferable. Thanks in advance. R

  • Aktivierungsproblem mit Aktivierungsnummer für Photoshop aus Creative Suite 1.1 unter Windows 8

    Mein Photoshop aus Creative Suite 1.1. hat 30 Tage unter Windows 8 funktioniert. Jetzt funktioniert die Aktivierungsnummer weder online noch telefonisch. Ich nutze das Programm nur auf 2 Computern. Der neue Computer ersetzt einen alten.