BASIC IDE

Hi Peter,

I just restored the backup on that device and put 2 print statements into the WriteToSiemensPLC at the front of the code and at the end of the code, and both of those seemed to show up in the console without issues. So it looks like that block is still being triggered from what I can see.

-Tim

Hi Tim,

just re-tested it…

and the print works if the “tset …” and “Ontimer…” is put on top… (until time stamp 8:44…)

If I move the 2 lines of tset 3 to just above the “WriteToSiemensPLC” block… the print stops and timer function doesn’t work…
no other notification show in the console of errors and such with the script…

If i put the 2 lines back at the top (8:47) the print resumes again…

FW: 14.2s0
and loader: 2.1.1

perhaps any difference there? :confused:

BR
Peter

maybe I’m misunderstanding something.

I tried doing it the following ways and both seemed to work

tset 1,5
Ontimer 1, “@timetest1()”

Function timetest1()
print “printing from tset 1”
endfn

tset 2,5
Ontimer 2, “@timetest2()”

Function timetest2()
print “printing from tset 2”
endfn

image

tset 1,5
tset 2,5

Ontimer 1, “@timetest1()”
Ontimer 2, “@timetest2()”

Function timetest1()
print “printing from tset 1”
endfn

Ontimer 2, “@timetest2()”

Function timetest2()
print “printing from tset 2”
endfn

image

Hi @Tim_hms,

the script like the backup I Sent you… it works perfectly…
But if you move the “Tset3,15” further down the script (to make it a logical part of the script)
=> The modbus to S7 is not standard in our scripts… only the upper part is… so I added it like this and the print doesn’t work… nor does the timer get triggered.

Is this explanation a lot clearer or should I make a backup (support) with the issue and without the issue?

BR
Peter

If possible could you make the backup with support files just so I can get a full look at the code you’re trying to implement. If possible try and leave the code in the condition where it doesn’t seem to be calling the different functions

-Tim

Hi Tim,

I had some urgents concern before handling of this problem…
MOVED TO STAFF NOTE (386.5 KB) MOVED TO STAFF NOTE (385 KB)

I’ve uploaded 2 support files, one is working fine, and the other one (with NW “not working”) is more logical flow for us but is not working… and is just a cosmetically re-arranged script.

br
Peter

Can I take a look at this over TeamViewer when you’re free?

https://s3.amazonaws.com/hms-networks-s3/original/1X/HMS_QS.exe

Hi Tim,

HI Tim,

I created an HMS Account for you to edit

[information redacted]

Thanks Peter,

I’ll take a look now and see what I can find

From what I can tell, it looks like it’s working?

Hi Tim,

now its working but if you place the code-part
"
Tset 3,15
Ontimer…
"
which resides now on top towards write above the “WriteToSiemensPLC” you’ll notice that it stops working…

This is not a natural behaviour…

br
Peter

That is strange, but if the code is working as it stands right now I’d recommend just leaving it

Hello I have a query with a timer
this is my role
@Var_float (“variables”, “1”, Cabinet_Temp @, “1”, “”, “102”)

How should I declare the timer for every certain amount of time the function is executed.
Looking at the previous lines, I find this way but it doesn’t work for me.
TSET 3,300
ONTIMER 3, “@Var_float (” variables “,” 1 “, Cabinet_Temp@,” 1 “,” “,” 102 “)”
Function @Var_float (“variables”, “1”, Cabin_Temp@, “1”, “”, “102”)
Print “printing from TSET 3”
Endif
if so, I get an error in the line Function @Var_float (“variables”, “1”, Cabin_Temp@, “1”, “”, “102”)

Declaring the timer as TSET 3,300 should be fine, that just means that the 3rd timer will go off every 300 seconds. When you have the line

ONTIMER 3, “@Var_float (” variables “,” 1 “, Cabinet_Temp@,” 1 “,” “,” 102 “)”

What is the error you’re getting in the console?

I don’t know if the problem is in the order in which I declare the variables
@Var_float (“variables”, “1”, Cabinet_Temp @, “1”, “”, “102”)
TSET 3,300
ONTIMER 3, “@Var_float (” variables “,” 1 “, Cabinet_Temp @,” 1 “,” “,” 102 “)”
I assume that this part of the code is executed every 300 seconds and in order to be able to send it through a function that I already have a program in another part of the code
This is the function (@Var_float (“variables”, “1”, Cabinet_Temp @, “1”, “”, “102”)
) I need to run those 300 seconds to send

Could you make me a temporary user on your eCatcher account and PM me the login information so I can try to take a look at this?

-Tim

I can’t give access to ewon through eCatcher since this account belongs to a company for security reasons, I wouldn’t. I could send the code to some mail or private platform in order to find a solution