各位前辈!求Labview实现FTP下载文件功能实例或教程!
各位前辈!小弟现需要每次运行程序前,先从文件中加载相关参数。但这些参数是由服务器统一维护的,所以常常要从FTP服务器上把新的参数文件下载下来。可是手头买的几本Labview教程上没有FTP的相关讲解。。。55555555希望哪位好心的前辈大哥,能给小弟个简单的例子看看?谢谢! <P>版主太客气了!这么一说,反而弄的我不好意思了。。呵呵~</P>
<P>还有件事想问一下前辈,一般像这种工具包是怎么用的啊?从哪里可以下载到呢?</P> <P>我晕~这的三个问题都一个星期了,怎么还是没有人回复啊??</P>
<P>我是按版主的要求,在标题里就把问题明白了。。。。</P>
<P>算了,自己顶了:</P>
<P>因为在Labview8.0里没找到FTP相关函数~所以我用delphi写.dll文件,其中装了FTP客户端的上传,下载两个函数。具体描述如下:</P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">function DownLoadFTP( //FTP</FONT>下载<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sSource, //</FONT>本地上传源文件路径<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sDest: String; //</FONT>服务器端目的文件路径<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sHost: String = '192.168.1.57'; //</FONT>服务器<FONT face="Times New Roman">IP<o:p></o:p></FONT></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sUserName: String = 'zm'; //</FONT>用户名<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sPassWord: String = '******'; //</FONT>密码<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">bG: Boolean = False //</FONT>断点续传<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">): integer; stdcall;<o:p></o:p></FONT></P>
<P 0cm 0cm 0pt"><o:p><FONT face="Times New Roman"> </FONT></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">function UpLoadFTP( //FTP</FONT>上传<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sSource,sDest: String; <o:p></o:p></FONT></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sHost: String = '192.168.1.57';<o:p></o:p></FONT></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sUserName: String = 'zm'; <o:p></o:p></FONT></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">sPassWord: String = '******';<o:p></o:p></FONT></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman"> bG: Boolean = False): integer; stdcall;<o:p></o:p></FONT></P>
<P 0cm 0cm 0pt">返回:<FONT face="Times New Roman">1 </FONT>操作成功,<FONT face="Times New Roman"><0</FONT>错误。<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">ERROR:<o:p></o:p></FONT></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">-1</FONT>——连接<FONT face="Times New Roman">FTP</FONT>服务器失败。<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">-2</FONT>——上传操件错误。<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">-3</FONT>——上传本地文件不存在。<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">-4</FONT>——下载操作错误。<o:p></o:p></P>
<P 0cm 0cm 0pt"><FONT face="Times New Roman">-5</FONT>——下载服务器文件不存在。<o:p></o:p></P>
<P>----------------------------------</P>
<P>在Labview调用,运行良好。</P> 不是不回复兄弟你的问题,是我见过FTP的例子,我一直在找,就是没找着,没脸给你回复,另外,有一个INTERNET工具包,里面有相应的节点的!抱歉,不好意思兄弟 <a href="http://www.cpubbs.com/old_bbs/dispbbs.asp?BoardID=4&replyID=424&id=231&skin=0">http://www.cpubbs.com/old_bbs/dispbbs.asp?BoardID=4&replyID=424&id=231&skin=0</a> <p>还有一个:</p><p><a href="http://www.cpubbs.com/old_bbs/dispbbs.asp?BoardID=4&replyID=1610&id=849&skin=0">http://www.cpubbs.com/old_bbs/dispbbs.asp?BoardID=4&replyID=1610&id=849&skin=0</a></p> <a href="http://www.cpubbs.com/old_bbs/dispbbs.asp?BoardID=4&replyID=8364&id=2366&skin=0">http://www.cpubbs.com/old_bbs/dispbbs.asp?BoardID=4&replyID=8364&id=2366&skin=0</a>
页:
[1]