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.

Geo Precision SDI-12 converter

--dd-- Mar 25, 2020 03:18 AM

Hi, I'm writing a program for a Geo Precision SDI-12 converter. In these Covid-19 times, i don't have access to a datalogger (Home office).

I'm curious if this will work?

#If ( Sensor_GeoPrecision = TRUE ) Then
  For i = 0 To GeoPrecision_Count-1 Step 6 ‘GeoPrecision_Count is 1 to 48
    SDI12Recorder (GeoPrecision_tmpr(i+1),SDI12_port,GeoPrecision_SDI_INPUT,"M(i/6)!",1.0,0,6)
  Next i

I’m concernd about the expression "M(i/6)!".

The idea is to run the SDI12Recorder with the command "M0!", "M1!", "M2!"... 

If not, is there a better way to construct the syntax in a nice and general way?

nsw Mar 25, 2020 09:15 AM

We are all the same right now. I'm at home with a CR1000X, but no sensor to test it on. I can see the outgoing text from the SDI-12 port, so pretty sure this is Ok. But it will need to be tested with the sensor itself to be certain.

The parameter Command parameter in the SDIRecorder instructin has to be a constant or variable. So, my suggestion would be that you use a string variable for tjis parameter and vary the contents of that.

The following outputs "3M!" on the C1 port and with a bit of manipulation, I am sure you can get it to add in the index value in to it as well.

Public SDIcmd As String * 15

SDIcmd= "M!" & CHR(34)
SDI12Recorder (SDI12Var,C1,3,SDIcmd,1.0,0,-1,0)

Of course, if all else fails, just repeat the SDIRecorder instruction the number of times you need.

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