I have the same problem, I can’t export files to the device. Do you have any idea of what that could be?
Export ViewOn project Error
Just to start off can you give me a backup of your device with the support files included?
I solution the problema.
But I want to know how much values can I show on the graph, what it’s the máximum of points of the historical?
Your viewon graph should be able to show all of the data available in the historical logs of the flexy.
As for how many points you can have in your historical logging, this will depend on how many tags you are polling and how frequently they are being polled.
Another question, I try to send a file with Basic IDE.
In this file, I want to show things like the value of some tags, one header, some explanations … So I want to créate and edit this file and after send it for email.
It is posible?
I think that you should be able to do this through the BASIC IDE
Try taking a look at this code and let me know if you have any questions
sendtojoe.txt (991 Bytes)
But I want to make a file with always the same header, but changing the values or information in it.
I want to send an email with a file that I “building” with some requirements when a button of PLC is presed.
It is possible? Thank you!
Do you just want to change something like the body of the email? This can be done in viewon and you could have the Flexy read the value of that button press.
For the button you could do an Onchange and make it so when the button is pushed it will send out an email
No, I don`t want to change the body of the email, I don’t want to write anything on it. I only want to have a file with the same header in all of the sends and include some information when I pressed the button.
Yes, I alredy detected the button’s pulse with BASIC IDE.
This line of code from the doc above should be able to give you the time that the email was sent which should correspond with the time the button was pressed
$EmailBody$ = $EmailBody$ + "Time: " + TIME$ + CHR$(13) + CHR$(10) // Gives the full date when this was sent.
You could just have it so that it the remaing sections are left blank, like this
sendtoamc.txt (619 Bytes)
Thank you!! One more question…
ONALARM “envio”, “GOTO envio_LABEL”
If (envio@= 1) THEN
IsFile% = FS "touch", "/usr/fileToSend.txt" PRINT IsFile% // returns -1 if "fileToSend" exists // returns 1 if "fileToSend" doesnt exist and creates it as a file IF (IsFile% = 1) THEN OPEN "file:/usr/fileToSend.txt" FOR TEXT APPEND AS 1 PUT 1, " Se realiza un histórico de los distintos valores tomados por las variables cada vez que se presiona el botón de envío" + CHR$(13) + CHR$(10) PUT 1, " MIESA " + ";" + " 2019 " + ";" + " Flexy 205 : eWON " + CHR$(13) + CHR$(10) PUT 1, Time$ + ";" + " Variable suma " + ";" + STR$ suma@ + ";" + " Variable resta " + ";" + STR$ resta@ + ";" + CHR$(13) + CHR$(10) REM PUT 1, Time$ + ";" + "Variable resta" + ";" + STR$ resta@ + ";" + CHR$(13) + CHR$(10) CLOSE 1 ENDIF ELSE OPEN "file:/usr/fileToSend.txt" FOR TEXT APPEND AS 1 PUT 1, Time$ + ";" + " Variable suma " + ";" + STR$ suma@ + ";" + " Variable resta " + ";" + STR$ resta@ + ";" + CHR$(13) + CHR$(10) REM PUT 1, Time$ + ";" + "Variable resta" + ";" + STR$ resta@ + ";" + CHR$(13) + CHR$(10) CLOSE 1 ENDIF PRINT "Archivo creado" SENDMAIL "firstname.lastname@example.org", "", "Archivo","&[$dtUF$uf/usr/fileToSend.txt$fnArchivo.txt]"
Rem — eWON user (end)
Rem — eWON end section: Init Section
I have this program to send an email when an alarm(envio) is happend.
But I have an error:
variable not found(16) 15: IsFile% = FS “touch”, “/usr/fileToSend.txt”
Do you find the error?
I don’t see anything wrong with this program. Are you able to run the line
IsFile% = FS "touch", "/usr/fileToSend.txt" from the console with out errors?
I get the same message.
variable not found(16): IsFile% = FS “touch”, “/usr/fileToSend.txt”
What is the ewon device are you using and what Firmware are you running?
This is a bit odd this should be defining the variable at the same time. Can you set the IsFile% equal to 0 first? Or if you run just
FS "touch", "/usr/fileToSend.txt" does the file get created in the usr directory?
If you provide me with talk2m login info and the user name and Password for the device I can remote into it and test this myself.
I updated de firmware to 13.2s1 and it works perfectly.
Thank you for the help!
Your welcome, Glad to hear it is working.