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.

High Frequency Measurements in SlowSequence


gecko Apr 18, 2016 08:05 PM

Hello together,

I have got a setup consisting of CR3000, Gill R3-50 Sonic (via Tx-Rx/COM1), Licor Li7700 (CH4 via RJ45/LAN), Licor Li7200 (CO2,H2O, connected to LI7550, SDM). The Li7700 is directly connected to the CR3000 as recommended by LiCor in  this pdf-file: https://boxenterprise.net/s/msybfo25jgninhinhqpr. The following script shows, how the logging was implemented. There is one fast scan (100Hz) for CH4 and two slow sequences, one for eddy covariance (10Hz) and one slow sequence for the LAN connection. Unfortunately, there are always skipped slow scans for the eddy covariance sequence. Are there any ideas why? Or any suggestions how to optimize the CR3 code?

Thanks a lot in advance,

Gecko

PipeLineMode
' Public / Const / Dim / Alias / Units Declarations not shown
'Define Data Tables
DataTable(EddyData,True,-1)
  Sample(1,Gill_Adr,UINT2)
  Sample(1,Gill_Diag,UINT2)
  Sample(1,u,IEEE4)
  Sample(1,v,IEEE4)
  Sample(1,w,IEEE4)
  Sample(1,Ts,IEEE4)
  Sample(1,CO2,IEEE4)
  Sample(1,H2O_LI72,IEEE4)
  Sample(1,RSSI72,IEEE4)
  Sample(1,Pfast,IEEE4)
  Sample(1,Tin,IEEE4)
  Sample(1,Tout,IEEE4)
  Sample(1,Tblock,IEEE4)
  Sample(1,LI72Diag,IEEE4)
  TableFile("CRD:EC_",64,-1,0,30,Min,-1,-1)
EndTable

DataTable(Li77Data,True,-1)
  Sample(3,LI7700_time(1),Long) ' Li77 via LAN
  Sample(7,LI7700(4),IEEE4) ' Li77 via LAN Reps = 7 use only first 7 columns
  TableFile("CRD:CH4Li77_",64,-1,0,30,Min,-1,-1)
EndTable

'Main Program
BeginProg

  TCPClose(101)
  Scan(10,mSec,6000,0)
   SerialInRecord(socket,DATA_string,&h44,0,&h0A,NBR,01)
   SplitStr(LI7700_time(1),DATA_string,CHR(09),3,4)
   SplitStr(LI7700(1),DATA_string,CHR(09),22,4)
   If NBR>0 Then
     CallTable Li77Data
   EndIf
  NextScan

  ' "Slower" sequence (10Hz) scan for eddy data
  SlowSequence
  Scan(100,mSec,100000,0)

    'Serial Connection to Gill Sonic
    SerialOpen (Com1,9600,0,0,300)
    'Serial communication and Polling of Gill R3-50 at scan rate
    SerialOut (Com1,GR3Poll,0,0,0)
    SerialInRecord (Com1,GR3Ans,&h02,0,&h03,Bytereturn,01)
    SplitStr (GR3Sonic(),GR3Ans,",",7,5)

    'SDM communication LI7200
    LI7200(LI72Data,1,2,4)

    CallTable(EddyData)
  NextScan
EndSequence

SlowSequence
  Scan(5,Sec,3,0)
    tcpip_socket_status=SerialInChk(socket)
    If(tcpip_socket_status = -1) Then
      socket = TCPOpen("172.24.23.61",7700,527)
    EndIf
  NextScan

EndProg

 


Joerg May 25, 2022 02:29 PM

This post is under review.


smile May 26, 2022 05:06 AM

The main table has priority over the slow tables, so slow tables are executed when the logger has no activity to do on the main table.

If you have errors in the execution of the slow tables it means that having to execute the main table the logger does not have time to complete the slow tables, you have to organize the program in a different way.

it seems complex and I recommend that you ask to a CS expert, perhaps it can't be done............

for example using the Gill in polling and only 9600 baud mode makes you waste time.

Smile

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