Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

difficulty with webDAV to transfer file to RT

Solved!
Go to solution

Hello, I'm trying to follow the KB article "using WebDAV to Transfer Files to Your Realtime Target".  I mapped the target (sbRIO9637) as a network drive and I can explore the files in WIndows.  I set a non-blank password on the target.  However when I run SimpleGetFile I only get error 7.  I'm not clear how to type the URLs, the detailed help says to use command prompt or file explorer to verify filenames, but I don't get exactly what that means.  Also, I'm not certain that the URLs are wrong, if I wire a bad password then I also get error 7.  I attached a snippet.  The local file path is C:/Users/Public/Form1.cs in this case.  I suspect the URL format but not sure where the basic problem is!

Thanks,

Jesse

 

0 Kudos
Message 1 of 15
(6,172 Views)

Just right off the bat, you have admin string hooked up to password.  THe default password is blank.  Try removing that first.

 

Second, how far have you gotten in the Knowledge Base before you get confused?  How many steps are you able to complete?

 

-Bear

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 2 of 15
(6,150 Views)

Hi Bear, thanks for the feedback, first I think the password is working in this case because some file transfer instructions said they don't work with a blank password and in this case I changed the password to "admin".  I agree that the wiring is generally wrong since it will fail for any other password but I expect it to work in this test case.

 

I have completed all the KB steps on the Windows portion and I can manually add files and folders.  I start to get confused in the tip after step 10 of "Win7 installation" since the tip shows the \ character in the examples but when I'm looking at the mapped network drive information in Windows it shows the / character instead.

 

The last step in the KB is "Using the WebDAV VIs" to programatically store files.  I am stuck on this step with getting Error 7 always.  I don't know how to determine the correct format for the 2 file designators, I have guessed several combinations.  I am also unclear on which is considered remote and local in this case!  The detailed help for Error 7 suggests using the command prompt to check the file names but it doesn't specify which command would accomplish this so I don't see what to do next.

 

Please advise.

 

Thanks,

JEB

0 Kudos
Message 3 of 15
(6,145 Views)

Good to know about the password.  As long as the spelling is correct, we can table that for the time.  For future reference, I would set securities after I get things working just to save development mistakes.  To many headaches in the past.

 

Getting a clearer picture of what you are trying to do would help clarify the remote and local issue.  The 'remote system' should be your cRIO and 'local files' should be the files that are on whichever system you are in at any point of code.  

 

Knowing that, what are you trying to do with this VI?  Where is it located?  

 

Also, my Windows File explorer shows these 'C:\Users\'

 

-Bear

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 4 of 15
(6,134 Views)

OK, my goal here is to have code running on the 9637 RT to select an existing file on the PC, and copy that into the RT Linux file system (into an allowed location).

 

I have it working in Windows Explorer so I can make folders and drop files in the 9637.

 

However when I run the WebDAV VI on the RT I am stuck with getting Error 7.  It appears that I need to find the correct strings to input the local path and remote file URI terminals.

 

You stated 1) the remote system is cRIO, and 2) local is where the code is running.  However the code is running on the the cRIO RT processor, so that seems to make the cRIO local as well and I don't get how the PC is designated!

 

From my screenshot showing the RT Linux files from the PC, do you have enough information to provide example text strings that would work for the remote file URI and local file path terminals?

 

Regarding the / and \, I assume the \ should be used since if I "copy path as text" I get: 

R:\home\lvuser\Patterns

where R is the letter I chose for the network mapped RIO

However I attached a screenshot where Windows is showing me / characters, which seems confusing.

 

I agree with holding off on security in the initial stages, but when setting up the file transfer authorizations, there were warnings that a blank password is not supported, so I tried to choose something obvious.

 

Thanks

 

JEB

0 Kudos
Message 5 of 15
(6,122 Views)

So, if you are trying to pull a file from the host computer and you are running this code on the 96xx, why is your input for the file location string on the 96xx?

 

-Ben

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 6 of 15
(6,108 Views)

I may not understand your question, since the code is running on the 96XX, the file location string is inherently data on the 96XX I think...

 

But here is a scenario, a user interface program using USB sends a command which specifies a new file to use which exists on another PC on the LAN cable.  The RT uses the correct name for this file and transfers it to the 96XX for later real time use independent of the PC.

 

Again, I think I could proceed if I saw one example of filename strings that do work.   The image I attached last time was intended to show enough information to come up with example file names.  The documentation shows general formulations with optional square brackets and a person might not see how to do it the first time.

 

Please advise, thanks!

 

JEB 

0 Kudos
Message 7 of 15
(6,102 Views)

Hey Jesse,

 

I was not expecting this but you are right that their seems to be differences in the string and file format.

 

I found this example and took a picture as I couldn't find any full code.  I did find out that labview has an example project in the Help>Find Examples>Search>webDAV that you can reference.

 

Let us know if this fixes the file permission issue. 

 

-Ben

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 8 of 15
(6,090 Views)

Hi Ben,

I did utilize that example as my starting point.  I verified now that I can run that example on My Computer and it will place a file on the 96XX, so my installation and file permissions appear to be OK.

 

However I need to run the WebDAV VI on the RT, but now I see only error 7 and this possibly would indicate that the local and remote roles have switched due to the location of executing code.  The local path in the Linux RT file system I think would be /../home/lvuser/Patterns/file1.dat (correct?), but with code running on the RT how do I specify the (remote?) file that lives on the Windows PC that has the 96XX as a newtork drive? 

 

 

Also I assume I need to use SimpleGet running on the RT since SimplePut is what does the job running on MyComputer in the example.  I tried using both on the RT but saw error 7 in either case.

 

Thanks,

 

Jesse

0 Kudos
Message 9 of 15
(6,084 Views)

Hey Jesse,

 

I think what we are running into is Windows permission issue.  If we eliminate the RIO and just think about computer to computer, without setting up a server on one of the computers, Computer A couldn't just IP over to Computer B and access it's file.

 

The RIO in the KB set up is acting as a server and the Host Computer a client that can read/write/transfer files on the RT.  We want to do the opposite and it should be as easy as running the Webdav API VI's on the RT, minus the windows permissions issue.  

 

I think we should play around with the windows permissions on the files you are trying to access from the RT.  I don't know how to setup the server on the RT, but that might be something we need to look into if the permissions doesn't work.  Let me know if I am not making sense.

 

-Ben

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 10 of 15
(6,063 Views)