Basic script character changes and auto add numbers to tag

HEllo There,

I’ve got two things from same customer that uses a script since 2005CD that runs well but with newer versions Flexy201 (v12) there is some weird things that occurs in the script.

Basically, the customer sends 2 integer on a ftp server- port 5000 and he cocatenates his 2 integer in one string. Those two integers are separated with a ‘-’ so the server knows that it’s 2 different values. Sometimes, the script outpus a ‘;’ instead of a ‘-’ and then server is messed because he does not recognize the ‘-’.

Another flexy adds up a value of +2 on tag number of bands (nombre_bandes@) depending of a situation. If this number is changed the value keeps the old one +2…

If (BandeFantome@=1) THEN
If (s%=0) THEN
NombreDeBandes@=(NombreDeBandes@+2)
s%=1
Endif
Endif

He adds up a condition when if the tag is up, you add up +2, if not, it should remain the same value…

Here are backups of their units.

PLease let me know if you see something obvious.

Thanks,MOVED TO STAFF NOTE (42.5 KB)
MOVED TO STAFF NOTE (239 KB)

@Jcadorette

I reviewed the script and I am not seeing anything in regards to FTP’ing anything.
I do see it appears he may be concatenating some string values from his device and then
extracting individual bits, is that the case here?

If that is the case, then we need to see some live debug statements because the eWON is simply pulling the char associated at that index.

Can you provide a slightly more concise code snippet of where that action is taking place?

Hello Jordan,

Here is the section where the ‘-’ is outputted.

In the section IMPORTDATA, we go get the ascii character symbol 45 which is ‘-’

v$= CHR$ 45

Then the two integer are concatenated into one srting here in the same section:

z$=VAL (“d$+v$+e$”)

@Jcadorette

If this is just string concatenation you can drop the VAL and just do:

z$ = d$ + v$ + e$

They are all strings so they can be directly concatenated. Something else would have to be altering the v$ variable the that is a constant value (ASCII -).

Hi Jordan, What about the other issue regarding the unvolontary +2 added to a tag:

Another flexy adds up a value of +2 on tag number of bands (nombre_bandes@) depending of a situation. If this number is changed the value keeps the old one +2…

If (BandeFantome@=1) THEN
If (s%=0) THEN
NombreDeBandes@=(NombreDeBandes@+2)
s%=1
Endif
Endif

Let me know if you want it clarified.

Thanks,

@jseanor, any news on the latest post?

Thanks,

Hi @Jcadorette

Sorry about that, this script appears fine. Any
chance we can get live with it to see what is going on?

Hi Jordan,

I should have some time tomorrow afternoon so I will let you know when I am ready.

Thanks for your answer.

Cheers,

@Jcadorette

Perfect, let me know when you are available.

Hi @Jcadorette

I didn’t hear from you yeserday, I wanted to reach out to see if you had some time today to close this up.

Hi @Jcadorette

I wanted to follow up on this as we still haven’t reached a resolution. Were you avaiable at any time so we can put this issue to bed?

Hi @Jcadorette

Just wanted to follow-up on this case again as it is nearing 1 month old.

Were you able to figure out a time so we can close this issue out? If the issue is no longer
relevant, please let me know so I can close this thread.

Hi @jseanor,

You can close it. It might be reopen in a new ticket.
The customer was on vacations and I lent him a Flexy so he’s testing his script…

Thanks for your help Jordan!

Sounds good!

Feel free to open a ticket when you are ready.