Time Format

Hi
I read the time from a plc that connect to flexy in seconds (from midnight)
How can i show it in time format (HH:MM:SS) in viewon?
Thanks
Nachum

Hello,

You have a few options to for displaying the time. I would advise creating a Text Box and writing a BASIC Script that shows the time format.

I have embedded a post that goes over the BASIC script required for displaying the time.

I have all added the BASIC IDE Reference manual if you would like to explore BASIC Scripting with the Flexy

rg-0006-01-en-basic-programming (1).pdf (758.6 KB)

Thank you

I’ll try

image001.jpg

image005.jpg

image002.jpg

Excellent,

Let me know if you run in to any hiccups. While I can’t write the code for you. I can review your code and help with errors.

Thank you

I have another problem:

I try to read a bit from integer by modbus and I get error 27

I did it in another flexy and it’s work

I attached a backup

Thanks

Nachum

image001.jpg

image002.jpg

eWON_SMS_26.01.2021.tar (89.5 KB)

Sorry

I put the wrong backup

image002.jpg

image001.jpg

eWON_SMS_26.01.2021.tar (89.5 KB)

Hello,

So the backup you sent contains not event logs so that I can review the error. Are you selecting “Include Support Files”?

Can you take a screenshot of the exact error?

Thank you very much

This is a screenshot of the exact error

I’ll try to send you a new backup tomorrow

Nachum

image001.jpg

image002.jpg

The Error is caused by removing/renaming the Init Section of the BASIC IDE. Looking at your backup, you have two Init Sections, which causes the compiler to look at the incorrect format.

image

You two options to rsolve this:

1: Backup you code to a text file, and Factory reset the unit.

2: Backup your code, and FTP into the Flexy. Download the Program.BAS file and open it with Notepad/Notepad++. Erase the contents of the file, and replace it with the following:

Rem — eWON start section: Cyclic Section
eWON_cyclic_section:
Rem — eWON user (start)
Rem — eWON user (end)
End
Rem — eWON end section: Cyclic Section
Rem — eWON start section: Init Section
eWON_init_section:
Rem — eWON user (start)
Rem — eWON user (end)
End
Rem — eWON end section: Init Section

image

Once complete, upload your code and the error will be resolved.

I did

Did not seem to help

image001.jpg

image002.jpg

Hello,

Which did you do? Did you factory reset it? or did you update the program.bas file?