GetVariables with Pakbus_Campbellsci论坛问答

I'm trying to develop a program that reads variables and arrays from a remote CR800. I have a base (router) CR800. There will be 10 remote CR800's connected with RF401's.

I see the format:
GetVariables ( ResultCode, ComPort, NeighborAddr, PakBusAddr, Security, TimeOut, "TableName", "FieldName", Variable, Swath )

GetVariables with Pakbus_Campbellsci论坛问答

1. Can someone show an example of this using the CSI/O port to the RF401 for a PakBus address of "1168", and get the panel temperature of the CR800? (There is not enough explaination on the "TableName", "FieldName" parameters.

2. What are the ComSDC7,ComSDC8,ComSDC10,ComSDC11, and why isn't there a ComSDC9? (I saw this in the help file for Get Variables).

3. I want to use an SC12 cable from the CSIO/Port of the RF401 to the CSI/O port on the CR800. What is the name of the CSI/O port? There are too many CSI/O options to figure out.

新对话如下:

Example program:

'Declare variables
Public RXResponse
Public CR800PTemp

'Main program
BeginProg
Scan (1,Sec,0,0)
If TimeIntoInterval(0,5,Min) Then
GetVariables(RXResponse,ComSDC7,0,1168,0000,0,"Public","PTemp",CR800PTemp,1)
EndIf
NextScan
EndProg

Most of our peripheral devices that can be connected to the CS I/O port of a datalogger support Synchronous Device Communication (SDC). The default SDC address of the RF401 is 7 that's why I used it in the example above. SDC address 9 is only used when there's a mixed array datalogger attached to the peripheral device. Modem Enable (ComME option) could be used but SDC communications is more robust. So to direct communications to an RF401 attached to the CS I/O port use ComSDC7 (prefered) or ComME.

新对话如下:

To add to what Chips says regarding question 1, TableName is the name of the data table in the remote datalogger where the variable is stored that you are trying to "get". The variable can be from the Public table, Status table, or a data table.

The fieldname is the name of the variable in the remote datalogger that you are trying to get.

If you have LoggerNet 4.0, try laying out your network using the Network Planner, which is new for this version. It was specifically designed to help set up dataloggers in PakBus networks so that they can communicate with each other and the LoggerNet server. The network planner will create all the configuration files for all the devices in your network, and then you can send a configuration to each device. It makes seting up the physical part of the the PakBus network much easier.

Regards,

Dana W.

新对话如下:

I was able to get this to work. Thanks for your help

If TimeIntoInterval(0,1,Sec) Then
GetVariables(RXResponse,ComSDC7,0,1158,0000,0,"Public","Panel_Temp",CR800PTemp,1)
GetVariables(RXResponse,ComSDC7,0,1158,0000,0,"Public","Battery_Volts",CR800Volts,1)
GetVariables(RXResponse,ComSDC7,0,1158,0000,0,"Public","EventSample1",CR800Event1,1)
GetVariables(RXResponse,ComSDC7,0,1158,0000,0,"Public","Eventsample2",CR800Event2,1)
EndIf

I was also able to reset my remote event counts.

'Call Data Tables and Store Data
CallTable(Table1)
CallTable(Table2)

If TimeIntoInterval(0,45,Sec) Then
CR800Event1 = 0
CR800Event2 = 0
SendVariables(RXResponse,ComSDC7,0,1158,0000,0,"Public","Eventsample1",CR800Event1,1)
SendVariables(RXResponse,ComSDC7,0,1158,0000,0,"Public","Eventsample2",CR800Event2,1)
EndIf

In the remote loggers if the analog exceeds a threshold, the Eventsample increments so base station will know. The system works better than I thought.

Thank you

新对话如下:

We have a network of CR850 connected trought RF310M and trying to get variable of an remote cr850, like this:

ComPort
RFBase_Td (PB = 0)
RF_Trasvase (PB = 36)
CR_850_Trasvase (PB = 36)

RF_Repeter (PB = 38)
CR_1000_Repeter (PB = 38)

RF_Ecologico (PB = 35)
CR_850_Ecologico (PB = 35)

The connection between RFBase_TD and CR_850_Ecologico, CR_850_Trasvase is made trough CR_1000_Repeter, because there´s no line of sight. We have line of sight between CR_850_Ecologico and CR_850_Trasvase.

On CR_850_Trasvase we need to get variable "Q_AVG" of table_10m from CR_850_Ecologico; the sintaxis maybe is the next:

GetVariables (RXRESPONSE,ComME,0,35,0000,0,"Datos10m","Q_AVG",Ecologico,1)

Ask: The variable is going trough the repeter to RFBase_TD and then to CR_850_Trasvase or is going directly from CR_850_Ecologico to CR_850_Trasvase.

Would you to help us?

* Last updated by: Hidrologiamiel on 11/14/2012 @ 9:11 AM *

新对话如下:

The RF-TD network does not support station to station communication. If you configure LoggerNet so that its PakBus ports are bridged, LoggerNet will be able to forward packets from one station to another. You may experience a significant delay, however, because the packet sent from the client datalogger will not be transmitted over RF until the RF base or the RF repeater polls the modem for data. This means that your instruction is going to have to wait at least as long as the RF polling interval for its response.

新对话如下:

We have active the option "Value Forwared" on LoggerNet but the delay or missing packets are a big problem when the weather is bad or the Repeater fails.

Does exist another way to get the variable directly from the station?

Thanks.

* Last updated by: Hidrologiamiel on 11/14/2012 @ 9:55 AM *

分享到:

原文链接:,转发请注明来源!
海洋仪器网 仪器使用 GetVariables with Pakbus_Campbellsci论坛问答
「GetVariables with Pakbus_Campbellsci论坛问答」评论列表

发表评论