Undefined historical tag

Bonjour Tim
J’ai le même soucis et dans le journal historique mon tag est toujours UNDEF sachant que j’en ai déclaré qu’un seul.

Hello @N.A,

Could you send me a backup.tar file of the device from eBuddy with the support files included so I can take a look at this issue? Does the device seem to always be showing an undefined value for the historical tag or does it seem to just occasionally have that value?

Or could you create some temporary login credentials for us on your eCatcher account so we can try and diagnose this issue?

-Tim

Hello,

Thanks for your feedback.

Attached is the backup file of my ewon flexy.

[Backup Hidden]

DataReport20042021_130213.txt_20210420145645.txt (81 Bytes)

Hello,

After taking a look at your tags, it looks like you have them setup for realtime logging but not historical logging. The deadband (logs data each time that thave value changes by the value of the deadband, ex: if your deadband is a value of 1, then each time the value changes by at least 1, the value will be recorded. If the value is -1, the deadband is disabled) and the log timer are also disabled.

image

These values can be changed here:

-Tim

Vous me conseiller quoi dans ce cas la car je viens de désactivé l’enregistrement en temps réelles de mon tag et j’ai toujours la valeur indéfinie.

You can have the realtime logging enabled as well, it’s just that if you want to have historical data, you need to either use the deadband like how I described above, or you need to set a logging interval with the “Intervalle d’enregistrement”. The logging interval means that every x seconds, it will log data. Currently it’s set to 0, which means that it’s not logging data, and the deadband logging is set to -1 which also means that it’s not logging data.

As an example if you set the logging interval to 120, that would log the value of that tag every 2 minutes

ca ne marche toujours pas, j’ai essaie les deux méthode que vous venez de m’expliqué.
J’ai activé les données historique en utilisant la bande morte comme vous l’avez décrite ci dessus tout en désactivant 'enregistrement en temps réel.
Puis j’ai essaie de faire le contraire en désactivant la journalisation historique et j’ai réactivé l’enregistrement réel en définissant un intervalle d’une minute et ca na pas marché aussi.



Hello,

It looks like you’re still changing this for the realtime logs and not the historical logging section. Can you try setting this section to 60. It should start logging once per minute after you make this change.

image

-Tim

C’est tout bon pour moi. Enfaite il fallait juste changer les paramètre du filtre pour l’affichage des variables.
Merci

Glad to hear it’s working! Feel free to reach out if you have more questions

Hello Tim,
I come back to you this time for the declaration of tags on the basic I have this piece of code:
@createFirstTag(“Tag1”)

Function createFirstTag($name$)
Print “createFirstTag: “;$name$
$A$ = ‘“Name”;“ServerName”;“Type”’+Chr$(13)+Chr$(10)+’”’+$name$+’”;“MEM”;1’+Chr$(13)+Chr$(10)
Putftp “/var_lst.txt”,$A$,"adm:adm@127.0.0.1"
EndFn

FOR i% = 2 TO 100
SETSYS TAG, “LOAD”, “Tag1”
SETSYS TAG, “NAME”, “Tag” + STR$ i%
SETSYS TAG, “SAVE”
NEXT i%
CFGSAVE
how will I be able to declare the value of my variables with this code there, I will have to add lines of code, because you have these lines there?
Thank you

Hello, before going through with something like this I have a few questions

  • do you mean variables or tag values? I don’t see any variables in the code that you sent me that are undefined.
  • Are all of the values of tags 1-100 going to have different values? If that’s the case I don’t think that a asic script might be the best way to go about this.
  • Are these values going to be changing or do you want these values to stay even after a power cycle. If you want the values to stay the same, you should force the tags to be retentive
  • Oui, pour toutes les balises une valeur différente.
  • Oui aussi je voudrai que les valeurs restent même après un cycle d’alimentation.
    Merci

If you already have all of the tags created, I’m not sure what might be the best way to go about setting the values for these. I guess you could probably do it through the console and just write something like tag1@ = 5 //or another value you want it to equal.

