TestIT:Programming

From Nolek Wiki
Jump to navigation Jump to search

5. Programming

The programming service allows you to create, update, and delete programs. A test of programs can also be done in this element.

TestIT Info

An overview of programming

Options

5.1 Programs

Select a program and an overview of the program with details will be shown. Here it is possible to switch between the programs. By a pressing on the View program button, the program editor will be shown.

5.2 Program editor

It is possible to go to program editor on the main menu of the programming. Just press on the program editor symbol. It is also possible by selecting the wanted program and then pressing View program. The picture shown below is when the program editor symbol is selected.

Options

  • All programs All programs - view all programs
  • New program New program - create new program
  • Program symbols Program symbols - open program symbols menu
  • Comment Comment – insert a comment in the program
  • Save program Save – save the program
  • Compile program Compile – compile the program to check for errors (F6)
  • Debug Debug – compile, save and open the debug area (F5)
  • Config Config – open the command configurations area (F2)
  • Command info Info – display command info (F3)
  • Symbols Symbols – open symbol handler (F4)

5.2.1 Create new program

  1. Press the Create new program button
  2. Write program name (required)
  3. Write a description of the program
  4. Select Active, if the program has to be active
  5. Select insert standard project to insert a TestIT standard project
  6. Press Create – or Cancel and the program will not be created

Now it is for example possible to insert the wanted functions, debug the codes, go to production and run it.

5.2.2 Program symbols

To select program symbol, a program has to be viewed or a new program has to be created. In this, all the symbols which are defined as a program symbol will be shown to the right. Now it is possible to select the symbols for the selected program. Press the Save symbol to add the program symbol to the program and press the Trash symbol to remove a program symbol from a program.

5.2.3 Debug area

In the debug area, all the codes can be tested to see if they are correct. To go to this area, press the Debug button.

This debug area is divided into three windows:

  • Code/debug window
  • Production window
  • Symbol watch list window

Options

  • TestIT Home button Home - go back to home screen
  • Program editor Program editor – go to program edit
  • Not connected Not connected to I/O – is not connected to TwinCat I/O's
  • Connected Connected to I/O – is connected to TwinCat I/Os
  • Not Debugging Not debugging guide steps
  • Debugging Debugging guide steps

5.2.3.1 Code/debug window

In this window, all the codes are shown. The codes can be shown while the program is running in normal or in step mode. The buttons in the bottom, from left to right:

Run program Run program – press and the program will start like it would start in production
Step mode Run program in step mode – the program will execute one line. After a press on this button the Step to next line button is going to be used
Next line Step to next line – press and the program will execute the next line
Continue Continue run – press and the program will execute to the end
Stop Stop program – press and the program will stop
Pause Pause – press and the program can run in Step mode or with Continue run

5.2.3.2 Production window

The production window shows what it will look like in the production. It will show the status of the run.

5.2.3.3 Symbol watch list window

In this window, it is possible to watch and change the symbol values. There are two tabs; one with a watch list of the selected symbols; the other is symbols, and is a list of the symbols that can be selected. If a symbol is unwanted, press the red cross and the symbol will disappear. To empty the list of the selected symbols empty, select the Empty list button. In the symbol tab it is possible to add some symbols. Press the green plus and the symbol will be added to the watch list.

5.3 Commands

5.4 Standard project

When “insert standard project” is marked, it will insert the code below:

Standard project structure
'**************************************
/* Main Sub: Add comment here */
Function.Sub(Main)
'Add comment
Function.GoSub(1000)

'Add comment
Function.GoSub(2000)

'Add comment
Function.GoSub(3000)

'Add comment
Function.GoSub(4000)

'Add comment
Function.GoSub(5000)

'Add comment
Function.GoSub(6000)

'Add comment
Function.GoSub(7000)

'Add comment
Function.GoSub(8000)

'Add comment
Function.GoSub(9000)
Function.EndSub()

'**************************************
/* Sub 1000: Add comment here */
Function.Sub(1000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 2000: Add comment here */
Function.Sub(2000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 3000: Add comment here */
Function.Sub(3000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 4000: Add comment here */
Function.Sub(4000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 5000: Add comment here */
Function.Sub(5000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 6000: Add comment here */
Function.Sub(6000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 7000: Add comment here */
Function.Sub(7000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 8000: Add comment here */
Function.Sub(8000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub 9000: Add comment here */
Function.Sub(9000)
Misc.Reset(_seqOK)

Misc.Set(_seqOK)
Function.EndSub()

'**************************************
/* Sub System Stop: Add comment here */
Function.Sub(system_stop)
Function.EndSub()