Mini-Nugge​t Creating Typedef'd queue references

Transfering typedef'd data using queues used to be tedious if the typedef changed and the transfering queue reference is passed between VI's using controls. The tedious part was updating all of the controls for the queue ref since they would not be linked to the typedef of the data the queues transfers. This Nugget exaplains how to create a queue ref that is tied to a type definition.
1) Drop an obtain Queue
2) Create, drop, and wire a typedef of the data that will be transfered by the queue.
3) pop-up on obtain Que output and select "Create Control"
4) Find created control and pop-up to select Advanced >>> Customize
5) In control editor use the control palette >>> "Select a Control ..." and browse to the typedef from step #2
Note:
A) The typed must be dropped on the pink boxes
B) The marching ants around the queue ref control confirms you are dropping in the correct location.
6) Save the queue ref control as a type def.
If you look at your hiearchy you will see that the typedef'd queue ref is using the type def from step #2.
I hope this helps!
Ben
* This works in LV 8.6 but not in LV 7.1. I am not sure in which version the feature was introduced.
Message Edited by Ben on 11-11-2008 02:21 PM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Solved!
Go to Solution.
Attachments:
Drop_Obtain_Que.JPG ‏19 KB
Drop_n_Wire_Typedef.JPG ‏21 KB
Drop_TypeDef_in_Control.JPG ‏41 KB

