Implementieren in CODESYS V3.5

<< Click to Display Table of Contents >>

Navigation:  Target systems > CODESYS >

Implementieren in CODESYS V3.5

Start CODESYS V3.5:

CodeSysStart

 

Open "New Codesys Project"

CodeSysNewProject

 

Create a " Standard Project" and select a name and a location for the project.

CodeSysStandardProject

 

Select " CODESYS Control Win V3 x64 (3S - Smart Software Solutions GmbH) as the device and

Structured text (ST) as PLC-PRG in.

CodeSysStandardProject2

 

Now you must import the PLCopenXML file from Selmo studio.

Select "Application" and click on "Project" and go to "Import PLCopenXML".

CodeSysImportPLCopenXML

 

Check all "Insertable elements" that you need and press Ok.

CodeSysImportPLCopenXML2

 

Select Application and click on "Project", go to "Add folder", name the new folder "GVLs".

CodeSysAddFolder1        CodeSysAddFolder2

 

Highlight the new folder GVLs and click on "Project/Add Object/Global Variable List" and then click on "Add".

CodeSysAddGVL

 

 

Now you need to add the library, click on Library Manager/+Add Library

CodeSysAddLib1

 

Go to Application/Common, click on Selmo Basic and then on OK (always use the latest version).

CodeSysAddLib2

 

Select Application and click on "Project", go to "Add object" and "Symbol configuration".

CodeSysAddSymbolConfig

 

Add.

CodeSysAddSymbolConfig2

 

Write your inputs and outputs in the GVL, also the In/Output Mapping (PRG) of your model.

In this case:

CodeSysGVL

CodeSysInputMapping

CodeSysOutputMapping

 

Open PLC_PRG (PRG) and write " GlobalControl ();"

CodeSysMainCall

 

Go to the symbol configuration, check all symbols and click on "Build".

CodeSysSymbolConfigBuild

 

Select Application and click on "Project", go to "Add object" and "Persistent variables".

CodeSysAddPersistentVars

 

Add.

CodeSysAddPersistentVars2

 

Open "Persistent Variables" make a right click and go to "Add All Instance Paths".Open "Persistent Variables", make a right click and go to "Add All Instance Paths".

CodeSysAddAllInstancePaths

 

F11 or Build and then you can save the project.

CodeSysBuild

CodeSysSaveProject

 

Make sure your "CODESYS Control Win SysTray-x64" and "CODESYS Gatewy SysTray-x64" are running.

CodeSysWinSysTray CodeSysGateway

 

Next, select the network path to the controller. Go to Device (CODESYS Control Win V3 x64),

Scan network to find your controller/PC.

CodeSysSelectDevice

 

Once you have found your device, you can log in.

CodeSysLogin

 

Press F5 or Start to start the application.

CodeSysStartPLC

 

Here you can start/stop the application or log in/log out.

CodeSysStopPLC