I declared new variables in my worksheet and used the function in the worksheet to create them as new local variables. Now I have following exceptions:
* VAR0020 Data type expected
* VAR0003 ';' expected
* VAR0023 'AT' or ',' expected
* VAR0007 ':' expected
When I click on one of those exceptions, I get redirected to the variables list of my program and only get the message displayed ‚The variable worksheet is flawed‘. Rebuilding the project doesn’t have any effect. Are there any other things I could do to fix my project?
I am correct, that you come from codesys? In PLCNext the variable declaration is done in two ways: Global variables are entered in the left side Plant menu. double click on PLC and select Data List. Here you enter you variables for use as global variables. Local variables are declared in the program worksheet → Variables. If you want to use global variables in the program, you just start typing you variable name and an selection window will open. Or you can enter the variable manually in to the variable sheet of your program by typing the variable name in the name column. I prefer this because you are able to insert groups in to the variable sheet for better overview (Function, External - those are the global variables and internal). When entering the external variables directly in to you program, they will be listed under a group called Default. There are attached two screen prints that should help you. Peter Paul
Hi Peter Paul, thanks for the reply, but my problem is not „how“ I can create new variables. In my code worksheet, I typed a new variable und there is also the function available to create this variable as external/global or local variable if it doesn’t exist. Using this functionality caused my errors. I prefer to use the functionality to create new variables directly from my code worksheet, because always having to switch between code an variables list is very time consuming in my eyes. A good feature for the PLC Next Engineer would be a similar variable creation dialogue like it was available in PCWorx, because the current creation method in the code worksheet gives no option to specify the data type or the variable group for ordering the variables list. Anyways, the problem is already redirected and there is some research ongoing, what caused the errors. Best regards, Fabian