Switch to desktop version  
Creating tags in BAsIC IDE - Printable Version

+- Ewon Technical Forum (https://techforum.ewon.biz)
+-- Forum: Development (https://techforum.ewon.biz/forum-50.html)
+--- Forum: BASIC Script (https://techforum.ewon.biz/forum-52.html)
+--- Thread: Creating tags in BAsIC IDE (/thread-928.html)



Creating tags in BAsIC IDE - ProAuto - 15-05-2019

Hi,  


I would like to make a plc (OMRON CJ2M) communicate some string value to be displayed at an eWON flexy 205 web page. I've looked into the forum and it looks like it is not possible to create string tags. However, I would do it with integer values then using this trick to convert it into a string https://techforum.ewon.biz/thread-166.html?highlight=string, but there is too much tags to do (like 600 integer tags). I was wondering if it is possible to create tags with a for loop using the BASIC IDE in the ewon ?

Code:
tagCreation:
@createFirstTag("Tag3")
Function createFirstTag($name$)
 Print "createFirstTag: ";$name$
 $A$ = '"Name";"DS56,0,120,192.168.15.120";"INTEGER"'+Chr$(13)+Chr$(10)+'"'+$name$+'";"FINS";1'+Chr$(13)+Chr$(10)
 Putftp "/var_lst.txt",$A$,"adm:adm@127.0.0.1"
EndFn


CFGSAVE

I've already tried this code from simon to make a single tag but without sucess. I do not see the created tag in the ewon's listed tags.


RE: Creating tags in BAsIC IDE - ProAuto - 16-05-2019

Ok, it looks like i've found an alternative way to do it.
Basically, there is a tag section in the config file. I used a python script to generate strings of tag (with the incrementation of adress,name etc) and then copy them in the same section to create them. Refresh the ewon page and Voilà