Page 1 of 2

FTP FUNCTION

Posted: Fri Jan 25, 2013 2:47 pm
by yang
I am using T4A. is it possible to write a program to use FTP function to download files from remote folder. I prefer to use HMI to process FTP.

Re: FTP FUNCTION

Posted: Fri Jan 25, 2013 2:51 pm
by Ron L.
With some scripting effort in C# it should be possible. Here is an example project to help get you started.
https://beislc.sharefile.com/d/s7d5793abceb49e59

Re: FTP FUNCTION

Posted: Mon Jan 28, 2013 9:42 am
by yang
Thank you for your response. Do you know where I can find a reference guide for OpenNETCF.Net.Ftp2 library?

Thanks

Re: FTP FUNCTION

Posted: Mon Jan 28, 2013 10:17 am
by Ron L.

Re: FTP FUNCTION

Posted: Mon Jan 28, 2013 10:43 am
by yang
but it doesn't include FTP2 library. Also I have one question as followed:

I want to use ftp to download a image file from remote destination. I have one screen with picture component. is it possible to change picture using script and I want to download images file into a specific folder in HMI?

Re: FTP FUNCTION

Posted: Mon Jan 28, 2013 11:33 am
by Ron L.
There is no OpenNETCF.NET.Ftp2, that's just what I re-named a DLL to distinguish it from an older version of that DLL. It is "OpenNETCF.NET.Ftp".

Yes, that's possible with C# script.

Discussed here:
http://social.msdn.microsoft.com/Forums ... 7108a594eb

Re: FTP FUNCTION

Posted: Mon Jan 28, 2013 12:39 pm
by yang
I modify your code, but it doesn't work. I only want to save image file into the local folder (I run program in PC, so I save file into output folder.) but I received error. I attaches them into the file. Please tell me the reason.

Based on my understanding, you modify library Ftp to FTP2. frankly, I can't understand the whole code ( I am very new for windows ce programming) because I don't have all documents. The functions you are in the programs, I can't find explanation from the link you send to me.

Re: FTP FUNCTION

Posted: Mon Jan 28, 2013 2:05 pm
by Ron L.
That example was written for WinCE-based HMI, you will need to modify it to make it work on a PC. The example downloads a file and copies that file to a USB thumb drive.

You said you wanted to download an image and display it. I don't have any examples that do that, but it should be possible with some effort. There was some discussing of displaying an image in C# here online.
http://social.msdn.microsoft.com/Forums ... 7108a594eb

Training how to program in C# is beyond the scope of technical support, but you can find literally thousands of free online tutorials that teach this programming language (google search "C# programming tutorials").

Re: FTP FUNCTION

Posted: Thu Jan 31, 2013 1:21 pm
by yang
I am using T4A.

How I can address the hardware disk.

In HMI, I save image file into HMI, how can I get them ?
If I save it into SD card, how I can address them?
If I save it into USB drive, how I can address them?

Thanks a lot.

Re: FTP FUNCTION

Posted: Thu Jan 31, 2013 4:25 pm
by Ron L.
In HMI, I save image file into HMI, how can I get them ?
One you save the file to a directory such as "\FlashDrive\Project\Project Files\", you would then need to open the file and load it's data to a Image or Picture object. I don't have any C# code written in iX Developer to do this, but it should be possible. Found some similar code here:
http://www.dotnetspider.com/resources/4 ... e-NET.aspx
If I save it into SD card, how I can address them?
The path for an SD card is "\Storage Card\"
If I save it into USB drive, how I can address them?
The path for a USB drive is "\Hard Disk\".