经过雅各布戴维斯|更新时间:02/22/2017 |评论:2
您是否遇到了您希望数据记录器启动数据检索,而不是PC的情况?例如,您是否具有要传输警报数据的环境状况?
Although IP-based communication is prevalent, sometimes you may need data-logger-initiated communication because of firewalls or issues with private versus public IP addresses. IP-capable Campbell Scientific data loggers have the ability to initiate IP connections. (In fact, our data loggers have had the ability to do call-back on a landline since the release of the CR7 and21Xback in the early 1980s.) While you may need this call-back capability, perhaps you don’t know how to implement it. I hope this article will quickly get you up and going so your data logger is initiating call-back to记录。
呼叫工作必须发生两件事:
建立链接是一个不同的过程,具体取决于您使用的电信类型。但是,启动数据收集是相同的 - 无论您使用的通信链路类型如何。
最基本的遥测链接是直接串行连接。在直接连接上,opt overnet制作的更改是选择Call-Back Enabledcheckbox for the communications port in the设置屏幕。这将使LogGernet打开串行端口并侦听传入的数据收集请求。
如果您在数据记录器上使用RS-232端口,则默认启用它。通信链接已准备就绪。您只需要碰巧碰到数据记录器想要谈话的逻辑。要启动通信,请在数据记录程序程序中添加一个语句:
If TimeIntoInterval (0,1,HR) Then SendVariables (SendResult,COMRS232,0,4094,0000,0,"Public","Callback",PTemp,1) EndIf
Loggernet将识别尝试设置Publicvariable namedCallbackas a request for data collection. Be sure to change the PakBus address in thesendvariables()指令如果loggernet未设置为默认值4094。
After you have made the change in LoggerNet’s设置屏幕并将程序加载到数据记录器上,将在后台发生数据收集。要验证数据收集是否正在发生根据数据记录器程序中的间隔,请观看状态监视器。
为你推荐:For more information about the Status Monitor, watch the状态监视器video。 |
这configuration for call-back is a little bit different for an IP connection. APakBusTcpServer建议作为根设备设置屏幕。TCP服务器始终启用呼叫。它将打开IP端口,并从附加的数据记录器侦听传入连接。拥有这个是一个好主意Pakbus Port始终打开复选框选择。使用的默认IP端口号是6785。
在数据记录器上,您必须指示它将IP套接字打开到LogGernet。这样做的简单方法就是Pakbus / TCP客户setting on the data logger. You can find this setting on the Network Services tab when your computer is connected to the data logger using DevConfig. You will need to enter the routable IP address and port number of the computer running the LoggerNet server. In this example, the data logger and computer were both within the same Ethernet network. I verified the IP address on the computer, then entered it into the setting on the data logger.
使用IP连接时,您将不会有固定的通信端口来引用sendvariables()指示。避免问题的一种方法是使用Pakbus的自动发现功能。价值-1as the neighbor address will tell the data logger to ignore the ComPort parameter and use the connection in the data logger routing table. In fact, you can use0.相称。由PakBu IP连接s/TCP Client will be in the routing table and can be used.
SendVariables(Sendresult,0,-1,4094,0000,0,“public”,“回调”,ptemp,1)
After you make the configuration, call-back over the IP connection will function very much like it does over the serial connection. You now have the data logger itself controlling when LoggerNet collects the data. For example, you could use a simple time-based trigger in the data logger. You could also trigger data collection based on comparing variables to thresholds, as in this example:
If WaterLevel > 10.5 Then SendVariables (SendResult,0,-1,4094,0000,0,"Public","Callback",PTemp,1) EndIf
如果您有防火墙或IP地址问题,则可能需要使用数据记录器发起的通信而不是PC启动数据检索。您可以使用Campbell Sciencific Loggers中的回电功能进行数据记录器启动的通信,使用直接串行连接或IP连接。无论您使用的连接类型,我希望您会发现回拨功能非常有用且易于配置。如果您对回拨有任何后续问题,请随时在下面发布。
Comments
jhurmence.|05/18/2018在08:58 AM
Will the IP connection solution work with the CR800? We have RV50 modem connected through serial port. We want call-back to an IP address. What would the SendVariables command look like in that case?
jdavis.|0.5/18/2018 at 11:08 AM
如果为PPP模式配置,则CR800能够进行IP连接。RV50文档中有关于如何获得工作的说明。
请登录或注册to comment.