Jump to content

Need Help BADLY! Require a simple VI for reference. Stuck.


cjx

Recommended Posts

Currently working on a project with the Requirements below.

Currently about 80% of the project is done as far.

Requirements:

Step 1: Open a .vi, Run when Opened. It reads the PC system date/time and create a new folder of the current system date at a specific directory. (E.g. 25 August 2010.) Folder: 100825 >>> Completed

Step 2: After the Folder is been created, it uses TCP/IP Connection to transmit text data from another computer into the created folder. With the folder containing the text data. >>> Completed

Step 3: With the data collected, it reads the text data in the folder according to the current system date 100825 to produce the output graph chart. >>> Completed

Step 4: The .vi runs continuously, so is the PC system date/time. Running at the time reaches 2359hrs, 100825 ---> changes to a new date, 0000hrs, 100826 >>> Completed

Step 5 (Error Occurs): With a new date/time falls, Error prompt out. The running .vi unable to return back to (Step 1) but stops at (Step 3) with Error occurs. :frusty:

Need help on the (Step 5) issue.

Been try quite a number of times of ways to solve yet unavail.:(

Is there anyone out there able to create a simple .vi that containing with the requirements above?

As need that for help as for reference.

Regards,

david.

The Step 1 to 5 sequences keeps on running from Step 1 > 2 > 3 > 4 > 5 over and over again whenever a NEW date falls.

:frusty:

Regards,

david.

Link to comment

Currently working on a project with the Requirements below.

Currently about 80% of the project is done as far.

Requirements:

Step 1: Open a .vi, Run when Opened. It reads the PC system date/time and create a new folder of the current system date at a specific directory. (E.g. 25 August 2010.) Folder: 100825 >>> Completed

Step 2: After the Folder is been created, it uses TCP/IP Connection to transmit text data from another computer into the created folder. With the folder containing the text data. >>> Completed

Step 3: With the data collected, it reads the text data in the folder according to the current system date 100825 to produce the output graph chart. >>> Completed

Step 4: The .vi runs continuously, so is the PC system date/time. Running at the time reaches 2359hrs, 100825 ---> changes to a new date, 0000hrs, 100826 >>> Completed

Step 5 (Error Occurs): With a new date/time falls, Error prompt out. The running .vi unable to return back to (Step 1) but stops at (Step 3) with Error occurs. :frusty:

Need help on the (Step 5) issue.

Been try quite a number of times of ways to solve yet unavail.:(

Is there anyone out there able to create a simple .vi that containing with the requirements above?

As need that for help as for reference.

Regards,

david.

The Step 1 to 5 sequences keeps on running from Step 1 > 2 > 3 > 4 > 5 over and over again whenever a NEW date falls.

:frusty:

Regards,

david.

If you mean when there is an error condition you are getting an error dialogue when you shouldn't be, then you probably have an unwired error out cluster (or none at all) and "Enable Automatic Error Handling" is set in the offending vis "Execution" properties.

Link to comment

If you mean when there is an error condition you are getting an error dialogue when you shouldn't be, then you probably have an unwired error out cluster (or none at all) and "Enable Automatic Error Handling" is set in the offending vis "Execution" properties.

Its a error stated: Open.vi +Open.file...

whereby as a new date falls, it unable to read the text data according to the date required.

is it possible to provide me a simple VI according to the requirements needs?

for reference

Perhaps got a better solution getting the requirements done?

Many Thanks...

Regards,

david.

Link to comment

Is it a "can't open file" error, a "file not found" error, etc? Why don't you post your code and maybe that will help us help you.

This the pictures as shown of the actual VI how is runs, sequences and the Error 7 Occured.

Regards,

david

:frusty:

post-18257-041570100 1286506712_thumb.jp

post-18257-072760900 1286506718_thumb.jp

post-18257-061190200 1286506725_thumb.jp

post-18257-031389200 1286506732_thumb.jp

post-18257-052251500 1286506738_thumb.jp

Link to comment

This the pictures as shown of the actual VI how is runs, sequences and the Error 7 Occured.

Regards,

david

:frusty:

I saw this error today when i was trying to save to a database on a network, but my PC login/user didn't not have access to the network address.

There maybe other reasons for this error, but I would think it has something to do with an incorrect path location (either save or open)

Link to comment

OK. I get it.

couple of things to look at.

1. What is the 100823? If it is system time (like in excel etc) I'd expect that to be 40413 for 23/08/2010. Whereas 100823 would be 15/01/2176.

2. From your images. You show 100823 with no directories afterwards. Then you show after the roll-over 2 extra directories (albeit without the 100824). Could it be that the data you are expecting in 100824 is in fact in one of these and your program has skipped when saving for this particular date?

3. Is this the only date it happens on? Does the software quite happily save as you expect but on this particular date it doesn't? You show many directories previously and after the 100824.

4. Looking over the history of results. there are many "gaps" in the data record 100722 suddenly jumps to 100820 (98 days?) , 100531 suddenly skips to 100601 (70 days?) etc. What is the reason a file wasn't saved between those periods? Could it be a case that you just didn't receive any data therefore there was nothing to save?

Link to comment

Regards on the Network Address (IP) doesnt have any issue.

As the 1st folder which shown is successfully created and text data been transmitted and able to produce the output of the requirement needs.

Problem facing is the part when a NEW date reaches to get the whole .vi runs all over again from the 1st sequeunces.

Regards,

David.

:throwpc:

Q: 1. What is the 100823? If it is system time (like in excel etc) I'd expect that to be 40413 for 23/08/2010. Whereas 100823 would be 15/01/2176.

A: 100823 = 23 August 2010. The name of the folder "100823" where this folder once created, the text data will transmit into the folder 100823 according to the system date from another computer.

Q: 2. From your images. You show 100823 with no directories afterwards. Then you show after the roll-over 2 extra directories (albeit without the 100824). Could it be that the data you are expecting in 100824 is in fact in one of these and your program has skipped when saving for this particular date?

A: The directories is the same under the directory "solardata". The sequences for "100824" to be created will repeat the same sequences all over again from the very first part.

Q: 3. Is this the only date it happens on? Does the software quite happily save as you expect but on this particular date it doesn't? You show many directories previously and after the 100824.

A: Ya, its happily save as what it required, issue is a NEW date falls. It doesn't allow the .vi runs continuously from this 1st part til the last part and repeat all over again as long the NEW date (system date) reaches.

Q: 4. Looking over the history of results. there are many "gaps" in the data record 100722 suddenly jumps to 100820 (98 days?) , 100531 suddenly skips to 100601 (70 days?) etc. What is the reason a file wasn't saved between those periods? Could it be a case that you just didn't receive any data therefore there was nothing to save?

A: The "gaps" in the data record are part of the files example for show to you all guys. Fact is a set of dates each day by day should set to be stored into the directory "solardata" (E.g. 100823 to the world ends) allowing the .vi to runs continuously.

:book:

On the shown of the actual VI how is runs, sequences and the Error 7 Occured.

The Error 7 only allow me to click on "Continue" or "Stop"

It required me to click on "Stop" and manually click on the "Run" of the .vi then allowing me to have the .vi to run the sequences all over again,

allowing it to Create the NEW date folder (E.g. 100824) and transmit text data into the folder.

where problems lies that if possible shouldn't have the Error 7 to appear but it continuously runs on from the 1st sequences all over again

to produce the (different output each day falls - output for each day is different values)

Regards,

david

:frusty:

Link to comment

On the shown of the actual VI how is runs, sequences and the Error 7 Occured.

The Error 7 only allow me to click on "Continue" or "Stop"

It required me to click on "Stop" and manually click on the "Run" of the .vi then allowing me to have the .vi to run the sequences all over again,

allowing it to Create the NEW date folder (E.g. 100824) and transmit text data into the folder.

where problems lies that if possible shouldn't have the Error 7 to appear but it continuously runs on from the 1st sequences all over again

to produce the (different output each day falls - output for each day is different values)

:frusty:

I gave you the answer to to that in my first post. (You can press continue by the way).

Check the VI properties of all your VIs and make sure this is unchecked.

Edited by ShaunR
Link to comment

I gave you the answer to to that in my first post. (You can press continue by the way).

Check the VI properties nd make sure this is unchecked.

ShaunR, thanks on the tips.

Problem still currently stuck at the same issue... nothing changes, Error 7: .... still occurs.

Regards,

david

:throwpc:

Link to comment

Put an indicator on your FP that tells you exactly what file it's trying to open (you can use a probe, but indicator would be easier to read). Then make sure that file exists; or maybe the name's not being formatted right.

Link to comment

Put an indicator on your FP that tells you exactly what file it's trying to open (you can use a probe, but indicator would be easier to read). Then make sure that file exists; or maybe the name's not being formatted right.

hmmm.... "FP" means?

indicator?

is it possible to provide a .vi or picture as to link what you means, as what you mentioned?

a picture tells a million words.

thanks.

david

Link to comment

hmmm.... "FP" means?

indicator?

"FP" means Front Panel (if you ever see "BD" it means Block Diagram). An Indicator is an output terminal (as opposed to a control which is an input terminal).

Right-click on your FP. Select either "Modern" or "Classic". Select "String & Path". Select "File Path Indicator". Wire this path indicator to the input of your Open function. Put it anywhere on your Front Panel -- maybe under the time/date indicator, it looks like there is plenty of room there. Or if the actual Open is being done in a sub vi, put the indicator there and keep the sub vi open while you're running your program.

The point of this is to be able to see exactly what path is being sent to the Open function. Two usual ways to generate a "file not found" error is for the file to not be there (doh), or if your code isn't generating the path correctly.

If this explanation isn't enough, let me know and I'll generate some code. I run LabVIEW on a different machine so I'll need to SneakerNet it over here.

Link to comment

It's really frustrating reading this thread because we can't see your code. Could you attach your code? Not pictures. The actual VI file.

Based on the error dialog, this is what I came up with:

post-2-072813300 1286673188_thumb.png

It required me to click on "Stop" and manually click on the "Run" of the .vi then allowing me to have the .vi to run the sequences all over again,

allowing it to Create the NEW date folder (E.g. 100824) and transmit text data into the folder.

The problem is solved in the above statement. "...allowing it to Create the NEW date folder (E.g. 100824) and transmit text data into the folder."

Basically, the file does not exist yet. In the image I attached I'm showing the Read Characters From File.vi, however I'm not sure if you are reading or writing. So find the appropriate VI in your case.

So if the folder hasn't been created yet then how can either a read or a write occur without error? Of course you will have an error if you haven't created the folder yet.

Link to comment

"FP" means Front Panel (if you ever see "BD" it means Block Diagram). An Indicator is an output terminal (as opposed to a control which is an input terminal).

Right-click on your FP. Select either "Modern" or "Classic". Select "String & Path". Select "File Path Indicator". Wire this path indicator to the input of your Open function. Put it anywhere on your Front Panel -- maybe under the time/date indicator, it looks like there is plenty of room there. Or if the actual Open is being done in a sub vi, put the indicator there and keep the sub vi open while you're running your program.

The point of this is to be able to see exactly what path is being sent to the Open function. Two usual ways to generate a "file not found" error is for the file to not be there (doh), or if your code isn't generating the path correctly.

If this explanation isn't enough, let me know and I'll generate some code. I run LabVIEW on a different machine so I'll need to SneakerNet it over here.

iC...

possible to generate some code? while i trying to upload the code what i had done so far here asap.

Thanks.

It's really frustrating reading this thread because we can't see your code. Could you attach your code? Not pictures. The actual VI file.

Based on the error dialog, this is what I came up with:

post-2-072813300 1286673188_thumb.png

The problem is solved in the above statement. "...allowing it to Create the NEW date folder (E.g. 100824) and transmit text data into the folder."

Basically, the file does not exist yet. In the image I attached I'm showing the Read Characters From File.vi, however I'm not sure if you are reading or writing. So find the appropriate VI in your case.

So if the folder hasn't been created yet then how can either a read or a write occur without error? Of course you will have an error if you haven't created the folder yet.

hmmm.. alrite.

i'll try to attached my code here asap.

as because that's many parts of .vi into under one same folder to a quite a large space exceeded 10MB.

still working and fixing onto it.

thanks.

Link to comment

Trying to compressed the folder as not to exceeded 10MB, its hardly possible.

Total 40MB of the folder. A list of VIs link up together for this project.

This the 3 VIs i attached.

The MAIN project would be the AMK_SolarMonitoringSystem_vi.vi

It wun work unless the rest of the other VIs combined into a same folder.

But it is possible to allow to view the code.

regards,

david

:(

AMK_solarmonitoringsystem_vi.zip

checkdate_LV86_vi.zip

Start_vi.zip

Link to comment

The first error it came up with (with what you described) was here.

Check that path exists.

I changed if the "c:\ftpscript.txt" and no longer got the file error (obviously). However, it then complained about this one (again doesn't exist...but then it probably wouldn't on my machine)

By adding an error out indicator Labview will no longer automatically handle the error.

But you really need to think about your error handling because currently the software is not robust and I can see you spending the next 2 weeks creating directories that the software thinks should be there..

Edited by ShaunR
Link to comment

The first error it came up with (with what you described) was here.

Check that path exists.

I changed if the "c:\ftpscript.txt" and no longer got the file error (obviously). However, it then complained about this one (again doesn't exist...but then it probably wouldn't on my machine)

By adding an error out indicator Labview will no longer automatically handle the error.

But you really need to think about your error handling because currently the software is not robust and I can see you spending the next 2 weeks creating directories that the software thinks should be there..

thanks ShaunR, i still working on it... stuck

just the very last part with the requirements i need to and done... yet still unfinished.

so need consulation and help..

hmmm, on yr above mentioned reply will take note and touch up...

but still, the last part matters alot...

:(

david

Link to comment

I'll try again...

post-9165-066622500 1286885900_thumb.png

You need to figure out *why* you're getting this error. When I've gotten it in the past, it's generally meant I haven't created the file/path correctly. As in the code above, wire a path indicator into the code immediately before you do the file read where the error is occuring and then stop the code (breakpoint). Check to make sure the path and filename look right. If they do, check to make sure the path and file actually exist. Let us know how that turns out.

And I agree with Shaun, a little time spent on better error handling would probably save you time in the long run.

Link to comment

I'll try again...

post-9165-066622500 1286885900_thumb.png

You need to figure out *why* you're getting this error. When I've gotten it in the past, it's generally meant I haven't created the file/path correctly. As in the code above, wire a path indicator into the code immediately before you do the file read where the error is occuring and then stop the code (breakpoint). Check to make sure the path and filename look right. If they do, check to make sure the path and file actually exist. Let us know how that turns out.

And I agree with Shaun, a little time spent on better error handling would probably save you time in the long run.

Cat,

Thanks.. gotta take your tips in mind and touch up wat i could for reference.

by the way, what's that Red Dot in the diagram of yours? input on our own or?

what's that?

hmmm...

need a huge reference and coaching before can get this issue problem done.

david:book:

I'll try again...

post-9165-066622500 1286885900_thumb.png

You need to figure out *why* you're getting this error. When I've gotten it in the past, it's generally meant I haven't created the file/path correctly. As in the code above, wire a path indicator into the code immediately before you do the file read where the error is occuring and then stop the code (breakpoint). Check to make sure the path and filename look right. If they do, check to make sure the path and file actually exist. Let us know how that turns out.

And I agree with Shaun, a little time spent on better error handling would probably save you time in the long run.

Cat,

on your amk.png diagram, is which part to touch up under my project?

david

Link to comment

by the way, what's that Red Dot in the diagram of yours? input on our own or?

what's that?

It's called a "breakpoint". Right-click on a wire. Select Breakpoint --> Set breakpoint. This will create the little red dot. Program execution will stop at that little red dot so you can check the value of the file path indicator that you are about to read, and check that that file actually exists.

on your amk.png diagram, is which part to touch up under my project?

Where ever it is that you are reading the file that is throwing the error.

I can't tell you any more than that since when I downloaded the 3 links you sent, they opened with multiple files missing. When I tried to go to the website where you said all the code was, I got an HTTP 404 error (page not found).

Link to comment

It's called a "breakpoint". Right-click on a wire. Select Breakpoint --> Set breakpoint. This will create the little red dot. Program execution will stop at that little red dot so you can check the value of the file path indicator that you are about to read, and check that that file actually exists.

Where ever it is that you are reading the file that is throwing the error.

I can't tell you any more than that since when I downloaded the 3 links you sent, they opened with multiple files missing. When I tried to go to the website where you said all the code was, I got an HTTP 404 error (page not found).

http://www.4shared.com/file/pLq892VP/Lijun_AMK.htm

here.

don't mind try again?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.