But for setting all of the tags to be retentive you’ll need to do something like this. It should turn all of your tags into retentive tags, but I believe this only works for Ewon tags and wouldn’t work for other io servers such as Modbus or Opcua

n% = GETSYS PRG,“NBTAGS”
i% = 0
//Browse all Tags
For i%=0 To n%-1
SETSYS TAG, “LOAD”, -i%
SETSYS TAG, “TopicName”, “RET”
SETSYS TAG, “SAVE”
ENDIF
Next i%

Merci pour votre réponse je vais essaie ceci et je vous repondérai.
Si non je voudrai savoir s’il y’a une possibilité de transférer ces tags de la carte SD vers la Data MailBoxe ? Si c’est le cas pourriez-vous m’orienter

When you say that you want to transfer the tags from an SD card to the Data mailbox, I’m not quite sure what you mean by that. The Ewon is typically used to send data that’s stored on the Ewon’s local memory and not memory from an SD card.

Do you mean that you have a script that is parsing data from a file on an SD card and sending that to the data mailbox?

Y’a t’il un moyen pour éteindre la mémoire d’un ewon ? j’ai ajouté la carte SD et un certain scripte : GENERATE_REPORT:
//Check if SD card is inserted or if there is enough space
SETSYS INF,“LOAD”
SDCardSize$ = GETSYS INF, “SDExtFree”
SDCardSize_Int% = Val SDCardSize$
IF SDCardSize_Int% > 5000 THEN // 5 MB remains
GOSUB READ_LASTTMS
LAST_TIME$ = @GetCurrentTimeStamp$()
EBD_STRING$ = “$dtHT$ftT$et” + LAST_TIME$ + “$st” + LASTTMS$
FILENAME$ = “/usr/sdext/DataReport” + LAST_TIME$ + “.txt”
WRITEEBD EBD_STRING$, FILENAME$
ActionID% = GETSYS Prg, “ACTIONID”
ELSE
LOGEVENT “EUM Card full or not present”, -1
ENDIF
END

SCHEDULEDACTION_END:
CurID% = GETSYS Prg,“EVTINFO” : REM Get ActionID
REM : Check if it is the right schedule action to save last timestamp otherwize do nothing
If ActionID% = CurID% THEN
SETSYS Prg, “ACTIONID”, CurID%
CurID_Status% = GETSYS Prg,“ACTIONSTAT”
REM Action successfully done → Write last timestamp in file
IF CurID_Status% = 0 THEN
LOGEVENT “FILE " + FILENAME$ + " SUCCESSFULLY EXPORTED”, 100
@WRITETMS(LAST_TIME$)
ELSE
LOGEVENT “FILE " + FILENAME$ + " NOT SUCCESSFULLY EXPORTED”, 0
ENDIF
ENDIF
END

READ_LASTTMS:
SETSYS PRG,“RESUMENEXT”,1
REM GET LAST TIMESTAMP
OPEN “file:/usr/tms.dat” FOR BINARY INPUT AS 1
LASTTMS$ = GET 1,15
CLOSE 1

Cur_Err% = GETSYS PRG,“LSTERR”

IF Cur_Err% = 33 THEN //REM File does not exist
LASTTMS$= “01011970_000000”
SETSYS PRG,“LSTERR”,0
ENDIF

SETSYS PRG,“RESUMENEXT”,0
CLS

RETURN

FUNCTION WriteTMS($LastTimeStamp$):
OPEN “file:/usr/tms.dat” FOR BINARY OUTPUT AS 1
PUT 1,$LastTimeStamp$
CLOSE 1
ENDFN

FUNCTION GetCurrentTimeStamp$()
REM TIME$ = 19/12/2014 10:03:01
$EWON_TIME$ = TIME$
$GetCurrentTimeStamp$ = $EWON_TIME$(1 To 2) + $EWON_TIME$(4 To 5) + $EWON_TIME$(7 To 10) + “_” + $EWON_TIME$(12 To 13) + $EWON_TIME$(15 To 16)+ $EWON_TIME$(18 To 19)
ENDFN

