FTP FUNCTION

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
yang
Posts: 20
Joined: Wed Jan 23, 2013 9:22 am

FTP FUNCTION

Post 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.

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: FTP FUNCTION

Post 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
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

yang
Posts: 20
Joined: Wed Jan 23, 2013 9:22 am

Re: FTP FUNCTION

Post by yang »

Thank you for your response. Do you know where I can find a reference guide for OpenNETCF.Net.Ftp2 library?

Thanks

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: FTP FUNCTION

Post by Ron L. »

Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

yang
Posts: 20
Joined: Wed Jan 23, 2013 9:22 am

Re: FTP FUNCTION

Post 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?

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: FTP FUNCTION

Post 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
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

yang
Posts: 20
Joined: Wed Jan 23, 2013 9:22 am

Re: FTP FUNCTION

Post 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.
Attachments
screen1.jpg
screen1.jpg (267.64 KiB) Viewed 27328 times

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: FTP FUNCTION

Post 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").
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

yang
Posts: 20
Joined: Wed Jan 23, 2013 9:22 am

Re: FTP FUNCTION

Post 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.

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: FTP FUNCTION

Post 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\".
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

Post Reply