It's better or necessary open and close communicat​ion with instrument every loop?

I must communicate with my instrument, but I must change its value, for example temperature, every loop. See the Figure to understand:
I think that it is better if I open communication with my instrument out of while loop so I many operation: if I put Open VISA in While loop I open VISA session every loop, instead I think it is not intelligent. Can I open VISA SESSION out of the while loop or it is an error for EXCELLENT LABVIEW VI and I must open and close VISA SESSION every times I must talk (and set) with instrument? What is the better way?
Message Edited by Michelle1892773 on 02-22-2010 02:00 PM

Something like this?
I do have to say, i don't know what is happening in the false case of yours, but if nothing happens with the 100 that is wired to the shift register, once you enter the true case, the value in the shift register will always be great than "i". You might as well do what I have done then. However, if something does happen with that number in your false case, then keep it the way you have it.
That being said, why is the condition there to see if it has looped 100 times before doing the visa write??
Message Edited by for(imstuck) on 02-22-2010 04:45 PM
Message Edited by for(imstuck) on 02-22-2010 04:46 PM
CLA, LabVIEW Versions 2010-2013
Attachments:
visa.PNG ‏13 KB

Similar Messages

  • Open and close multisim contact with LabVIEW

    Can I open and close multisim contact with labview and read the receptor estatus (p.e. lamp)?
    Thanks.
    Attachments:
    Dibujo.JPG ‏13 KB

    Hi Guddan,
    I created a RFC having a query which is taking a long time to execute. So i want to close RFC connection with portals which is via java connector(JCO) before that query and open the connction again after that query.
    I guess i will need to understand your requirement a little more in detail, as i understand you have an RFC which has a query within to fetch some data and is taking a long time to do so. In the meantime you don't want to keep the connection open?
    My question would be, Is the role of this RFC to only execute the query and fetch the data or does it do something else?
    If it does other things and these are independent of the query execution, then you can span a parallel call within the RFC to execute the query and in the meantime the RFC does the other things (or vice versa) hence reducing the overall time taken.
    If the sole purpose of this RFC is to execute the query, then you will not be able(i mean to say there is no simple and direct way of doing this) to close the connection after the Query is started and re-establish the connection after its execution, for a simple reason that - how will you know if the query has completed it's execution, so that you can establish the connection back.
    Alternate solutions, make this a two way asynchronous call, 1) You invoke the RFC asynchronously and close the connection, the RFC in turn will execute the query and transfer the data to JCO via another RFC call.
    If this needs to be a synchronous call, then you will need to optimize the query to its best.
    Regards,
    Chen

  • What is the better way to open and close connection in bean

    Hello, may i ask about the best way to open and close the connection?
    At the first, the connection code is store in Conn class bean. The JSP page will call a method in Process bean to process the query and update of database. the Process bean is using th Conn to connect to database.
    In my process bean, it have a method for each type of sql like select, insert, update, and delete for each tables. Each method will call the Conn to open and close the connection. The jsp page can simply call a method retrieve or update records.
    However, when calling the processUpdate method, it is a method that update a group of tables base on the query result of another group of tables and calculation. If I calling the query method in the same bean file, it will open and close the connection many times (more than 1000 times). After open and close the connection several times, the connection to mySQL will be fail.
    Currently, i include 2 method in Process that is only calling the Conn to open the connection and close connection. When calling the openConnection method, it will also set the boolean connected in the class to true and call Conn to open connection. When calling the closeConnection method, it will also set the boolean connected in the class to false and call Conn to close connection.
    After that, i add some change to the query method which is when the connected is false, it will open the connection by calling the Conn and close the connection themself. If the connected is true, it will not call the Conn to open and close the connection because it already connected to the database.
    Now, i when i calling the query method in jsp, it can open the connection and close the connection individually. When i call the processUpdate in the jsp, this method will calling the openConnection before calling the query and calling closeConnection at the end. It not only faster the process(less open and close), it also no cause the connect to mySQL fail error again. However, it also make the coding in the bean file more longer and complex.
    Is there have any better solution?

    Use connection pooling. This will put the connection management in the hands of the webserver, not your code. Check out this post:
    http://forum.java.sun.com/thread.jspa?threadID=741788&messageID=4252932#4252932

  • Track pad pinch open and close not working with Firefox 4

    the pinch open and close feature to adjust size on my Mac track pad does not work

    Some mouse gestures have been removed in Firefox 4.
    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    browser.gesture.pinch.in cmd_fullZoomReduce
    browser.gesture.pinch.in.shift cmd_fullZoomReset
    browser.gesture.pinch.out cmd_fullZoomEnlarge
    browser.gesture.pinch.out.shift cmd_fullZoomReset
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    * http://kb.mozillazine.org/about%3Aconfig

  • Motion 4: open and close a group with key shortcut?

    Mo4: Layers window: any shortcut to twirl down (and/or up) all the layers in a group? Or layers in layers? The manual says arrow keys move from group to group,layer to layer and that works... also says that L & R keys open and close selected group/layer, my LR arrow keys don't do anything...
    Thanks, John

    No, actually you do not - you need to click the helpful or solved buttons over their post in order to give them credit.
    And what you do by assigning a helpful or solved (helpful is 5 points, solved is 10) is to build their reputation here. Not a bad thing to do for those who help you...
    Patrick

  • Open and close RFC connection with portals...

    Hi Experts,
    I created a RFC having a query which is taking a long time to execute. So i want to close RFC connection with portals which is via java connector(JCO)  before that query and open the connction again after that query.
    Please advice is it possible to achieve this. If yes, then how.
    Regards,
    Guddan

    Hi Guddan,
    I created a RFC having a query which is taking a long time to execute. So i want to close RFC connection with portals which is via java connector(JCO) before that query and open the connction again after that query.
    I guess i will need to understand your requirement a little more in detail, as i understand you have an RFC which has a query within to fetch some data and is taking a long time to do so. In the meantime you don't want to keep the connection open?
    My question would be, Is the role of this RFC to only execute the query and fetch the data or does it do something else?
    If it does other things and these are independent of the query execution, then you can span a parallel call within the RFC to execute the query and in the meantime the RFC does the other things (or vice versa) hence reducing the overall time taken.
    If the sole purpose of this RFC is to execute the query, then you will not be able(i mean to say there is no simple and direct way of doing this) to close the connection after the Query is started and re-establish the connection after its execution, for a simple reason that - how will you know if the query has completed it's execution, so that you can establish the connection back.
    Alternate solutions, make this a two way asynchronous call, 1) You invoke the RFC asynchronously and close the connection, the RFC in turn will execute the query and transfer the data to JCO via another RFC call.
    If this needs to be a synchronous call, then you will need to optimize the query to its best.
    Regards,
    Chen

  • Visa Open and Close on every iteration of loop

    I have noticed that when you open the front panel of the Instrument I/O Assistant, the diagram starts with a visa session open, sets timeout property, writes, reads, parses data and ends with a visa session closed.  If I were to place this into a while loop the visa session would open and close on each iteration of the loop. 
    Is it common practice to open and close the visa session on each iteration?

    No you would not want to open and close that often. If you want to use the Instrument I/O assistant what I would do is configure it the way you want and then save it under another name so you can open the block diagram. Pull the VISA open and close outside of your loop.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • How do I open and close vis programmatically?

    I want to open and close a vi with a switch control. What is the best way to do this?

    Probably the easiest way is to utilize vi server operations. Vi server will allow you to open a vi and close a vi programmatically. This is a great example that is built into LV. THis should give you some ideas. Hope this helps.
    BJD1613
    Lead Test Tools Development Engineer
    Philips Respironics
    Certified LV Architect / Instructor
    Attachments:
    VI_Server_-_Changing_Another_VI's_Properties.llb ‏625 KB

  • IMessage beta loose all saved conversations when I open and close a window.

    iMessage beta looses all saved conversations when I open and close a window.
    Just reporting this bug... Could not find anyother place to do it.
    Jonathan

    I thought it was doing that also. But I found that if I start a new chat with someone I was messaging before, then the old messages re-appear in the messages window.

  • Where we have to open and close posting periods in asset accounting

    hi sap gurus
      can anybody give where we have to open and close posting periods in asset accounting
    thank you
    venkatareddy

    Hi Venkatareddy,
    You make specifications for fiscal years and posting periods in the SAP R/3 System in Customizing for Financial Accounting. This is done in the fiscal year variant in the global parameters of the company code. These settings are, in general, also binding for Asset Accounting. The depreciation periods in Asset Accounting then correspond to the posting periods in Financial Accounting.<b> It is usually not necessary to create a separate fiscal year variant for Asset Accounting.</b>
    The period control in the depreciation key determines the start and end of depreciation when asset transactions are posted . The period control determines the relationship between the calendar period in which the asset transaction is posted and the depreciation period.
    These calendar periods are independent of the posting periods in Financial Accounting. The only restriction is that the beginning of the first calendar period and the end of the last calendar period defined in a period control have to match the start date and final date of the fiscal year in Financial Accounting.
    Kindly let me know if this useful for you

  • Open and Close Posting Periods

    Hi Experts,
    When are are in open and close posting periods, we have
    From account to account
    From period 1 year to period & year
    From period 2 year to period & year
    Could you tell me difference between from period 1 & from period 2
    Regards.

    Hi,
    Open & Close Posting Periods
    This function is used to allow posting any particular account within a any desired period only. The variant type
    defined above is populated with characteristics i.e, in the combination of Variant type, Account type, Account Nos
    and Posting Period.
    Account types maintained by SAP are
    u2018+u2019 Valid for all account types
    Populating u2018+u2019 type is necessary even if all account types have
    been defined separately
    u2018Au2019 Assets
    u2018Du2019 Customers
    u2018Ku2019 Vendors
    u2018Mu2019 Materials
    u2018Su2019 G L Accounts
    u2018Vu2019 Contract Accounts
    Activity:
    Variant type frm a/c to a/c frm pd1 year to prd year frm pd2 year to prd year
    0001 + 1 2004 12 2005 13 2005 16 2005
    0001 A ZZZZZ 1 2004 12 2005 13 2005 16 2005
    0001 D ZZZZZ 1 2004 12 2005 13 2005 16 2005
    0001 K ZZZZZ 1 2004 12 2005 13 2005 16 2005
    0001 M ZZZZZ 1 2004 12 2005 13 2005 16 2005
    0001 S ZZZZZ 1 2004 12 2005 13 2005 16 2005
    Imp: u2018+u2019 type can be defined without u2018frm a/cu2019 & u2018to a/cu2019 limit, but for others i.e, A, D, K, M & S, a/c limits are required. However if posting periods are across accounts, u201Czzzzzzzzzu201D must be entered in u2018to a/cu2019 field.
    Assign Variants to Company Code
    Variant properties are assigned to a Company code.
    Regards,
    Sanju M S

  • Pages 09 document; open and close many times; right way with Lion?

    I have a 106 page document that increases in size on a daily basis. With OS 10.7, iWork/Pages 09 on my new, iMac, it's common that I lose as much as two sentences after the document is closed and re opened. After 10.7 was installed the document was closed using Command - S, and subsequently closed by pulling down File and selecting Close. - Not the way to close; the red button was so easy with 10.6. IS UNINSTALLING LION THE BEST SOLUTION?
    And yes, I've read the sorry jibberish in the Pages 09 manual - which doesn't say how to open and close repeatedly a document with Pages 09.
    So, with the Lion - the worst ever of spending $30, is it necessary to do a Command S every time you close? And what exactly is necessary each time you close a document using Pages 09 and Lion? - And about Auto Save; well, what about Auto Save? - The Lion means well for something other than common, understandable, text production.  -- How about a separate application of Appleworks for text producers like me?

    The red button is always available under 10.7 (or 10.7.1)
    Under 10.7, press cmd + S once when you create the document.
    After that, the system automatically save your changes.
    No need for cmd + S.
    To close the document we may use :
    the red button
    cmd + W
    File > Close
    as it was with older systems.
    monte45 wrote:
    And yes, I've read the sorry jibberish in the Pages 09 manual - which doesn't say how to open and close repeatedly a document with Pages 09.
    The User Guide is perfectly clear and precise :
    Yvan KOENIG (VALLAURIS, France) jeudi 22 septembre 2011 19:21:52
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Would you Open and Close DAQmx tasks within a function or Globally

    Hi Guys,
    This should start something.
    The subject is DAQmx Tasks.
    If you were writing a function that is called many times, say MeasureVolts (double *Value) to obtain a reading from an Analogue Input Channel.
    Would you.
    1. open and start the task inside the function, do the measurement and then close the task inside the same function.
    or
    2. open the task globally and later do the measurement inside the function using the global task then close the task only when the application is closed.
    I am mostly concerned with the overhead of task generation and closing, what do you guys and girls out there do?? and what is the general opinion?
    I would appreciate your views.
    Regards
    Paul.

    I would definitely NOT keep configuring and clearing (I think that's what you mean by open and close) the same task over and over.  I would configure once, read many times in my main app, then stop & clear once.
    I typically like to package such data acq into an "Action Engine" that keeps track of its own DAQmx task id so I don't need to sling that task id wire around into multiple parallel loops / vi's.  Attached is a very stripped-down example for Digital Input. 
    I would typically do more with error testing and would make the "Action" enum into a typedef custom control, but this gives you the basic idea.  The action engine approach works very nicely when there's a small # of different kinds of input parameters and output info needed to support all the necessary action cases.   When you start needing a large number of differnent kinds of inputs and outputs to support the desired actions, then you start having difficulty with (1) having enough terminals to wire and (2) remembering which inputs and outputs are meaningful for which actions.
    -Kevin P.
    Attachments:
    DI Action Engine.vi ‏75 KB

  • Find open and close smart quotes

    Dear scripter,
    Here I am trying find whether all the open double smart quotes(") are closed with close double smart quotes("). Here is my small work to find how many open and close quotes.
    myopenqu=app.activeDocument.search("^{", false, false, "^{");
    myclosequ=app.activeDocument.search("^}", false, false, "^}");
    myopenqulength = myopenqu.length;
    myclosequlength = myclosequ.length;
    if(myopenqulength!=myclosequlength)
    alert("Quotes not matched\n"+ myopenqulength +" Open quotes found\n" + myclosequlength +" Close quotes found")
    It works well, the script just alert if I have 25 open quotes and 23 close quotes
    Quotes not matched
    25 Open quotes found
    23 close quotes found
    Now I want to find the quote set where the 24,25th set close quotes are missing?
    Is there any way to find the misisng quotes
    Thanks in advance
    regards
    a r u l
    vpublish.net

    You'd have to look for unmatched quotes, in this case two cases of two open quotes without an intervening closed quote. This is difficult to script in CS2 because it doesn't have GREP natively and because of footnote problems. In CS3/4 it should be possible. But even then it will work only if you don't have quotes within quotes.
    Peter

  • Report OPEN and CLOSE in computers client

    Post Author: B.prata
    CA Forum: Crystal Reports
    I have an application developedin Visual Basic with report in the CR 4.6, but in the computers customers when I will access the application,I try to emit a report , it opens and close the report. What can be?

    There is no FaceTime app for the iPhone if that's what you're asking.  FaceTime is accessible through your Contacts as one of the options in how to contact a person -- there is no standalone FaceTime app for iPhone.
    If you mean how to disable FaceTime, you can do that in Restrictions (Settings/General/Restrictions).

Maybe you are looking for

  • Problems with plugins after upgrading to win8

    Hi I made the upgrade to Windows 8 and now several PS plugins causes Photoshop CS6 to "Stop Working And need to close". I have uninstalled and reinstalled plugins and still the same problem. As this happens with different plugins from different vendo

  • Colored dots in calendar month view

    hello, i have an iphone and use the calendar. i have multiple calendars with assigned colors (example: red for professional, green for sport, blue for family). as i am very busy, a black dot appears in almost every day in the month view. if i want to

  • Recorded MPEG-2.  Now confused/need help importing DV or MPEG-4?  Help!

    HI there from Buffalo NY and a year-old mac user I'm using ... a JVC Hard disk camcorder (GZ-MG20U) which records in MPEG-2 format. iMovie HD 5.0.2 won't accept these files when I try to import, so I'm using the software that came with the camera (Ca

  • Cannot E-Mail a PDF Form w/ a Submit Button

    Hi, I feel really inept at this point and I'm hoping someone can help me (PLEASE!).  My Home Owner Assoc. uses PDF forms created in Nitro PDF, but most users user Adobe Reader. When a Nitro PDF form is opened in Reader, everything works as designed (

  • INFOTYPE 2001 AND 2002

    When i book absence in infotype 2001 or book an attendance in infotype 2002, if i put 6.51, the system automatically changes it to 6.52 hrs. I just want the system to take 6.51. How is this possible. Can this be done through configuration. Please hel