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.

extract current data from another datalogger slave


kokihualpa Aug 23, 2017 10:17 PM

excuseme

i have many datalogger slave connect to a one server. but I want to extract the current data is scanning from one datalogger to another.

how can i do?


GaryTRoberts Aug 25, 2017 12:57 AM

There are several ways to do it.  Look at the CRBasic help for GetVariables or SendVariables or GetRecord.  Using SDI12Recorder and SDI12Recorder/SDI12SensorSetup/SDI12SensorResponse.  Also a combination of ModBusMaster and ModBusSlave will work as well.


kokihualpa Aug 25, 2017 03:22 PM

but is communication gprs IP. no problem?


GaryTRoberts Aug 26, 2017 12:35 AM

Yes.  Communications can be via TCP/IP, radio, or direct wiring.


jra Aug 28, 2017 03:11 PM

kokihualpa Aug 29, 2017 10:37 PM

Thank you

I tried but I cant get succefull, but let me explain you better the communication.

we have 6 dataloggers: 5 CR800 and 1 is CR1000. all of this are connected to a modem GPRS each one (in the serial port). and each modem has a sim card with an operator that provide them APN and IP fixed or private. No one has a Public IP and internet plan only connection is interline like all were a LAN network and wireless GPRS/IP.

So the server is connected to a modem too, with a sim card with the same plan.

for example: one datalogger is IP: 10.57.67.9 and port TCP 4094 (the port is setup in the modem and the IP is for the sim card). and the server is IP: 10.57.67.3.

so in the server we dont work with the loggernet (always is closed). we use another application that communicate well since two years ago.

now i need one data to transmit from one datalogger to another one.

the program i maked is this one:

(the datalogger-station that it has the data what i want is the IP 10.57.67.9 and port=4094(coincidence is like packbus) and the pakbus address is "11" and the table in this datalogger that has the data is TablaWQStintaya_1m and the var is PTemp_C.)

socket=TCPOpen ("10.57.67.9",4094,0)
GetVariables (resultgetvar,socket,0,11,0000,10,"TablaWQStintaya_1m","PTemp_C",GetPtemp,1)

and I tried this another:

socket=TCPOpen ("10.57.67.9",4094,0)
GetDataRecord (resultgetvar,socket,0,11,0000,10,2,2,TBhospitaltintaya)

well it doesnt work. Can you help me?


GaryTRoberts Aug 30, 2017 02:03 AM

Are the modems configured for PPP mode or are they setup as a serial server interface.  If serial server, its first come, first served.  Loggernet might have the port tied up already.

Is socket returning a number greater than 100?  That lets us know the logger is able to make the connection.  What is resultgetvar showing?  Is it counting up?


kokihualpa Aug 30, 2017 03:46 AM

the modems are configured like serial server interface.

socket=0.

resultgetvar is counting 1,2,3..... 


GaryTRoberts Aug 30, 2017 06:08 AM

socket = 0 is telling us that the logger is unable to make a connection.  Since the modems are setup in serial server mode, the datalogger's TCP/IP functionality is not availabe.  So TCPOpen will not work.  They need to be in PPP mode to do be able to do what you are proposing.


GaryTRoberts Aug 30, 2017 06:11 AM

There is one way this could be done with the loggers and modem in serial server mode.

If LoggerNet is connected to the dataloggers via the modem and the modem is always on, you could set things up to route PakBus and do Get/SetVariables through LoggerNet which would act as a PakBus router.  It is a bit more of a advanced feature and will require that all the loggers have a different PakBus address and change of a setting in the LoggerNet server.  LoggerNet will also have to be running a more current version of the software.


kokihualpa Aug 31, 2017 01:44 PM

thank you, but the loggernet doesnt run currently in the server. we have used another application that is compatible with the dataloggers campbell, and i dont think so that i can run while the another is running too, i can use one of them.

by the way, I see the modems like sierra ls300, moxa, etc they cant work in mode ppp but server mode. With that modems we cant use PPP? or we configure bad the modem?.

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