BASIC IDE

Could you send me a backup.tar file of the device with the support files included?

I send the code
MOVED TO STAFF NOTE (54.5 KB)

One of the problems is in line 36 the code is executed sending the variables up to line 40 but I need to send the timer 36 (TSET 2, 120) who has the variables from 43 to 47

I need to make a setting in the date format in the following way the date must have this format year / month / day / hour the time function did not have the format required

A second adjustment that I want to make is the function (@ Var_int3 (“packaging-units”, Filled_BB @, “3”, Sts_PresentacionBB @) is made up of two variables Filled_BB and Sts_PresentacionBB I need to send if this function changes in either of its two variables , initially I did it with the onchangem function but this only works when it is only a variable that changes

the error that sometimes appears when executing the code is this

sometimes this error appears

The solution to the error of the date I had was to delete the date, run the code and stop it, re-run it worked with the format of the declared date

It looks like the error that’s occurring here might be happening because it might be missing one of the variables you’re trying to call.

Before the DATAR_I8$ call, you could try and do a print statement for each of the variables and see which one is saying it has no value.

Function Var_int8($api_int$,$Valor_K$,$id_maquina$,$id_cabezal$)
//AR_I8$ = SFMT $Val_Var_int, 30, 0, “%d”
DataR_I8$ = “tipo=” + $Valor_K$ + “&id_maquina=” + $id_maquina$ + “&id_cabezal=” + $id_cabezal$ + “&fecha=” + fff$ + “&hora=” + hora$
@SendInfo(DataR_I8$,$api_int$)
ENDFN

When you say the error sometimes appears on the Requesthttpx line, do you mean that sometimes it runs without any issues? It might be an issue wehre one of the variables you’re calling doesn’t currently exist and you could try and debug that by using the same step I recommended in the previous issue

how could i fix this communication setting between ewon and plc

What kind of tags are these, do you have the disable tags in error box checked off?

Do you have the correct settings for the IO server that those tags are using?

Make the adjustment but this error occurs eventually
I have another query I need to run two timers with the Tset function I declare them this way

TSET 1, 30
TSET 2, 60
ONTIMER 1, “Goto RealTime_Timer1”
ONTIMER 2, “Goto RealTime_Timer2”
END
RealTime_Timer1:
IF (Process_ID @> = 30) THEN
@ Var_int3 (“packaging-units”, Filled_BB @, “3”, Sts_PresentacionBB @)
@ Var_int3 (“packaging-units”, Filled_BC @, “4”, Sts_PresentacionBC @)
ELSE
ENDIF
END
RealTime_Timer2:
IF (Process_ID @> = 30) THEN
@Var_float (“variables”, “1”, Temp_Perox @, “1”, “”, “101”)
@Var_float (“variables”, “1”, Cabinet_Temp @, “1”, “”, “102”)
@Var_float (“variables”, “1”, Temp_CIP @, “1”, “”, “103”)
@Var_float (“variables”, “1”, Temp_Refri @, “1”, “”, “104”)
@Var_float (“variables”, “1”, Temp_Ester @, “10”, “”, “105”)
END

What I am looking for is TSET 1 to be executed and after this TSET 2 is executed, the condition ID_Process is fulfilled so that both TSETs are executed, I send the code

MOVED TO STAFF NOTE (28.5 KB)

If you want to do that, you can start off with TSET 2,0. This will turn the timer off, then at the end of the Goto RealTime_Timer1, you can put the TSET 2,60 to turn the timer on after Timer 1 has gone through the sequence

Hello can you help me with a query is that I have tried to implement a solution of the theme (counter to implement a buffer when making each request)
The code that they suggest me in Hms is the following
Tset 1,0 // Initializes counter to be off
Ontimer 1, “@ Count ()” // will run only when timer 1 is turned on
Onchange “counter”, “@ Offline_Reboot ()” // will check the status of coutner
ONVPN “@WANCHECK ()”
FUNCTION WANCHECK ()
I% = GETSYS PRG, “Evtinfo”
Print I%
If I% = 1 Then // only starts the timer if it’s showing the device offline
Tset 1.0 // Turns Timer off
Print “device Online reboot timer off”
Else
Tset 1,1 // starts the timer
Print “Device offline starting reboot timer”
Endif
Endfn
Function Offline_Reboot ()
If counter @> 600 Then // if the device hasn’t come on after 600 seconds it reboots
Tset 1.0 // Turns Timer off
counter @ = 0 // resets the counter
// SETSYS PRG, “MDMRST”, 1 // Performs the modem reboot only when the counter hits 600
Reboot // full system reboot
Print “rebooting”
Endif
ENDFN
Function Count ()
counter @ = counter @ + 1 // will keep incrementing each second
Endfn

Could you tell me how to declare Ontimer and Onchange are declared as the manual says, could you give me an example

I already did the setup with the above mentioned code, but I have a problem. when executing the code for the first time there is no problem but when the function found in the change changes its value, ewon disconnects and reconnects sending the new value of the function found in the change, but in that disconnection the connection is removed, what do I have with a plc

Hi Carlos,

That example was meant to show how to use a counter, in the example above it’s set so that when it has a trigger (in this case, the trigger is the ONVPN function) It checks what the value is, and if it sees that the device is offline, it will turn on a timer shown at the beginning of the code. That timer will then go to the count function and have the value go up by 1 each time. There’s also a function that checks to see if the value of the counter goes over a certain amount in this case 600, so that means that after 10 minutes it will execute a reboot procedure shown in that if statement.

I’m not entirely sure what you mean in your second statement though. When you say that the value changes the ewon disconnects and reconnects, are you using the reboot sequence above? Because that was just intended to be used as an example on how to use a counter to create a delay.

Hello, good afternoon, can you help me understand this error or how you can implement the sending of a return code in order to know which error is

Wasn’t this the same error that was fixed when we tried limiting the amount of calls that you were making at once?