LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fehler 1172 bei Invoke node und .Net

Hallo

Ich versuche, uber den Dateipfad und die darin enthaltenen Files deren Attribute zu ändern um diese dann zu löschen um zum späteren Zeitpunkt zu ersetzen. bei einigen Aufrufen funktioniert das auch, nur tritt beim letzten Aufruf der Fehler auf. Das Laufwerk, auf das sich hier bezogen wird, hat sich zu dem Zeitpunkt wieder verbunden.

Programmiert wurde dieser Code mit

LabVIEW 2015 SP1

auf Windows 7 -> darauf läuft es ohne Fehler

genutzt werden muss es jedoch auf Windows 10

 

Ich hoffe es gibt einen Weg, diesen Fehler zu beheben.

Download All
0 Kudos
Message 1 of 6
(1,410 Views)

Hallo RSDev,

 

du weißt schon, dass dies ein englischsprachiges Forum ist und du deshalb deine Fragen besser auf Englisch schreibst? Für deutschsprachige Diskussionen kann ich dir das www.labviewforum.de empfehlen…

 


@RSDev wrote:
I'm trying to change the attributes of the file path and the files it contains, and then delete them and replace them at a later point in time. This also works with some calls, only the error occurs on the last call. The drive referred to here has reconnected at that point in time.

Which file attributes are you trying to delete/change?

Which errors occur?

Are you sure that error only occurs on last call?

Why don't you use LabVIEW's ListFolder function to get the files in a folder?

Why does that drive "reconnect" while running your code?

Best regards,
GerdW


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

Hallo Gerd,

das habe ich nach dem Posten auch gesehen, durfte es aber nicht mehr bearbeiten...

to answer your Questions:

Which file attributes are you trying to delete/change?

- I want to set the attribute to normal so that I am allowed to delete it.

Which errors occur?

- Error dont appear at attribute change, it apears at Get Files - see at pictures

Are you sure that error only occurs on last call?

- I try that 30-40 Times. If I run the Debug mode, It works. If I run it normal, it appears at the same step.

Why don't you use LabVIEW's ListFolder function to get the files in a folder?

- Its not my code, I just have to fix it.

Why does that drive "reconnect" while running your code?

- Reboot is needed to get the changes work.

This subvi is called 3 times. A reboot has to be done after the first call. After the second, just a restart is forced. The error appears at my PC at the third call. At our production pc sometimes at the first, sometimes at the third.

Mine is Win 10 build 10.0.17763, prod pc is  build 10.0.19042 and LabVIEW is 2015SP1 with .net 4.0

 

0 Kudos
Message 3 of 6
(1,366 Views)

Hi RS,

 


@RSDev wrote:

Which errors occur?

- Error dont appear at attribute change, it apears at Get Files - see at pictures

Why does that drive "reconnect" while running your code?

- Reboot is needed to get the changes work.

This subvi is called 3 times. A reboot has to be done after the first call. After the second, just a restart is forced. The error appears at my PC at the third call. At our production pc sometimes at the first, sometimes at the third.


The error says: the folder was not found.

I guess that is related to your "reconnect"/"reboot"/"restart" procedure…

 

Do you need to reboot/restart the production computer that often?

Best regards,
GerdW


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

Hi,

sry I m not allowed to writte more then 2 Messages in 24h....
Yes, I need the reboot/restart. Can´t change this.

I tried another way I found in the german forum. In the forum, it was marked as running, but not at my system.

I cant change the permissions.

Need to delete this files.

Maybe you got an example to deal this er Win API, cause .Net doesnt work without faults.

 

greetings

0 Kudos
Message 5 of 6
(1,324 Views)

Hi RS,

 


@RSDev wrote:

Yes, I need the reboot/restart. Can´t change this.

I tried another way I found in the german forum. In the forum, it was marked as running, but not at my system.

I cant change the permissions.

Need to delete this files.


So there are some files you want to delete, but to delete them you need to change some file permissions first?

And the code in your new image tries to set the write permission on a file: do you get any errors when trying so?

You forgot to show the values in all those probes…

 

Can you do the same steps "manually" in the file explorer?

Do you have sufficient user rights to be able to change the write permission on that file?

Best regards,
GerdW


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