From 08:00 PM CDT Friday, August 12 - 01:00 PM CDT Saturday, August 13, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



怎样连接PCI-7041上的FTP和网络服务器



主要软件:
主要软件版本: N/A
主要软件修正版本: N/A
次要软件: N/A

问题: 当连接典型的FTP或网络服务器是,只需要连接到运行服务器的电脑的IP地址,通常分别使用端口21或端口80。当连接运行在PCI-7041上的FTP和网络服务器时需要用到什么IP地址和端口号。

解答:

LabVIEW Real-Time (RT) 7.0 安装了一个名为RT Proxy的新组件。它可以在PCI-7041的TCP端口和安装组件的windows电脑端口之间自动建立起端口映射。

只要通过MAX将LabVIEW RT正确安装到PCI-7041上,FTP服务器就会运行。FTP服务器运行在PCI-7041的21口上。

网络服务器只有你使能它才会运行,使能方式为切换执行终端到PCI-7041上,然后选择 Tools » RT::x Options,这里x是MAX中显示的PCI-7041设备号。在下来菜单中,选择Web Server Configuration 并且确认使能网络服务器的复选框被打上勾了。默认情况下,它会在PCI-7041的端口80上运行。

为确定映射到适当的PCI-7041端口上的主机电脑端口,从安装PCI-7041的电脑上面点击以下链接,或者手动输入。

http://localhost:3580/dumpinfo?

这一步完成后,会返回类似于以下的表格。


National Instruments/LabVIEW Real-Time/RT Proxy/Services/NetInterface HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:52:07 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1035
National Instruments/LabVIEW Real-Time/Targets/RT::0/Services/44515 HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:52:13 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1041
National Instruments/LabVIEW Real-Time/Targets/RT::0/Services/44516 HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:52:13 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1044
National Instruments/LabVIEW Real-Time/Targets/RT::0/Services/21 HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:52:13 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1047
National Instruments/LabVIEW Real-Time/Targets/RT::0/Services/3079 HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:52:15 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1050
National Instruments/LabVIEW Real-Time/Targets/RT::0/Services/12405 HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:52:17 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1053
National Instruments/LabVIEW Real-Time/Targets/RT::0/Services/12917 HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:52:17 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1056
National Instruments/LabVIEW Real-Time/Targets/RT::0/Services/80 HTTP/1.0 200 OK
Server: Service Locator
Pragma: no-cache
Last Modified: Mon, 19 May 2003 22:53:56 Central Standard Time
Connection: Close
Content-Length: 14
Content-Type: text/html

Mapping=1119



为匹配这些例子,我们设定主机的IP地址为10.0.0.1。


观察范例表格的第四行,我们可以看到RT::0 21端口的一个服务。上面已经提到过,这对应着FTP服务器。观察这一条目右边栏最底端列出的映射号码。这就是主机上连接的端口,在这里也就是1047。要在IE里打开这个FTP连接,在地址栏里输入ftp://10.0.0.1:1047/。如使用其他方式的FTP,参考下面的链接。

相似的,观察最后一行,我们可以看到RT::0 21端口的另一个服务。这就是网络服务器。观察这一条目右边栏,我们看到映射到端口1119。要连接这个例子里的网络服务器,使用URLhttp://10.0.0.1:1119/。

还有一种其他的方式,参考链接中的Developer Zone Example VI。这个VI会在一个美观易读的LabVIEW表格中预设端口映射。



相关链接:

附件:


View RT Proxy Port Mappings.vi - View RT Proxy Port Mappings.vi



报告日期: 05/19/2003
最近更新: 03/17/2015
文档编号: 2XIG74EW