That sounds about right.  I started doing this about LabVIEW 7.0 when I started using single-element queues for reference objects.  I always used the "create control, customize, save" method for creating the strict typedef reference, since it did not update correctly by itself in 7.0.  There were a lot of changes made in 8.0, some of which resulted in some fairly nasty crashes and hangs on type propagation (always modify your cluster with nothing else open in 8.0).  These were fixed in 8.2.  At this point, type propagation seemed to work OK.  However, I have been through a lot of versions of LabVIEW and have learned never to trust my memory on things like this.  Try it.  If it works, you are good .
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • Queue Reference on a DVR?

    Hi All,
    I am trying to track down a bug in my code to no avail (so far). I wanted to check if my problem is caused by a 'feature' in LabVIEW while I continue to tear (whats left of) my hair out.....
    Here is what I'm doing:
    I create my 'communication queues' in my toplevel vi. These are unnamed. My toplevel vi is a queue-based state machine. I'm using OO by reference. Therefore the place where I've stored my reference is Object>DVR>Cluster>queue reference.
    Using the toplevel.vi I kick off a user interface. I do this by using Static VI reference>SetVal to pass the object/DVR value to the UI and then >Run (wait til done false) to start the UI.
    And here's the problem: when put an element on the toplevel state-machine queue using the UI its not received by the toplevel state machine. 
    Here's what I've looked at to try and find out what the problem is
    The element is placed in the queue with no errors
    The references are valid
    One this I did notice is that when I probed the reference hex numbers they are different - my understanding was creating a new queue reference by name would give two different references to the same queue in memory (and so they have to be closed). But in my case I only create one reference to the queue, put it in my DVR and remove it as needed.......so what are the values different?
    I've used this same architecture already in this project but in this case I didn't put the queue references on the DVR - instead I opened new references by name whenever I communicated between modules. This worked fine......but I'd prefer not to restrucutre my code if I can avoid it!
    If anyone can offer suggestions that I can check or indeed if this is a 'feature' which has come up before I'd appreciate any comments,
    Thanks,
    Dave
    Solved!
    Go to Solution.

    Hi All,
    Please disregard the comments about the reference hex numbers being different - I built a very simple test program to make sure performance was correct and found that it was. In my test code both reference numbers are identical as should be expected! Its a common/garden bug causing my problem not a LabVIEW 'feature'......just gotta find the bugspray now!
    Dave

  • Opening/Closing Queue Reference By Name

    I'm curious if opening and closing a queue reference to put information onto the queue, using the queue name -> obtain queue -> enqueue -> release queue(Non Force) is problematic.  I thought i saw a thread a long time ago that opening/closing a reference to a queue over and over could lead to a memory leak, even if the original queue never was released.  Obviously, i'm ignoring the general pass the wire(by value) correct labview way. 
    Instead of opening/closing using the queue name i could also wrap the queue reference in a FG after originally creating it and work on the reference that way. Ignoring the "right way to do it" are there still downsides, other than programing correctly, to open/closing queue reference's in this fashion such as memory leaks.

    PaulG. wrote:
    I have never heard of any unwanted consequences of repeatedly opening and closing any reference. The trick is to make sure a reference gets closed when no longer needed. I don't see any reason not to implement queues the ways you describe. I've done all three and haven't had any issues that I know of. If opening and closing a queue reference repeatedly caused a memory leak that would be considered a bug.
    I have to disagree here. A couple of years ago I was using a DAQmx Write with "autostart" option set to TRUE in a loop (ca. 100ms timing) to constantly make sure, that in application standby my Digital Outputs kept the values they ought to have. This reproducibly caused a blue screen on Windows after 6 hours of the program running in standby. As it turned out, LabVIEW was using a new reference to the task for every call of the Write, because with autostart set to TRUE it had to create the task beforehand and close it afterwards. After the mentioned peroiod of time, LabVIEW ran out of reference numbers, as the support explained to me.
    Of course, even LabVIEW Help says to avoid using autostart=TRUE with DAQmx VIs in a loop, but only because of the overhead the repeated Create and Clear is consuming. Naturally, I have learned that the hard way now.
    So - Create the reference once, use that same reference all the time (FG is fine, I think - I use this method for obtaining my logfile reference all over the place!) and close it only, when you don't really need it anymore.

  • When do VI and queue references become invalid?

    Hi all,
    I have a fairly complicated problem, so please bear with me.
    1)  I have a reentrant SubVI (let's call it VI "Assign") that has an input cluster of (VI ref, queue ref) (let's call the cluster type "Refs").  If the VI ref is invalid (first execution), the VI ref and queue ref are assigned values and are passed on as an output cluster of same type.  (The VI does other things too, but for simplicity only this is important.)
    2)  The VI that calls VI "Assign" (let's call it VI "Store") is not reentrant and has a local variable of type "Refs" that is wired to the input and output of VI "Assign".  This VI effectively stores the references.  The references returned by VI "Assign" are always valid right after the call, but after the problem condition described below, they are invalid at the start of all calls before they are passed to VI "Assign".
    3)  VI "Store" is called by multiple non-reentrant VIs, so the local variables of VI "Assign" retain their values (Has been tested and verified to retain their values).  The VI causing the problem in this case is a template VI of which multiple copies are launched (let's call it VI "Template").
    The problem is that the moment an instance of VI "Template" is closed, the queue reference becomes invalid, although the actual variant value of the reference remains the same.  The VI ref can become invalid or not, depending on small changes, but is always reproducible.  I assume there must be some similarity between VI and queue refs.  After spending some time researching, the Labview help states for the Open VI Ref component "If you do not close this reference, it closes automatically after the top-level VI associated with this function executes."  In this case I assumed it means that the moment the reentrant VI "Assign" finishes, the references will get cleared ??  So I made a non-reentrant VI (let's call it VI "NR Assign") that only assigns values to the references and VI "Assign" now calls this VI (It effectively does what I described VI "Assign" does).  I keep this VI alive by using it in a VI which never terminates and since it never terminates, the references should never become invalid.  Anyone still following?  This didn't solve the problem though.  If I reproduce the same scenario using only one instance of the template VI, it works just fine.  Furthermore, the VI and queue references are never closed, to aid analysis of the problem.  Can anyone shine some light on what happens when a template VI terminates?  Could this be the problem?
    Unfortunately I cannot include the code.
    Thank you whoever is able to make sense of this.
    Christie

    Christie wrote:
    Hi all,
    I have a fairly complicated problem, so please bear with me.
    1)  I have a reentrant SubVI (let's call it VI "Assign") that has an input cluster of (VI ref, queue ref) (let's call the cluster type "Refs").  If the VI ref is invalid (first execution), the VI ref and queue ref are assigned values and are passed on as an output cluster of same type.  (The VI does other things too, but for simplicity only this is important.)
    2)  The VI that calls VI "Assign" (let's call it VI "Store") is not reentrant and has a local variable of type "Refs" that is wired to the input and output of VI "Assign".  This VI effectively stores the references.  The references returned by VI "Assign" are always valid right after the call, but after the problem condition described below, they are invalid at the start of all calls before they are passed to VI "Assign".
    3)  VI "Store" is called by multiple non-reentrant VIs, so the local variables of VI "Assign" retain their values (Has been tested and verified to retain their values).  The VI causing the problem in this case is a template VI of which multiple copies are launched (let's call it VI "Template").
    The problem is that the moment an instance of VI "Template" is closed, the queue reference becomes invalid, although the actual variant value of the reference remains the same.  The VI ref can become invalid or not, depending on small changes, but is always reproducible.  I assume there must be some similarity between VI and queue refs.  After spending some time researching, the Labview help states for the Open VI Ref component "If you do not close this reference, it closes automatically after the top-level VI associated with this function executes."  In this case I assumed it means that the moment the reentrant VI "Assign" finishes, the references will get cleared ??  So I made a non-reentrant VI (let's call it VI "NR Assign") that only assigns values to the references and VI "Assign" now calls this VI (It effectively does what I described VI "Assign" does).  I keep this VI alive by using it in a VI which never terminates and since it never terminates, the references should never become invalid.  Anyone still following?  This didn't solve the problem though.  If I reproduce the same scenario using only one instance of the template VI, it works just fine.  Furthermore, the VI and queue references are never closed, to aid analysis of the problem.  Can anyone shine some light on what happens when a template VI terminates?  Could this be the problem?
    Unfortunately I cannot include the code.
    Thank you whoever is able to make sense of this.
    Christie
    All LabVIEW refnums do get deallocated automatically when the top-level VI in whose hierarchy the refnum was created goes idle (stops executing). You will have to make sure that the creation of a refnum is done inside a VI hierarchy that stays running for the entire time you want to use that refnum.
    Rolf Kalbermatter
    Message Edited by rolfk on 06-27-2007 11:52 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • BAPI: Create Sales order with reference to Quotation

    Hi ...
    I am using bapi BAPI_SALESOREDER_CREATEFROMDATA2  and
    i want to create sales order with reference Quotation... All quotation data like Materials prices and conditions must be copied from reference quotaion which is allready created .....
    ..Thanks..
    ..Ashish

    Hello,
    nice to see that this has already been solved.
    But it actually doesnt work in my scenario. Do you have an example coding which will explain your solution.
    Mine looks like this:
    * Update Flag
      ls_header_inx-updateflag = 'I'.
    * Angebotskopf einlesen
      SELECT SINGLE * FROM vbak INTO ls_vbak
        WHERE vbeln = iv_vbeln
          AND vbtyp = lc_vbtyp.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
    * Auftragskopf setzen
      ls_header_in-doc_type      =  ls_vbak-auart.
      ls_header_in-sales_org     = ls_vbak-vkorg.
      ls_header_in-distr_chan    = ls_vbak-vtweg.
      ls_header_in-division         = ls_vbak-spart.
      ls_header_in-req_date_h   = ls_vbak-VDATU.
      ls_header_in-ref_doc        = ls_vbak-vbeln.
      ls_header_in-refdoc_cat   = 'B'.
    * Angebots-Partner einlesen (Nur AG und WE)
    * Auftrag anlegen
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
    *   SALESDOCUMENTIN               =
          order_header_in               =  ls_header_in
    *      order_header_inx              = ls_header_inx
    *   SENDER                        =
    *   BINARY_RELATIONSHIPTYPE       =
    *   INT_NUMBER_ASSIGNMENT         =
    *   BEHAVE_WHEN_ERROR             =
    *   LOGIC_SWITCH                  =
    *   testrun                       = 'X'
    *   CONVERT                       = ' '
       IMPORTING
          salesdocument                 = ev_vbeln
        TABLES
          return                        = et_return
    *      order_items_in                = lt_items_in
    *      order_items_inx               = lt_items_inx
          order_partners                = lt_partners
    *   ORDER_SCHEDULES_IN            =
    *   ORDER_SCHEDULES_INX           =
    *   ORDER_CONDITIONS_IN           =
    *   ORDER_CONDITIONS_INX          =
    *   ORDER_CFGS_REF                =
    *   ORDER_CFGS_INST               =
    *   ORDER_CFGS_PART_OF            =
    *   ORDER_CFGS_VALUE              =
    *   ORDER_CFGS_BLOB               =
    *   ORDER_CFGS_VK                 =
    *   ORDER_CFGS_REFINST            =
    *   ORDER_CCARD                   =
    *   ORDER_TEXT                    =
    *   ORDER_KEYS                    =
    *   EXTENSIONIN                   =
    *   PARTNERADDRESSES              =  .
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    Unfortunatly this just makes the reference to the quotation but does not takeover ALL data from header and pos level.
    Thanks and regards
    Markus Armbruster

  • Problem in Sales order create using BAPI with reference to quotation

    Hi,
    I am creating a sales order from Quotation using BAPI /AFS/BAPI_SALESORD_CREATEFDATA.
    The Sale order is getting created and the document flow is updated. When i check the status of quotation it is "OPEN".
    Ideally when a sale order is created in VA01 with reference to a quotation and if all items are added in the order from quotation, then the status of the quotation must be "Complete".
    When i use the BAPI, the status of the quotation is sill "Open". Has anyone faced this issue?
    Even if anyone has faced this issue with BAPI_SALESORDER_CREATEFROMDAT2, please let me know...
    Regards

    Hi RV,
    I am using BAPI  to create order reference to contracts. I am facing same issue. Its not updating document flow (vbfa-plmin field). After creating orders I am forcing to update plmin field in vbfa. This worked fine. But now status in reference document not updating properly. I saw your thread. It looks like similar issue. I saw your comments "Customization was not maintained properly for the Order types ". Please can you explain little bit more about your solution. It will helps us lot.
    Thanks,
    srini

  • Creating a Invoice with reference to another invoice with new pricing proce

    Hi People,
    I want to raise a supplimentary excise invoice for the differential price.
    I want to do it by raising a supplimentary commercial invoice with reference to the old invoice but with a new pricing procedure assigned to it.later on raise the supplimentary excise invoice with Tcode j1iin wrt the new commercial invoice.
    Although i have done all the necessary configurations such as determination of new pricing procedure, Doc pricing Procedure and changing the pricing type at the copy control settings of the item category to "B".
    i am unable to get the new pricing procedure when i am creating the supplimentary commercial invoice.
    Can u people suggest me in this regard

    Dear Nagabhushan
    Normally for price difference, there is an order type RK for "Invoice Correction Request" which should be created in reference to F2 billing document.  Based on this, you can issue credit memo (document type G2). 
    This being the case, you cannot create supplimentary invoice with reference to original invoice.  Moreover, for all excise related adjustments, you should not use j1iin.  You should run j1ih - Other adj.
    thanks
    G. Lakshmipathi

  • How to create excise invoice with reference thorugh credit memo

    Hi All,
    Please provide any solution for the following qurey:
    How to create excise invoice with reference thorugh credit memo

    Hi murali,
    i am unable to understand your requirement i think there is no like this scenario requirement for any client
    if any requirement is there kindly explain detail
    cheers

  • How can i use "phone relay" on a iPad mini over iPhone created wifi hotspot?

    How can i use "phone relay" on a iPad mini over iPhone created wifi hotspot?
    It works nicely over home wifi, but for example, i am sitting in my car, phone is in my pocket and I'm using the iPad, call comes in and i don't want to start digging for my phone.
    Is there any way?
    devices:
    iPad mini cellular (no SIM card at the moment)
    iPhone 5S
    Thanks!

    well yes, but it basically makes wifi for the other devices, it basically mimics wifi.
    as i get from your answer, it is not possible?
    it would be common sense to make it work this way also. directly from device to device. no bounce between WiFi router
    Then again, common sense is not that common these days...

  • I hope it's Kappy reading this. My HP Laserjet successfully installed but can't create a print queue...

    Hello Kappy - Thank you for persevering with my printer issues. Firstly, I use Firefox, recently updated & as yet have not discovered how to monitor downloads. The software for HP Laserjet 2200 was eventually automaticallly, and therefore correctly, installed.The Add Printer Pane accessed via the + button in the Printer & Scanner window is blank - the Name & Location and Print Using & Add areas are all grayed out, therefore I can't locate the printer driver even though it is in the Printer folder. I messed around with HP Direct Protocol & Line Daemon functions, entering my IP address, just to see if I could locate the printer driver - I could. However, I get a pop-up window which says 'Unable to verify the printer on your network' but it gives me the option of going ahead anyway, which I did. I was able to create a print queue, able to give a print command, the printer window opens, but the printer appears as 'busy', but of course it's not printing. To look at the issue from another perspective: previously I was running 10.5.8 on my old Power Mac G5 and a week before I shifted over the iMac I paused the printer but when tried to resume printing I got a pop-up message saying IPadmin > enter administrator name + password. Which of course I couldn't do - I discovered this was a bug afflicting10.5 & 10.6 operating systems; the only way I could get around it was by re-creating myself as a new administrator, which I did, and got the printer going again. So, if I have a "Network" printer perhaps there's another route to get the driver recognized... What do you think?
    Alex Carr

    Morning Alexander Carr,
    Thanks for using Apple Support Communities.
    Use this article to troubleshoot printer issues in OS X.
    For more information on this, take a look at this article:
    Troubleshooting printer issues in OS X
    http://support.apple.com/kb/ts3147
    Best of luck,
    Mario

  • Re: Creating credit memo with reference to Sales Order in ICWC

    Hello gurus
    I am new to CRM and we hv ECC 6.0 & CRM 6.0 in our environment.
    We have a process where a Credit Memo Request is created with reference to a Sales Order.
    Now till this point we had launched VA01 in the ICWC and were creating the CMR with reference to the Standard Order.
    Henceforth we want to move this to the CRM ICWC.
    In ICWC we create Standard Sales order using Work Center IC_BT_SLO tied to the Navigation profile.
    I am looking for some way of copying this order to a Credit Memo Request in the ICWC.
    I tried adding the Complaints button on the navigation profile ... however it creates a new CMR ... not sure how to enable copying it from the Original Sales order in ICWC
    Any thoughts ?
    Thanks
    Vinit

    closed
    Edited by: vinit parkar on Sep 1, 2011 4:25 PM

  • BAPI for creating scheduling agreement with reference to Contract agreement

    Hi All ,
    Can anyone please suggest if there is any BAPI for creating scheduling agreement with reference to the contract agreement number.
    Thanks for your help.
    Vadivukkarasi

    Hi,
       Check this BAPI <b>BAPI_AGREEMENT_MAINTAIN.</b>
    check these
    BAPI_CUSTSCHEDULAGREE_CONFDELV Customer Sched. Agreement: Confirmation of Delivery; Document Flow Upd
    BAPI_SALES_DEL_SCHEDULE_CREATE BAPI for creation of releases in scheduling agreements
    Regards

  • Error while creating a temp queue (JMSException sayin .Destination dosnt ex

    i will just post part of my code
    Properties env = new Properties();
                        env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");
                        jndiContext = new InitialContext();
                        queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
                        queue = (Queue) jndiContext.lookup(queueName);
                   }catch (NamingException e) {
                        System.out.println("JNDI API lookup failed: " + e.toString());
                        System.exit(1);
                   try {
                        queueConnection = queueConnectionFactory.createQueueConnection();
                        queueSession = queueConnection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
                        queueConnection.start();
                        queueSender = queueSession.createSender(queue);
                        requestMessage = queueSession.createTextMessage();
                                                                requestMessage.setText("does");
    /* The code works fine  till here , but below as soon as i say  replyQueue = queueSession.createQueue("todo"); , it says the destination dosenot exist. why isnt it creating  a temporary queue for me . Exception thrown is javax.jms.JMSException :
    This Destination Does Not Exist.
                        replyQueue = queueSession.createQueue("todo");
                                            Destination replyDestination = replyQueue;

    createTemporaryQueue() already creates a unique
    destination; you don't need to do anything else.
    Note as we discussed in the previous thread; you
    should not create a temporary destination per
    request; you should create 1 temporary destination
    per consumer/process and reuse it across requests;
    using a correlationID to match requests to
    responses.
    James
    http://logicblaze.com/
    Hello Mr.James,
    pleeeeeeeeeeeeeeease give me one example of how do i create only one temporary queue and differentiate resposes based on CorrelationID, i mean i am just not able to do it , i feel i will have to browse through entire queue matching for CorrelationId's, however u had earlier rejected this approach
    THEN HOW DO I MATCH RESPONSES IN TEMPORARY QUEUES TO MY REQUESTS BASED ON CORRELATIONID , PLEASE GIVE ME AN EXAMPLE

  • Can't create a print queue on OS 10.7 via HP driver installed by Apple

    I've ust bought a reconditioned iMac and am getting applications up and running, but I'm unable to get my HP Laserjet 2200DN printer working. The Add Printer pane (Print & Scan Preferences) remains blank: Name & Location and Print Using & Add areas are all grayed out, therefore I can't locate the printer driver even though it has been installed in the Printer folder. I've messed around with HP Direct Protocol & Line Daemon functions, entering my IP address, just to see if the printer driver could be located - it could. However, I get a pop-up window which says 'Unable to verify the printer on your network' but it gives me the option of going ahead anyway, which I did. I was able to create a print queue, able to give a print command, the printer window opens, but the printer is  'busy', but of course it hasn't been given the command to print  anything.  Any ideas?
    Alex Car

    Morning Alexander Carr,
    Thanks for using Apple Support Communities.
    Use this article to troubleshoot printer issues in OS X.
    For more information on this, take a look at this article:
    Troubleshooting printer issues in OS X
    http://support.apple.com/kb/ts3147
    Best of luck,
    Mario

  • Creating inbound delivery without reference to PO - from inbound idoc

    Hi guys,
    I have a scenario wherein I need to create inbound delivery from inbound Idoc from external system without reference of PO. There is no PO created in SAP and this inbound delivery will be used just to receive material (purely for logistic purpose).
    I have identified DELVRY03 or 05 as Idoc type but I am not sure whether system will create inbound delivery without having reference PO. I have two questions here -
    1. Can we create inbound delivery without reference to PO?
    2. If yes, which Idoc type should I use to create such inbound delivery?
    Please help.
    Thanks,
    Parimal.

    Dear Parimal,
    In standard, An inbound delivery can be created as follows:
    With reference to a purchase order
    With collective processing for several purchase orders
    With reference to a stock transport order
    With reference to a customer return

Maybe you are looking for

  • Delivery subcriteria for Vendor Evaluation

    Hi How are the scores computed for the subcriteria in Deliovery? Regards Soumen

  • Communication strategy missing for external send

    Dear all, I want to send O/Cs via mail, therefore I configured the transmission medium of the output type to "external send". As well I set the communication strategy for mail to the output type. Nevertheless I receive an error, when I want to save t

  • Width of single characters

    Hello all! I'd like to know whether, and how you get the width of single symbols. For example: I would like to have a JTextField with a specific length (in pixels), that it's text exactly fits in it. To do this i must know the amount of chars and, as

  • HT201210 The iphone could not be restored. An Unknown error (-1) occurred How do I fix this problem

    Have tried to sync the phone and update the software on my iphone3G. After clicking on the update button and the register button after that. I get the message "The iphone could not be restored. An Unknown error (-1) occurred" How do I fix this proble

  • New stacked canvas and action items

    I have a form with tree module components into the same window: one new content canvas and two new stacked canvas. The window has an action item. When I execute this form the action item is'nt visible because is placed under the stacked canvas. Is po