LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Close Panel? Not Working when main code active?

Hi I have a program and before its shuts down I am writing the text on boolean button  to text file so it can be reloaded on front panel when restarting.

I tried OpenG and MGI but couldn't get them to load on the palette so I went down this route.

If I put a diagram disable over the main code and use task manager the code in Close Panel executes and closes.

If I re enable the code I get message from task manager 'The Operation could not be completed The Process is invalid. Get this message four times. The labview application does quit but does not run the code.in the close panel event.

So something in the main code is causing the issue but I do not know what .or how to fix.. Any advice gratefully received.

 

0 Kudos
Message 1 of 7
(661 Views)

You are probably correct that something that you wrote in your program is "wrong".  We'd be happy to look at your code, and perhaps suggest what might be fixed, or maybe "a better way to do that", but without seeing your code, we cannot provide much help.

 

To best enable us to help you, please do the following:

  • Attach LabVIEW code, that is, files that end in .vi, .ctl, .lvprog.  "Pictures of code" can be hard to view, even harder to test for ourselves.
  • It is best if you include the entire LabVIEW Project (as the problem might be in a sub-vi).  If the Project is in its own folder with all its sub-VIs and support files, right-click the folder and "Send to:", "Compressed (zipped) Folder".
  • Many of us (myself, included) do not have LabVIEW 2023.  If you are using LabVIEW 2022 or 2023, you'll reach more "experts" if you "Save for Previous Version" and specify LabVIEW 2019 or 2021.

Bob Schor

0 Kudos
Message 2 of 7
(652 Views)

@Connexus wrote:

I tried OpenG and MGI but couldn't get them to load on the palette so I went down this route.

If I put a diagram disable over the main code and use task manager the code in Close Panel executes and closes.

If I re enable the code I get message from task manager 'The Operation could not be completed The Process is invalid. Get this message four times. The labview application does quit but does not run the code.in the close panel event.

So something in the main code is causing the issue but I do not know what .or how to fix.. Any advice gratefully received.


To anyone familiar with LabVIEW, your description is pure gibberish. As has been said, we cannot debug your problems unless you show us what you are doing.

 

  • What is the "main code" that you are disabling? Does not sound like a great idea?
  • The windows task manager has nothing to do with LabVIEW. Killing a process probably does not fire a "close panel" event.

All you probably need is a "panel close?" filtering event that you discard, but write your file, then have the program come to an end gracefully.

0 Kudos
Message 3 of 7
(614 Views)

Hi Guys

I thought had attached main VI there are no subvi  but please find attached all the files required .attached . 

This is Labview 2015. 

When I create a small test program using Panel Close? I can use task manager to close it and the code excutes.

The diagram disable refers to troubleshooting .

The forum blocked certain files so I hope you have all required here but let me know if anything else needed.

 

The file type (.wav) is not supported.

The file type (.aliases) is not supported. 

The file type (.exe) is not supported

The attachment's amc client.lvproj content type (application/octet-stream) does not match its file extension and has been removed.

0 Kudos
Message 4 of 7
(569 Views)

Hi All 

Have decided this is actually not important at all .program off tough I am gonna drop this idea 

0 Kudos
Message 5 of 7
(506 Views)

It looks like your VIs were organized in a LabVIEW Project, perhaps in a Folder containing the .lvproj Project file, as well.  This is a Good Thing, and makes it easy to send everything to us without all those annoying complaints about File Types not supported.

 

Right-click the Project Folder, and from the Drop-down, choose "Send to" and "Compressed (zipped) folder".  This will make a single .zip file that contains the entire LabVIEW Project folder (zipped), which takes much less space and bypasses all those nasty notices you got trying to send your project to us.  Best of all, we know how to open .zip files (and really appreciate it when you send us Project this way).

 

Bob Schor

0 Kudos
Message 6 of 7
(470 Views)

Hi Bob,

The issue is in amc_client.vi and I fail to see how project files are involved. If it worked in the main VI I would build an .exe.

As mentioned this feature is no longer required. The emphasis has changed to keeping the program on disable shutdown and in windows startup files etc .

Thanks for help but I happy for the thread to be closed and not waste anyone time ..any further than I have

I will remember your tips for any other uploads I may have.

0 Kudos
Message 7 of 7
(437 Views)