LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1430 at Read from Text File

Solved!
Go to solution

Hi,
I have made an application from a few VIs. 

When I try to run the application, I get following error:

SudiptaDas_0-1704389790915.png

This happens only if I try run the application. This DOES NOT occur if I run the VIs in developer mode.
I have configured all the filepaths in all VIs such that they allow new or existing files.
Thanks in advance. I appreciate your suggestions.

Download All
0 Kudos
Message 1 of 8
(945 Views)

Hi Sudipta,

 


@SudiptaDas wrote:

This happens only if I try run the application.


So which filepath is used in your app when that error occurs?

Did you add any debugging code to handle that error?

 


@SudiptaDas wrote:

This DOES NOT occur if I run the VIs in developer mode.


I don't see any UI handling code in your main VI!

When you start the executable it will immediatly run and so it will use those empty filepath controls to call the subVIs!

 

Why do you wonder about the behaviour of your executable when you don't provide any useful UI handling?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(944 Views)

Hi GerdW,
Thanks for your reply.

It seems to me that as an amateur LV coder I do not know enough about building an executable.

So, what kind of UI handling code is a standard practice? Will a simple state machine work?
I did not know that the executable runs immediately after start. Is there a way to circumvent that?
Thank you

0 Kudos
Message 3 of 8
(922 Views)

Hi Sudiptas,

 


@SudiptaDas wrote:

I did not know that the executable runs immediately after start. Is there a way to circumvent that?


So you open your favorite browser executable and you need to explicitely "start" that exe to be able to access the internet?

You open MSWord and there is a "run me" button before you are able to edit any text document?

Which other executable can you name that does not immediatly run after start???

(And no, there is no way to prevent an executable from running immediatly. It is the purpose of an executable to run after start!)

 


@SudiptaDas wrote:

So, what kind of UI handling code is a standard practice? Will a simple state machine work?


You need a way to wait for user actions!

A simple (polling) state machine would be fine, and other approaches like a QMH with some user event handling loops too…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(902 Views)
Solution
Accepted by topic author SudiptaDas

Hi SudiptaDas,

 

Here is a simple example of UI handling using an event structure within a while loop.

The report generation is executed when the "Generate" button is pressed.

If an error occurs when generating the report, a dialog box will display it.

Also clicking on the top-right cross of the window closes the application.

 

raphschru_0-1704394571495.png

 

Regards,

Raphaël.

Message 5 of 8
(895 Views)

Hello,

Thanks for your response! It seems like you are quite upset at my lack of knowledge about software. 

I found a way to circumvent immediate run after start:
In "Source File Settings"  check "Set VI properties for all contained items":

SudiptaDas_0-1704396588428.png

Then go to "Customize VI Properties" just underneath it, and uncheck "Run when opened" under "Execution":

SudiptaDas_1-1704396717003.png

It did the trick well enough for me for what I needed. I am very much willing to accept that that should not be the "Right Way" to do things.
Best wishes 🙂



0 Kudos
Message 6 of 8
(880 Views)

Hello Raphael,
I appreciate the suggestion. Thank you:)

0 Kudos
Message 7 of 8
(877 Views)

Hi Sudipta,

 


@SudiptaDas wrote:

I am very much willing to accept that that should not be the "Right Way" to do things.


It isn't the right way to create an executable that doesn't "run when opened"…

 


@SudiptaDas wrote:

It seems like you are quite upset at my lack of knowledge about software.


Because you claimed you know no other software that "runs when opened"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(873 Views)