Converting Variable Symbol name in a STRING

2008-12-04
2008-12-09
  • Dochteren IA - 2008-12-04

    Is it possible to convert a Variable Symbol name, e.g. ´nGen_Air_TempAvg_10m´ with the instruction …_TO_STRING(), without converting the actual value of that Variable?

    Problem:

    I’m being to log values (works already) on a Compact Flash Card and/or a USB Memory Stick.

    Creating the Directory name and also the File name (when I typed it by hand) is no problem.

    The File name is e.g. “nGen_Air_TempAvg_10m.txt”.

    My problem now is to convert the Variable Symbol name ´nGen_Air_TempAvg_10m´ into a STRING, so I can use ´CONCAT´ to add the ´.txt´ and create it on the Compact Flash Card or USB Memory Stick as the File name and also use it as the variable to log the values which are saved in this File. I don’t want to type twice the names.

    The better way is to type nothing, but use a Table in the Visualization where I can select one out of all the Variables (several hundreds) used in the Project, which can be select as the File name and logged as the Variable.

    Is it possible that Roland Wagner, or some other person from 3S can give me an answer on these issues.

    The used hardware is a Bachmann M1 (MPC240) with programming software M-PLC (is CoDeSys Version 2.3.7.1).

    Henk Stemerdink

    Dochteren IA

     
  • bschuster - 2008-12-09

    Hello, at the moment there is no function within CoDeSys. The only way could be the parsing of the xml-symbolfile.

     

Log in to post a comment.