Executable does not release serial port after being stopped

Greetings:
I have created an executable that communicates through a serial port.  However, if I stop the executable (not close it), the executable still has control over the COM port.  This causes issues if I need to jump on Hyperterminal to send a couple quick queries to my system.  In order to send the queries, I have to actually close the executable in order to release the COM port.  It's problematic because I then have to start the executable back up, go through another configuration query, etc. and there are parameters from the previous run I would prefer to not lose.
Is there a way to force a LabView executable into releasing it's hold on a COM port after it's stopped, without closing the executable completely?  If it makes a difference, I'm using LV 7.1 on a WinXP machine.  Thanks for any help!

Gumby_Dammit wrote:
I changed the settings to have the stop button visible in the menu bar along with the start button.  This is because the user has to select their COM port before continuing.  
Raven has already said it but I'll say it a different way.  No user should ever interact with the front panel unless the VI is running.  And when it is running the user should never have access to the abort button in the toolbar.  When you open Internet Explorer do you first need to click the run button?  No it runs when you run it.  Write your program so it is always running, and doesn't have an abort so if the user closes the program you can run the proper clean up like closing COM ports.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Similar Messages

  • N8 does not start or recharge after being empty

    My N8 does not recharge or start after battery beeing empty. I tried hard reset, more than 8s start button, charging with mini usb or original charger, at laptop or charger, just dead.

    If the Battery is totally drained sometimes it takes a few minutes of charge to show the charging indiactor... If you have not done this then leave it on charge and check after about 10 minutes...

  • CrystalReportViewer 2008 does not release GDI objects after closing.

    We need help in resolving an issue with a WinForms application we have developed that makes use of the Crystal Reports 2008 viewer control to both generate reports based on various parameters the user supplies and to view these same reports having been previously saved in crystal 2008 format.
    The issue we are seeing is that GDI objects are being created during the report generation process but some are not being released when the report viewer window is closed down. This leads to the system running out of GDI objects (seen by using the Windows task manager) and ultimately the application crashes. It is only when the application is closed completely that GDI resources are returned to the system.
    In an effort to isolate the cause of this problem we created a much simplified WinForms application that simply allowed us to systematically open and close a WinForm  that contains a CrystalReportViewer  to display one of our example reports. We found that the behaviour is the same for this application too.
    Browsing the crystal reports forums reveals there have been a few questions about u201Cmemory leaksu201D like this (see "Thread: CrystalReportViewer memory usage increases until out of memory" as an example) and there has been a good deal of talk about manually "disposing" of report documents and viewers but trying this does not correct this issue
    The extent of the "GDI Object leak" does depend upon the kind of report that is pulled in. One report we have that is 360 pages long and contains graphs and tables of data leaks 390 object per test iteration.
    Is this a known issue with the Crystal Report Viewer and if so is there an update or a workaround available?
    Are we performing all the correct initialisation prior to using the viewer? For example we are supplying the report to the viewer through a ReportDocument object; is there something special we need to do with that?
    Do we have to do anything special when closing the viewer?
    Could it be to do with the design of our reports? We are using the Crystal Reports 2008 editor (sp1) to do this design.
    We urgently need to help in understanding why this is happening and to be able implement a solution that will address this problem.
    I have provided the following code snippets of this sample application to give a flavour of what we are doing and hopefully you can see that it is not complex. The example shows the crystal viewer being presented with a ReportDocument as a Report Source ... this is how our proper application does things but if you try supplying the filename of the crystal report directly, the problem is the same.
    This C# code was written using Visual Studio 2008.
    // ===================================================================================
    //                                                  Sample Code Snippets  
    // ===================================================================================
        static class Program
            /// <summary>
            /// The main entry point for the application.
            /// </summary>
            [STAThread]
            static void Main()
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MDIParent1());
    // ===================================================================================
    // ===================================================================================
        public partial class MDIParent1 : Form
            private int childFormNumber = 0;
            public MDIParent1()
                InitializeComponent();
            private void ShowNewForm(object sender, EventArgs e)
                Form childForm = new TestForm();
                childForm.MdiParent = this;
                childForm.Text = "Window " + childFormNumber++;
                childForm.Show();
            private void OpenFile(object sender, EventArgs e)
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                openFileDialog.Filter = "Text Files (.txt)|.txt|All Files (.)|.";
                if (openFileDialog.ShowDialog(this) == DialogResult.OK)
                    string FileName = openFileDialog.FileName;
            private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
                SaveFileDialog saveFileDialog = new SaveFileDialog();
                saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                saveFileDialog.Filter = "Text Files (.txt)|.txt|All Files (.)|.";
                if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
                    string FileName = saveFileDialog.FileName;
            private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
                this.Close();
            private void CutToolStripMenuItem_Click(object sender, EventArgs e)
            private void CopyToolStripMenuItem_Click(object sender, EventArgs e)
            private void PasteToolStripMenuItem_Click(object sender, EventArgs e)
            private void ToolBarToolStripMenuItem_Click(object sender, EventArgs e)
                toolStrip.Visible = toolBarToolStripMenuItem.Checked;
            private void StatusBarToolStripMenuItem_Click(object sender, EventArgs e)
                statusStrip.Visible = statusBarToolStripMenuItem.Checked;
            private void CascadeToolStripMenuItem_Click(object sender, EventArgs e)
                LayoutMdi(MdiLayout.Cascade);
            private void TileVerticalToolStripMenuItem_Click(object sender, EventArgs e)
                LayoutMdi(MdiLayout.TileVertical);
            private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e)
                LayoutMdi(MdiLayout.TileHorizontal);
            private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e)
                LayoutMdi(MdiLayout.ArrangeIcons);
            private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
                foreach (Form childForm in MdiChildren)
                    childForm.Close();
    // ===================================================================================
    // ===================================================================================
        public partial class TestForm : Form
            private ReportDocument crDocument;
            public TestForm()
                InitializeComponent();
            private void TestForm_Load(object sender, EventArgs e)
                crDocument = new ReportDocument();
                crDocument.Load(@"C:\Reports\Sample1.rpt");
                this.crystalReportViewer1.ReportSource = crDocument;
    //            this.crystalReportViewer1.ReportSource = @"C:\Reports\Sample1.rpt";
            private void TestForm_FormClosing(object sender, FormClosingEventArgs e)
                this.crDocument.Dispose();
    // ===================================================================================

    Hi Martyn,
    I tested this and found after using this code to re-initialize the report viewer there we still 400 GDI objects not getting released. This may or may not be a CR issue. Still testing.
    Try this also, I simply created a close button but you should be able to do this in your form close method also depending on how you do it:
            private void CloseReport_Click(object sender, EventArgs e)
                rptClientDoc.Close();
                crystalReportViewer1.Dispose();
                GC.Collect();
                this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
                InitializeComponent();
                crystalReportViewer1.ShowExportButton = true;
                crystalReportViewer1.EnableRefresh = true;
                crystalReportViewer1.Controls.Count.ToString();
                crystalReportViewer1.BackColor.IsNamedColor.ToString();
                crystalReportViewer1.EnableToolTips = true;
                crystalReportViewer1.Refresh();
    The issue has now been tracked - Problem_Report:  ADAPT01301248
    Thanks again
    Don
    Edited by: Don Williams on Sep 15, 2009 11:01 AM

  • JInternalFrame is closed, but does not release the memory

    Hi,
    I have problem with using of JInternalFrame.
    I create a new internal frame, and close it."setClosed(true);dispose();"
    The frame does not release the memory (after gc the allocated memory is the same)
    Before close I removed all listeners, and closed all reference to other object. (I think so :-) )
    Do You have any idees?
    regards
    G�bor

    Hi,
    I think u will have to release all the associated used objects. or you can also call the finalize() method in order to release the memory.
    Regards,
    Balaji.SN

  • Photoshop does not release memory after closing document.

    When I close a large document Photoshop does not release the memory. If I open another document the program is slow and not resposive. If I close out of Photoshop and restart it then load the other document it is quick and responsive again.

    A bit late to the party here but this issue is still live and I can't find anything else on the forum similar to it (apologies if there is).
    Photoshop does not seem to re-use memory it just keep allocating new right up to the limit before the prog crashes (same applies to Fireworks) so any batch/script processing of more than a handful of files is impossible.
    I am Photoshop via Creative Cloud (so I am always updated to your latest release), Windows 7 64k with 8Mb memory and am using Norton Intenet Security 20.3.1.22 which is updated daily.

  • While configuring speed 1000 i am getting error as sw2-storage-vdc(config-if)# speed 1000 ERROR: Ethernet2/6: Configuration does not match the port capability.

    storage-vdc(config-if)# show module
    Mod  Ports  Module-Type                         Model              Status
    2    32     1/10 Gbps Ethernet Module           N7K-F132XP-15      ok
    sw1-gd78(config-if)# sh module
    Mod  Ports  Module-Type                         Model              Status
    2    48     1/2/4/8 Gbps FC Module              DS-X9248-96K9      ok
    4    8      10 Gbps FCoE Module                 DS-X9708-K9        ok
    7    0      Supervisor/Fabric-2a                DS-X9530-SF2AK9    active *
    8    0      Supervisor/Fabric-2a                DS-X9530-SF2AK9    ha-standby
    10   22     4x1GE IPS, 18x1/2/4Gbps FC Module   DS-X9304-18K9      ok
    Mod  Sw              Hw      World-Wide-Name(s) (WWN)
    2    5.2(2)          1.1     20:41:00:0d:ec:fb:8a:00 to 20:70:00:0d:ec:fb:8a:00
    4    5.2(2)          0.107   --
    7    5.2(2)          1.8     --
    8    5.2(2)          1.8     --
    10   5.2(2)          1.3     22:41:00:0d:ec:fb:8a:00 to 22:52:00:0d:ec:fb:8a:00
    sw1-gd78(config-if)# sh run int ethernet4/6
    !Command: show running-config interface Ethernet4/6
    !Time: Mon Feb 20 22:56:12 2012
    version 5.2(2)
    interface Ethernet4/6
      no shutdown
    sw1-gd78(config-if)# no shut
    sw1-gd78(config-if)# speed 1000
    ERROR: Ethernet4/6: Configuration does not match the port capability.
    sw1-gd72# sh int ethernet4/6 capabilities
    Ethernet4/6
      Model:                 DS-X9708-K9
      Type (SFP capable):    10Gbase-SR
      Speed:                 1000,10000
      Duplex:                full
      Trunk encap. type:     802.1Q
      Channel:               yes
      Broadcast suppression: percentage(0-100)
      Flowcontrol:           rx-(off/on/desired),tx-(off/on/desired)
      Rate mode:             dedicated
      QOS scheduling:        rx-(2q4t),tx-(1p3q4t)
      CoS rewrite:           yes
      ToS rewrite:           yes
      SPAN:                  yes
      UDLD:                  yes
      Link Debounce:         yes
      Link Debounce Time:    yes
      MDIX:                  no
      Port Group Members:    none
      TDR capable:           no
      FabricPath capable:    yes
      Port mode:             Switched
    sw1-gd72# sh int ethernet4/6 transceiver details
    Ethernet4/6
        transceiver is present
        type is 10Gbase-SR
        name is CISCO-FINISAR
        part number is FTLX8571D3BCL-CS
        revision is C
        serial number is FNS12090EMJ
        nominal bitrate is 10300 MBit/sec
        Link length supported for 50/125um OM2 fiber is 82 m
        Link length supported for 50/125um OM3 fiber is 300 m
        Link length supported for 62.5/125um fiber is 26 m
        cisco id is --
        cisco extended id number is 4
               SFP Detail Diagnostics Information (internal calibration)
                                         Alarms                  Warnings
                                    High        Low         High          Low
      Temperature   36.21 C        75.00 C     -5.00 C     70.00 C        0.00 C
      Voltage        3.29 V         3.63 V      2.97 V      3.46 V        3.13 V
      Current        8.11 mA       11.80 mA     4.00 mA    10.80 mA       5.00 mA
      Tx Power       -2.65 dBm       1.49 dBm  -11.30 dBm   -1.50 dBm     -7.30 dBm
      Rx Power       -2.21 dBm       1.99 dBm  -13.97 dBm   -1.00 dBm     -9.91 dBm
      Transmit Fault Count = 0
      Note: ++  high-alarm; +  high-warning; --  low-alarm; -  low-warning

    Ankit,
    You are trying to set speed 1000 on a 10g sfp.
    type is 10Gbase-SR
    You will need to insert a 1gig sfp and then you will be able to set the speed.
    Also, I noticed that you posted first with interface 2/6 and the output you gave me was for 4/6. Are you sure you're in the right interface?

  • IPod shuffle does not recognized by iTunes after restore

    Hello
    I have a iPod shuffle (4th gen) and a windows laptop.
    After restoring my iPod shuffle (as directed by iTunes), iTunes does not recognized my iPod anymore.
    The data in the iPod has been deleted (ie return to the factory settings), but iTunes does not proceed to prompt me to name my iPod and set up sync options etc, it simply does nothing and does not recognize my iPod. 
    I went on My Computer, and reformatted the iPod shuffle again. As a result of the reformatting, iTunes recognizes my iPod but it requires me to restore my iPod back to factory settings again. It became a cycle of either recognizing the iPod but asking me to restore it; or does not recognize my iPod after restoration.
    Please kindly assist me with this situation as it is rather frustrating.
    iTunes is in the latest version as I have attempted the trouble shooting support on the webpage.
    Many thanks.

    Hi priscillayeung,
    If you are having issues with your iPod being recognized by your Windows computer but not by iTunes (or being recognized but requiring a restore, which then causes it to not be recognized again), you may find the troubleshooting steps outlined in the following article helpful:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/TS1363
    Regards,
    - Brenden

  • 0 bytes at serial port after Visa Write

    Hi,
    I'm having problems communicating with a Pollux box controlling a stepper motor (both from Micos). The Pollux box has an RS232/485 connection to the computer. 
    I have tried adaptations of LV's Basic Serial Read and Write example. Even for the basic example there has never been any bytes at the serial port after the write.
    I have attached some sample code for LV 10.0.1(64bit) and the OS is Windows Server Enterprise 2008.
    The Visa drivers have just been installed.
    After some research I have added a 'Set I/O buffer size' as advised by http://digital.ni.com/public.nsf/allkb/60DDFED7EFEFE7188625705700750821?OpenDocument
    The time-out is set to 10s, I have a wait of 1s before read and 0.5s between each write (the characters are written individually incase that was the problem).
    The write command getaxisno_ should reply with the default axis no which is 1. However, there is never any reply.
    The termination character for Venus2 is a space for transmitting commands and ASCII CR LF at the end of received data.
    I'm not sure what else could be wrong. According to MAX the device is working properly. Although, when I try to open a Visa test panel in MAX the program crashes. I'm not sure if this is a related problem.
    I'd be really grateful for any advice, have been trying to fix this for a few days now.
    Thanks in advance!
    Ciara
    Attachments:
    Getaxisno test.vi ‏18 KB

    Thanks, I'll search those now.
    When I click the test panel button, the Max window disappears and the program is closed. Next time I open it an Unexpected Error box opens with a message saying there was an unexpected error and I should search Info Code MAXKnownException.
    'The exception occurred in the NIMax process in the function (Unknown).'
    I have searched this and the info advised me to send a report with log files etc to NI which I have done. Just waiting on the reply.
    I copied the Visa resource name from MAX and the termination character is the same as what a previous owner of the equipment used in Visual Basic. 

  • Scroll bar does not retain its position after or before pack

    Hi
    My Scroll bar does not retain its position after pack in my application.
    But i need to retain its state.
    My code snippet is :
    System.out.println("VAlue--->" + getHXValue());
    scrollPane.getHorizontalScrollBar().setValue(getHXValue());
    pack();
    My VAlue printed is 100.
    But my positon of scroll bar is at 0 th location.
    Can any one help me.....

    Swing related questions should be posted in the Swing forum.
    My code snippet is :Snippets don't help.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • EMac modem does not release phone line

    I have an original eMac. The modem is capabale of receiving and sending faxing. However, occasionally it does not "release" the phone line causing any incoming fax to get a busy signal and if you try to dial the phone number you also get a busy signal. Unplugging the phone line from the modem port resolves the issue as does restarting.
    What can be done to fix this issue besides getting a new modem.
    Thanks!

    I recall having similar problems with my home pre-broadband dial-up account under 10.1.5. That was blamed on the computer modem and the ISP modems implementing different versions of the same modem protocol (which certainly doesn't say mush for the 'standard' part of the v.92 protocol). That I thought was fixed in later versions of OS X, but you may still want to contact your ISP to ask them if they're aware of other Mac dial-up users with the same problem and if they can suggest any modem commands to add to your modem command strings. You can ask them to check on their end to see if they're receiving the line release command from your modem when you attempt to hang up.
    Since most Mac-related questions to ISP support seem to garner a response of "huh?", your other option would be to try dropping the modem protocol from v.92 to v.90 (and if necessary even lower) to see if those protocols are more compatible with your ISP's modem banks.

  • I tunes does not recognize i touch after trying to upgrade software

    My itouch was working fine until an error occured while trying to upgrade the software. Now, when i plug it in it just shows me a picture telling me to connect to itunes, and i tunes does not recognize my ipod as being connected. i can not get the ipod to even go into the main menu

    Of course iTunes won't recognize an iTouch. That's not an apple iPod. Are you thinking of the iPod touch?
    Hah, I'm just kidding. For your issue here, I suggest a few things
    -Restart your computer
    -Make sure you have the latest version of iTunes by going to 'help' and then 'check for updates
    -Try another USB cord
    -Try another USB port and make sure your USB drivers are installed correctly and up to date (http://support.apple.com/kb/TS1538)
    -Restart the Apple Mobile Device Service (http://support.apple.com/kb/TS1567)
    -Uninstall iTunes and reinstall (http://support.apple.com/kb/HT1925)
    Those steps should fix everything up for you but if they don't, be sure to try it on a different computer.
    Hope I helped
    Becca

  • Mail does not load the mail after opening with 10.10.3 on macbook air

    Mail does not load the mail after opening with 10.10.3 on macbook air

    Under Window in the Menu bar select Connection doctor. You will see green to indicate a connection and red to show there is a problem. Except for iCloud account you'll see two entries for each account 1) receiving and 2 SMTP for sending.
    If it's red, this usually means it's missing the password.
    For Incoming messages, set in the account window, under Account Information tab.
    For Outgoing (SMTP) messages, follow these steps:
    EDIT SMTP SETTINGS
    In Accounts window > Outgoing Mail Server SMTP:  select to Edit SMTP Server list... from popup.
    Select account in the list.(It's not uncommon to find extra SMTP servers listed. When you remove account, Mail does not delete the smtp info. You might need to do some clean up in the list to remove the extras.)
    Under Advanced Tab:
    Apple defaults to the default ports (25,465, 587) but some servers prefer a custom port. Check to see what port they recommend. Gmail for example likes 465, Outlook.com 587.
    Verify if your server require SSL.
    User Name. Enter full email address  eg.  [email protected]
    Add password if it is blank.(If you have two step authentication setup, you'll need to get an app specific password  more info)
    Open Connection Doctor under Window in the Menu bar.
    Do you see green light now for your account SMTP?

  • ORB does not perform clean up after destroy() is called.

    hi,
    the HelloClient example (POA model) which is provided in the Java IDL tutorials, does not perform clean up after the execution is complete.
    i.e. i can still find the Socket descriptors in the file system under the path (/proc/p_id/fd). Do we need to explicitly destroy the sockets inorder to perform the required clean up??the OS i'm using is Linux.
    if yes, then how do i do that.... the following are the steps to reproduce the problem:
    1)start HelloServer
    2)start HelloClient
    3)check file count in /proc/process_id/fd before calling init.
    4)invoke ORB.destroy() method.
    5)check file count in /proc/process-id/fd after destroy completes.I have included Thread.sleep(25000) inorder to check the file count dynamically at each stage of execution.
    Any help in this regard is welcome....!!
    thanks in advance

    Hello:
    This reply may be long after the time that you need it ... but the problem
    that you are experiencing sounds very much like a bug that was fixed in the J2SE 1.5.0_10 release.
    It is bug 6354718 ....
    In the evaluation section of that bug they note:
    Yes. It's a known bug in ORB connection management. What's happening here is, the connectionCache that maintains both inbound and outbound connections does not reclaim connections, upon ORB destroy() call. There is a connection reclaim() logic in place, but does not kick in, until it reaches certain watermark levels. Since, a single client can have a multiple ORBs and thereby multiple outbound connections (in the reported case) , with each cache having exactly one connection which leaks up on ORB exit. This leak multiplies based on the number of ORBs and time period over which client stays live, up and running.
    The solution is, to walk through the connection cache and close each connection,
    no matter what the watermark levels are. This can be done at the corba transport manager close() call.
    Note: In the above evaluation they tell you how to fix it yourself but I believe (I haven't tested it yet ....) that if you upgrade to JDK 1.5.0_10, you should find that it has been fixed for you.
    I hope that I'm not steering you wrong, but that's my take on your situation.
    John

  • Podcast logo how long does it take to effect after being approved

    my podcast has been approved and the Url was accessible but why my logo is not reflecting? how long does it take to effect after being approved?
    https://itunes.apple.com/ca/podcast/toronto-gospel-ministries/id712382987

    It can take quite a long time, but in your case your logo is now visible.

  • Can I Hook an Apple TV to an older TV that does not have HDMI Ports using a connector cable

    I have an older Sony HD TV and would like to hook my Apple TV to that TV but it does not have HDMI Ports.  Can I hook my Apple TV to this TV through a cable adapter that converts HDMI to Component Video and Audio (Red Green Blue Video Cables, Yellow White Audio) or HDMI to S-Video.  I have both these connections on my TV.  Thanks

    Thanks, I actually meant a converter box I just wanted to make sure that using that would work.  With Amazon FireTV Sticks for example I  jhave been told that only a direct HDMI connection to the TV would allow the device to work at all.

Maybe you are looking for

  • Imovie HD installation problems

    I have new macbook with ox 10.6.7 and ilife 9 already installed from the retailer.  I want to install imovie HD without affecting my newer version. I have read the previous ideas and tried to paste the text into my terminal app, but it still didn't w

  • Adobe Media Encoder CC renders do not reflect changes to Dynamically Linked After Effects Comps

    When rendering a Premiere timeline with a dynamically linked After Effects composition, Adobe Media Encoder will sometimes use an older version of the linked composition (even after I have saved changes in the After Effects comp). For example, if I c

  • Firmware update N80 with Vodafone

    Well finally last night I got to upgrade my N80 to 4.0623.0.41 of the firmwear. I was so happy........... ..until I started to use my phone, pronlems and lots of em. Themes that I have used before on my N80 and have functioned/looked as they should.

  • DVD-RW or DVD+RW for iBook?

    What type of DVD (-RW or +RW) will work for burning photos on my 4-yr.-old iBook running OS X 10.4.10? Staples recommended the -RW, but my iBook spits it out after trying to read it.

  • BI Load Failure: Error message....IDoc ready to be transferred to applicati

    Hello All, Many loads failed in Production, and in the monitor status it show Extraction (messages): Missing messages (Status :Yellow)        Missing message: Request received    (Status :Yellow)        Missing message: Number of sent records (Status