Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Retrieving data through GetVariables command


Otemohu May 30, 2013 11:31 AM

Hi all,

I have a network of ten datalogger connected with Ethernet protocol (NL115, NL120 and NL100).

When I want to retrieve data from a datalogger, I use the "GetVariables" command: for example, a CR1000 is measuring the air temperature. On another CR1000 in the network, I can open the IP address of the destination CR1000 (via TCPOpen) and I can get the temp variable through "GetVariables". No problem, this is working.

Yesterday, I connected two rain gauges on the two pulse ports of a CR1000 declared on the network through a NL100 (from which a RS485 cable is starting ...).
When using the same commands as specified above, I cannot retrieve data !?! The ResultCode gives a value increasing in time, concurrently with RecNum increasing.

Here is the command I use on the host datalogger to retrieve data from the destination data logger.
For information :
destination datalogger : PB adress = 6
host datalogger : PB adress = 7
NL100 PB adress = 71
There is no security code, anywhere.

TCPOpen_var = TCPOpen("xxx.xxx.xxx.xx",6785,0)
GetVariables(ResultCode,TCPOpen_var,71,6,0,0,"Public","StemFall()",StemFall(),2)

Here is the configuration of the NL100 as displayed in Network Planner :
Setting Name and Setting Value just below each setting Name
PakBus Address
71
RS232 Configuration
Disabled
CS I/O Configuration
PakBus
RS485 Configuration
PakBus
10Base-T Configuration
enabled
CS I/O SDC Address / ME Baud Rate
SDC7
CS I/O beacon interval (sec)
0
CS I/O Verify Interval (sec)
90
RS485 Baud Rate
38k
RS485 Beacon Interval (sec)
60
RS485 PakBus Verify Interval (sec)
90
RS485 neighbor list
10Base-T IP Address
192.168.154.17
10Base-T IP Network Mask
255.255.255.224
10Base-T IP Default Gateway
192.168.154.1
PakBus/TCP Server Configuration
enabled
PakBus/TCP Client Configuration
disabled
PakBus/TCP Server Port
6785


An idea?

* Last updated by: Otemohu on 5/30/2013 @ 5:52 AM *


Sam May 31, 2013 05:07 AM

The NL100 is a Ethernet serial server.
It does not enable you to utilize the logger's integrated IP functionality like TCPOpen(). To use those types of functions you need to use a NL120, NL115, NL200, NL240, or a device that serves as a PPP Host.

With all of that said, you could configure the NL100 to serve up or maintain maintain a PakBus/TCP connection to another PakBus/TCP capable device. The network might look something like one of the following

CR1K/NL100 --- NL120/CR1K

CR1K/NL100 --- PR(LoggerNet, CR1000, NL200, etc) --- PB Dev.

The easiest way to get going / to get setup is to use Network Planner which is included with LoggerNet. This is a greatly underutilized but very powerful tool for getting your settings for devices coordinated.


In short, from factory defaults,
+ Setup Ethernet / IP information
+ PakBus Address = unique
+ Enable PakBus/TCP Server
+ Enable PakBus/TCP Client
+ Enter IP address of PakBus/TCP server you want to this NL100 to maintain a connection with over IP
+ Set serial port(s) used on NL100 to "PakBus" and any other relevant communication settings (baud rate or SDC address, etc).
+ Program you CR1000 to use serial port for GetVariables instead of socket handle returned by TCPOpen()

For example,

GetVariables(ResultCode,ComSDC7,71,6,0,0,"Public","StemFall()",StemFall(),2)

Log in or register to post/reply in the forum.