Skip to content

Ability to declare variables in structured text

It would be really much more convenient if variables could be declared in structured text, similar to CoDeSys maybe.

I like to auto generate my code as much as possible and not being to do the variables at the same time makes it very inconvenient, compared to what it could be.

Is this feature likely at all in the foreseeable future?

For me it is close to a reason not to use PLCNext, when then there are so many other reasons to use it.

Comments

  • Have you tried working with a *.pcwef project format yet?

    It looks like you can edit files there. (I added the highlighted lines to the file directly)

    Cheers

    DivisionByZero

  • Hello anythingwithawire,

    the solution he focuses on in CODESYS is that the variable worksheet in CODESYS can switch between a table and a textual worksheet.

    We do only have a variable table for that and (unfortunately) we will not change it in near future. 

    But if you wont to generate the variables, you can now use the *.csv Import/Export which is newly availabel for variable tables of POU's.

    I hope this fulfilles your requirement.

    BR Eduard

  • Hi Eduard,

    I'm new to PLCnext, just starting to try it out after using Bachmann's Solution Center for some years.

    The ability to declare variables freely in ST is a huge advantage when a program has many variables as you can organize them in your own way, with comments outside the actual variables etc etc. I feel very "trapped" when forced to live inside a table like this.

    Hope this helps in understanding :)

  • Hello sunnyHill,

    thanks you for your feedback. I have forwarded your suggestion to the PLCnext Engineer product manager for evaluating the possibility.

    If you are familiar with the C# language, can you try writing your POUs in C#? This high-level programming language is entirely text-based and you are free to use all the suggested features you need.

    BR Eduard

Sign In or Register to comment.