LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 4 at write file +{I16} at labview 7.1

Solved!
Go to solution

Yes thanks, with this example

i will try!

0 Kudos
Message 31 of 40
(1,693 Views)

Well Gerd, I tryed here but I can't do it =/

 

Sorry if I'm asking too much, but the problem is... I want to learn LabView for sure, but I have to make that today!

My boss will travel tomorrow morning and he will need it. This is why I'm asking for help =/

 

 

I didn't understand why have 4 cases?

and could you make this example in Labview 7.1?

 

thanks!

0 Kudos
Message 32 of 40
(1,684 Views)

Well Gerd, this is what I did

 

erro lv.JPG

 

and at no error I only link the error.

 

But I'm receiving this message:

 

"Error 1 occurred at Close file in Mostra 4V4I 480V teste.vi

 

Possible reasons: An input parameter is invalid"

 

I also tryed it:

 

erro lv1.JPG

 

but have the same error x( I don't know =/

Message Edited by EduU on 12-14-2009 07:40 AM
0 Kudos
Message 33 of 40
(1,679 Views)

Hi EduU,

 

why do you open the same file again? I thought you want to open the next file? So you have to wire the filereference through the case structure too...

 

You close the file on every error (might be a bad idea), then the reference get's invalid and in the next iteration you try to close a non-valid reference - What's the error reason? Invalid parameter?

 

Ever tried your vi with execution highlight?

 

 

I didn't make 4 cases, I only made one case for error code 4. That's a huge difference!

Message Edited by GerdW on 12-14-2009 02:46 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 34 of 40
(1,676 Views)

Yes, I understand it now

 

I already make only one case to code 4, but I runned it as highlight and when the error was 4, EOF was to use the error case, but it was passing for the no error case... like don't have any error!

 

well, how can I open the next file? I want to open another one... but i think I was doing that making it:

 

erro lv1.JPG

 

How can I open the next file so?

0 Kudos
Message 35 of 40
(1,668 Views)

Hi EduU,

 

at the moment you close the file. "Close File" will return the path to the closed file - and you use exactly that path to open the file.

You have to provide the next filename to open! Or should LabView guess Smiley Wink which file to open?

 

Which error code is given when you want to close the file? Error code 4 is assigned to EOF... When you get different codes you have to check them too. Use a probe (and highlighting) to check that!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 36 of 40
(1,662 Views)

Hum I saw it now

 

But theres a problem, when the first file reach the final, the program just stop

and don't ask me for open another file, as I said before

 

When the EOF is in, the code is 4, but its using the "no error" case, so don't do nothing

but as i saw in your example, if the code was 4, it have to select the error case.

 

How can I make it select "error case" when reach the EOF ?

 

 

0 Kudos
Message 37 of 40
(1,656 Views)

Hi EduU,

 

ok, so you don't get an error - you get a warning! That's a difference...

 

You have to check for code=4 in the "no error" case (as it's a warning!). Simply right-click the "error" case string and select "Make this no error case"...

 

Then test again Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 38 of 40
(1,652 Views)

Hey Gerd, now it's almost fine

When the first file finish, LV open the box so I select the other file, but when I selected and click to open

the program stop =/

 

Why this now?

0 Kudos
Message 39 of 40
(1,645 Views)

Hi EduU,

 

"Why this now?"

 

Don't know. Smiley Wink Use execution highlighting to check why your vi stops...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 40 of 40
(1,643 Views)