|
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表格中预设端口映射。
|