Hi,
I have a radio network type RF416 with :
- Six CR216 in RF protocol transparent.
- One CR6 master with RF416 in RF protocol transparent and modem LS300G
Programm of one of the CR216
'--------------------Variables de mesure-------------------------------- Public V_Batt_CS Public Niv_BAB_CS Public ES2_CS (2) Alias ES2_CS (1) = Cond_ES2_CS Alias ES2_CS (2) = Temp_ES2_CS '--------------------Variables pour fonctionnement programme------------ Public Dummy '--------------------Constante de programation-------------------------- Const offsetBAB = 33 '----------Table d'enregistrement des mesures dans le canal------------- DataTable (CS_Canal,True,-1) DataInterval (0,1,min) Sample (1,Dummy) Sample (1,Niv_BAB_CS) Sample (1,Cond_ES2_CS) Sample (1,Temp_ES2_CS) EndTable '----------Table d'enregistrement surveillance station------------------ DataTable (CS_Surv,True,170) DataInterval (0,1,hr) Sample (1,Dummy) Average (1,V_Batt_CS,False) EndTable BeginProg Dummy = 0 Scan (1 ,min) VoltSe (Niv_BAB_CS,1,1,0.625,-250) 'Mesure en millimetre Niv_BAB_CS = Niv_BAB_CS - offsetBAB Battery (V_Batt_CS) SDI12Recorder (ES2_CS(),"0M!",1.0,0) CallTable CS_Canal CallTable CS_Surv Next Scan EndProg
Programm CR6
'--------------------Surveillance et gestion prog----------------------- Public V_Batt_Exu Public Temp_CR6_Exu '--------------------Piezometre----------------------------------------- 'Sonde decagon CTD10 Public CTD_Piez(3) Alias CTD_Piez(1) = Niv_CTD_Piez Alias CTD_Piez(2) = Temp_CTD_Piez Alias CTD_Piez(3) = Cond_CTD_Piez '--------------------Variables fonctionnement radio Exu------------------ ' Variables fonction GetDataReccord Public R_Exu_TCS_Canal, R_Exu_TCS_Surv Public R_Exu_TCC_Canal, R_Exu_TCC_Surv Public R_Exu_TCN_Canal, R_Exu_TCN_Surv, R_Exu_TCN_Prelv Public R_Exu_TAub_Canal, R_Exu_TAub_Surv Public R_Exu_TPM_Canal, R_Exu_TPM_Surv Public R_Exu_TFlux_Surv '--------------------Constante de programation-------------------------- Const Seuil_Piezo = 10 '--------------------Variables Coste Sud-------------------------------- '----------------------------------------------------------------------- Public Niv_BAB_CS Public Cond_ES2_CS Public Temp_ES2_CS Public V_Batt_CS '--------------------Variables Coste Centre----------------------------- '----------------------------------------------------------------------- Public Niv_BAB_CC Public Cond_ES2_CC Public Temp_ES2_CC Public V_Batt_CC) '--------------------Variables Coste Nord------------------------------- '----------------------------------------------------------------------- Public Niv_CS451_CN Public Temp_CS451_CN Public Cond_ES2_CN Public Temp_ES2_CN Public V_Batt_CN '--------------------Variables Aubertelle------------------------------- '----------------------------------------------------------------------- Public Niv_BAB_Aub Public Niv_CS451_Aub Public Temp_CS451_Aub Public Cond_ES2_Aub Public Temp_ES2_Aub Public V_Batt_Aub '--------------------Variables Puech Moule------------------------------ '----------------------------------------------------------------------- Public Niv_BAB_PM Public Niv_CS451_PM Public Temp_CS451_PM Public Cond_ES2_PM Public Temp_ES2_PM Public V_Batt_PM '--------------------Variables Mat Flux--------------------------------- '----------------------------------------------------------------------- Public V_Batt_Flux Public V_12Ah_Flux Public Nb_Yg_Flux Public Nb_Li_Flux '----------Table d'enregistrement surveillance station------------------ DataTable (Exu_Surv,True,7000) DataInterval (0,10,Min,0) Sample (1,V_Batt_Exu,FP2) Sample (1,Temp_CR6_Exu,FP2) EndTable '----------Table d'enregistrement Piezometre---------------------------- DataTable (Exu_Piez,RecPiez,7000) ' Enregistrement une heure ou si variation de 10mm sur une heure Sample (1,Niv_CTD_Piez,FP2) Sample (1,Cond_CTD_Piez,FP2) Sample (1,Temp_CTD_Piez,FP2) EndTable '----------Table Coste Sud (PackBus 1)------------------------------------------- '----------------------------------------------------------------------- '----------Table d'enregistrement des mesures dans le canal------------- DataTable (CS_Canal,True,7000) Sample (1,Niv_BAB_CS,IEEE4) Sample (1,Cond_ES2_CS,IEEE4) Sample (1,Temp_ES2_CS,IEEE4) EndTable '----------Table d'enregistrement surveillance station------------------ DataTable (CS_Surv,True,2000) Sample (1,V_Batt_CS,IEEE4) EndTable '----------Table Coste Centre(PackBus 2)------------------------------------------ '----------------------------------------------------------------------- '----------Table d'enregistrement des mesures dans le canal------------- DataTable (CC_Canal,True,7000) Sample (1,Niv_BAB_CC,IEEE4) Sample (1,Cond_ES2_CC,IEEE4) Sample (1,Temp_ES2_CC,IEEE4) EndTable '----------Table d'enregistrement surveillance station------------------ DataTable (CC_Surv,True,2000) Sample (1,V_Batt_CC,IEEE4) EndTable '----------Table Coste Nord(PackBus 3)--------------------------------------------- '----------------------------------------------------------------------- '----------Table d'enregistrement des mesures dans le canal------------- DataTable (CN_Canal,True,7000) Sample (1,Niv_CS451_CN,IEEE4) Sample (1,Temp_CS451_CN,IEEE4) Sample (1,Cond_ES2_CN,IEEE4) Sample (1,Temp_ES2_CN,IEEE4) EndTable '----------Table d'enregistrement surveillance station------------------ DataTable (CN_Surv,True,2000) Sample (1,V_Batt_CN,IEEE4) EndTable '----------Table Aubertelle(PackBus 5)--------------------------------------------- '----------------------------------------------------------------------- '----------Table d'enregistrement des mesures dans les canaux----------- DataTable (Aub_Canal,True,7000) Sample (1,Niv_BAB_Aub,IEEE4) Sample (1,Niv_CS451_Aub,IEEE4) Sample (1,Temp_CS451_Aub,IEEE4) Sample (1,Cond_ES2_Aub,IEEE4) Sample (1,Temp_ES2_Aub,IEEE4) EndTable '----------Table d'enregistrement surveillance station------------------ DataTable (Aub_Surv,True,2000) Sample (1,V_Batt_Aub,IEEE4) EndTable '----------Table Puech Moule(PackBus 6)-------------------------------------------- '----------------------------------------------------------------------- '----------Table d'enregistrement des mesures dans les canaux----------- DataTable (PM_Canal,True,7000) Sample (1,Niv_BAB_PM,IEEE4) Sample (1,Niv_CS451_PM,IEEE4) Sample (1,Temp_CS451_PM,IEEE4) Sample (1,Cond_ES2_PM,IEEE4) Sample (1,Temp_ES2_PM,IEEE4) EndTable '----------Table d'enregistrement surveillance station------------------ DataTable (PM_Surv,True,2000) Sample (1,V_Batt_PM,IEEE4) EndTable '----------Table Mat Flux(PackBus 7)----------------------------------------------- '----------------------------------------------------------------------- '----------Table d'enregistrement 15 minutes---------------------------- DataTable(Flux_Surv, True,5000) Sample (1,V_Batt_Flux,IEEE4) Sample (1,V_12Ah_Flux,IEEE4) Sample (1,Nb_Yg_Flux,IEEE4) Sample (1,Nb_Li_Flux,IEEE4) EndTable BeginProg Scan (1,Min,100,0) Battery (V_Batt_Exu) PanelTemp (Temp_CR6_Exu,250) SDI12Recorder (CTD_Piez(),U1,3,"M!",1.0,0) Niv_CTD_Piez = Niv_CTD_Piez - offsetCTD10P DiffNivPiez = ABS (OldNivPiez - Niv_CTD_Piez) If NOT IfTime (0,1,Hr) AND DiffNivPiez > Seuil_Piezo Then RecPiez = 1 CallTable Exu_Piez RecPiez = 0 OldNivPiez = Niv_CTD_Piez EndIf If IfTime (0,1,Hr) Then RecPiez = 1 CallTable Exu_Piez RecPiez = 0 OldNivPiez = Niv_CTD_Piez EndIf CallTable Exu_Surv NextScan SlowSequence Scan (10,Min,100,0) GetDataRecord (R_Exu_TCS_Canal,ComSDC7,0,1,0000,1000,2,32768+1,CS_Canal,420) GetDataRecord (R_Exu_TCS_Surv,ComSDC7,0,1,0000,1000,2,32768+2,CS_Surv,420) GetDataRecord (R_Exu_TCC_Canal,ComSDC7,0,2,0000,1000,2,32768+1,CC_Canal,420) GetDataRecord (R_Exu_TCC_Surv,ComSDC7,0,2,0000,1000,2,32768+2,CC_Surv,420) GetDataRecord (R_Exu_TCN_Canal,ComSDC7,0,3,0000,1000,2,32768+1,CN_Canal,420) GetDataRecord (R_Exu_TCN_Surv,ComSDC7,0,3,0000,1000,2,32768+2,CN_Surv,420) GetDataRecord (R_Exu_TAub_Canal,ComSDC7,0,5,0000,1000,2,32768+1,AUB_Canal,420) GetDataRecord (R_Exu_TAub_Surv,ComSDC7,0,5,0000,1000,2,32768+2,AUB_Surv,420) GetDataRecord (R_Exu_TPM_Canal,ComSDC7,0,6,0000,1000,2,32768+1,PM_Canal,420) GetDataRecord (R_Exu_TPM_Surv,ComSDC7,0,6,0000,1000,2,32768+2,PM_Surv,420) GetDataRecord (R_Exu_TFlux_Surv,ComSDC7,0,7,0000,1000,2,32768+1,Flux_Surv,420) NextScan EndProg
I used GetDataRecord to repatriate the tables on the CR6.
I collect with loggernet that is configured to connect with the LS300G.
I use the maxreccord option in the getdatarecord functuin to collect the missing data in the event of a communication failure the last time.
But, when the CR6 restarts, I have several duplicates (420 duplicate rows that match the maxoption value).
These duplicates, take place only when the CR6 restarts.
Do you have a solution to avoid duplication?
Thanks
Try using -420.
Thanks for your answers