Et effectivement il créer un dossier user/sdex et il copie toutes les variables se trouvant dans l’ewon sur ce dossier mais est ce que c’est la bonne méthode pour éteindre sa mémoire ?
Merci bien

Hello,

For the data mailbox, as far as I know we’re only able to grab data from the Ewon’s historical data. I don’t think that we’re able to take data from the Ewon’s SD card or push data to the data mailbox another way.

Also do you already have a developer ID to be able to send data to data mailbox?

https://developer.ewon.biz/registration

Merci pour votre retour.
Effectivement, j’ai déjà envoyé les données dans la data mailbox .
Si non le soucis que j’ai actuellement : Y’a t’il un moyen pour éteindre la mémoire d’un ewon? j’ai ajouté la carte SD et un certain script: GENERATE_REPORT:
// Vérifier si la carte SD est insérée ou s’il y a suffisamment d’espace
SETSYS INF, «LOAD»
SDCardSize $ = GETSYS INF, «SDExtFree»
SDCardSize_Int% = Val SDCardSize $
IF SDCardSize_Int%> 5000 THEN // 5 Mo restent
GOSUB READ_LASTTMS
LAST_TIME $ = @ GetCurrentTimeStamp $ ()
EBD_STRING $ = “$ dtHT $ ftT $ et” + LAST_TIME $ + “$ st” + LASTTMS $
FILENAME $ = “/ usr / sdext / DataReport “+ LAST_TIME $ +” .txt "
WRITEEBD EBD_STRING $, FILENAME $
ActionID% = GETSYS Prg,” ACTIONID "
ELSE
LOGEVENT" Carte EUM pleine ou
absente ", -1 ENDIF
END
SCHEDULEDACTION_END:
CurID% = GETSYS Prg, “EVTINFO”: REM Get ActionID
REM: Vérifier si c’est la bonne action de planification pour enregistrer le dernier horodatage autrement ne rien faire
Si ActionID% = CurID% THEN
SETSYS Prg, “ACTIONID”, CurID%
CurID_Status% = GETSYS Prg, “ACTIONSTAT”
REM Action effectuée avec succès → Ecrire le dernier horodatage dans le fichier
IF CurID_Status% = 0 ALORS
LOGEVENT “FILE” + FILENAME $ + "
SUCCESSFULLY EXPORTED ", 100 @WRITETMS (LAST_TIME $)
ELSE
LOGEVENT “FILE” + FILENAME $ + "NON EXPORTÉ
AVEC
SUCCÈS ", 0 ENDIF ENDIF
END

READ_LASTTMS:
SETSYS PRG, “RESUMENEXT”, 1
REM GET LAST TIMESTAMP
OPEN “file: /usr/tms.dat” FOR BINARY INPUT AS 1
LASTTMS $ = GET 1,15
CLOSE 1

Cur_Err% = GETSYS PRG, “LSTERR”

IF Cur_Err% = 33 THEN // REM Le fichier n’existe pas
LASTTMS $ = “01011970_000000”
SETSYS PRG, “LSTERR”, 0
ENDIF

SETSYS PRG, «RESUMENEXT», 0
CLS

REVENIR

FUNCTION WriteTMS ($ LastTimeStamp $):
OUVRIR “fichier: /usr/tms.dat” POUR LA SORTIE BINAIRE AS 1
PUT 1, $ LastTimeStamp $
CLOSE 1
ENDFN

FONCTION GetCurrentTimeStamp $ ()
REM TIME $ = 19/12/2014 10:03:01
$ EWON_TIME $ = TIME $
$ GetCurrentTimeStamp $ = $ EWON_TIME $ (1 à 2) + $ EWON_TIME $ (4 à 5) + $ EWON_TIME $ (7 à 10) + «_» + $ EWON_TIME $ (12 à 13) + $ EWON_TIME $ (15 à 16) + $ EWON_TIME $ (18 à 19)
ENDFN

Et effectivement il crée un dossier user / sdex et il copie toutes les variables se trouvant dans le dossier sur ce mais est ce que c’est la bonne méthode pour éteindre sa mémoire?
Merci bien