Jump to content

problem with sequence structure, and file handling


Recommended Posts

Hi,

I have come across a problem with sequence structures that I'm hoping someone on this forum can help me out with.

The sequence structure is one that is very simple and does the following:

sequence 0 - deletes temp-NRT.txt

sequence 1 - copies NRT.txt to temp-NRT.txt

sequence 2 - delete NRT.txt

sequence 3 - sum.VI reads temp-NRT.txt and creates a file SUM.txt

This is a sub VI to a main program that writes data to NRT.txt, therefore, the moment it leaves the sequence, a new NRT.txt file is created, and subsequently, data is written to it.

sum.VI sums up specific portions of the data in NRT.txt and all future calls to this specific vi is appended to the SUM.txt file.

The main program is constantly running and writing to NRT.txt

I have set the main program so that it will run through this sequence at 4:00:00 AM, and 4:00:00 PM each day.

For some reason, the first instance through the sequence works just fine (ie - when it hits 4 am, it runs through it and creates the correct SUM.txt file.

In the second time through the sequence, however (ie - 4 PM that same day), it would not delete the temp-NRT.txt file, and doesn't copy NRT.txt to temp-NRT.txt, yet it still deletes NRT.txt and runs through the sum.vi file.

The sum.vi file, as a result, spits out the same data i got at 4 am, since temp-NRT.txt was not deleted or changed.

So in essence, sequence 0 and 1 are not completed, yet sequence 2 and 3 run. Is this a bug in labview? or am I running into some sort of file handling error?

As you can tell, I am still not too familiar with all the functions of labview.

Any advice or criticism would be a great help to me!

:D

Thanks once again!

Naruto

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.