Dear Sir/Madam, I am trying to write some part of my code in ST mode. When I am trying to use PLCnext Engineering editor, anytime I am using VAR (Statement) END_VAR, the invalid statement error appeared in my ERROR LIST. Would you please help me out? Also, would you please help me where can I find ST samples written in ST code and PLCnext Engineering environment? Best Regards, Mehran.
Hi Mehran, [quote]using VAR (Statement) END_VAR, the invalid statement error appeared[/quote]In PLCnext Engineer, you cannot declare variables using the VAR construct. Variables must be declared in the variable table, alongside the code sheet. There are some snippets of ST code in the relevant part of the PLCnext Engineer help system: [attachment]2021-09-09_15-09-39.jpg[/attachment] This part of the help system also includes a complete ST programming reference. If you work through that part of the help system from start to finish, I hope this will help. I believe that there is additional training material on this and similar topics currently in production but, in the mean time, if you have any questions on specific features of the ST language, please ask here in the forum. .
