1- The environment of Sucosoft S40
Sucosoft S40 from Moeller is an IEC 1131-3 programming system. The software has flawless ergonomics and supports the user during the management and processing of his automation project. A large software library with many functional modules shortens programming times with the possibility of creating your own library and limiting foreign libraries. In the meantime Moeller offers extensive libraries in the fields of control technology and heating-air-conditioning-ventilation. The use of these standard functional modules considerably shortens the establishment of complex applications. Even in distributed installations all programmable controllers can be programmed and diagnosed from a central place by network programming.
Sucosoft S40 software is the programming tool for the PS4-141 / 151/201/271/341 series PLCs and for the PS 416. It works under Windows 95/98 and Windows NT 4.0. It supports compact and modular Moeller controllers and is delivered in five languages (D, GB, F, E, I).
What follows is to guide you step by step to find out how :
- create a project
- establish the program file
- entrer la configuration
- generate the code
- carry out the test and commissioning,
with Sucosoft S 40 software.
2- Description of the task to be performed
We want to bring the carriage of this equipment, from the initial position to position A by actuating the “START” button. The “STOP” button is used to stop the action.
In our example there are only binary input and output variables to which we will assign the following addresses:
- Initial position: Entry 0.0
- START button: Enter 0.1
- STOP button: Enter 0.2
- Position A: Entry 0.3
- Moteur : Sortie 0.0
The variable names can be freely chosen. The declaration of variables therefore takes the following form:
The “initial_position” input operand must first be read, then linked by a logic function AND to the “start_button” operand.
Reading instruction: LD
AND operation: AND
If the result of the operation (current result) is equal to 1, the “motor” operand is set to 1 (the LED lights up on the “motor” output).
Positioning instruction at 1 if current result = 1: S
The “stop_button” and “position_A” input operands are then read and linked by a logical OR. If the current result is equal to 1, the “motor” output operand is set to 0 (the LED on the “motor” output is off).
Reset instruction to 0 if current result = 1: R
Before the declaration block must appear the keyword “PROGRAM” followed by the name of the program. The instructions part must end with the keyword “END_PROGRAM” which marks the end of the program.
The final program looks like this:
3- Sucosoft S40 software
Launch Sucosoft S40, the screen below appears.
The “Navigator” window contains the icons used to open the various tools.
The Navigator assists you in all operations, from the creation of the user program to its execution in the programmable controller:
- It contains the Project Manager using which you create and structure your projects.
- It gives you access to the POU Editor to process your POUs (programs, function blocks and functions).
The instructions part of your UOP can be produced in IL, LD or FBD language. You can switch from one programming language to another while entering the program.
You have a Topology Configurator to define the hardware configuration.
Code Generation translates your user program into a program that can be executed by the PLC.
3.1- Creating a project
To create a new project, in the main menu activate the option (Project >> New …) The “Create a new project” dialog box opens:
First select the location on the disk eg drive “C”.
If you want to carry out your project in a new “Projects” folder that must be created:
- Click on the “New Folder” button and enter the name of this folder in the “New Folder” dialog box that opens.
- Confirm with “OK”.
- In the “New project folder” input box, enter the name “Example” designating your project. Confirm your entry with “OK”.
Now you can choose the appropriate type of PLC. You can select it in a choice window using the Navigator toolbar. Activate the menu ‹Generation >> Choose a PLC …> then in the dialog window“ Choose a PLC ”which opens, select a
PLC from the “PLC Types” list box.
3.2- Creating a program
User programs, which consist of one or more POUs (files), are created using the POU Editor. The generic term “POU”, abbreviation of program organization unit from the international standard IEC 1131-3, designates three types of POUs, the program, the functional block and the function. For frequently used parts of the program, the “Function” and the “Function block” are used.
Create your user program using the Navigator menu: Tools >> POU editor
The POU Editor is open:
In the standard toolbar, click on the “P” button which designates program type POUs
The two windows “Declaration part” and “Instructions part” are displayed on the screen, with the basic presentation configured in the POU Editor.
To enter the variables of the declaration part, Sucosoft S 40 offers you a user-friendly variable editor with syntactic assistance (assisted mode) which is presented in the form of a table made up of input cells in which you enter your declaration.
Type: For this entry, you have a list box with different data types, which you can select using the option ‹Insert >> Data types … >> data types› or the menu contextual. Choose the type “BOOL”.
Initial value: Do not enter any indication. The value 0 will thus be assigned to the “initial_position” variable when the program is started.
Attribute: Do not enter any indication. The qualifiers “RETAIN” for a non-volatile variable or “CONSTANT” for a constant are not intended for input and output (I / Q) variables.
Address: I0.0.0.0.0 Physical address of the “initial_position” variable.
Comment: Optional. In this case enter Home position.
You can view the completed variable declaration in “Free mode” also called Free variable editor: Select Special >> Variable editor >> Free mode
Entering the program in the IL Editor:
The IL programming language is a literal language, structured in line as follows:
- Label (optional), operator, operand, comment (optional)
- You must enter the different elements, separating them with a tab or a space.
- Each statement must start on a new line.
Go to the instructions section by clicking Special >> Programming language >> IL of the POU Editor.
Save the completed example program by selecting File >> Save as … You access a window containing the SOURCE folder of the current project, intended to receive the POU. Enter the POU name “position” and confirm your entry with “OK”.
Select File >> Syntax Check.
you must now configure your hardware system using the Topology Configurator tool. You enter information about the structure of the system, or topology. Activate the “Topology configurator” window in the Navigator
You must enter all the building blocks of the automation system as well as the information for each element of the configuration. In our example, only the compact PS 4 PLC is taken into account.
Create a new topological configuration using Configuration >> New
Enter the name “DEVICE” in the “File name” box, select “PS 4-141-MM1” or the type of your existing PS 4 in the “PLC type” list box and confirm with “OK”.
Select Configuration >> Save
3.3- Generation of the program
To generate the program executable by the programmable logic controller, the Navigator offers you commands that can be activated directly using the “Generation” option, or the buttons on the toolbar.
Select Generation >> New generation list ..,
Choose from the list boxes: the “program” type POU that you want to generate as an executable program. Validate with the “OK” button.
Select Generation >> Generate All
3.4- Testing and commissioning
The Test and Commission functions allow you to transfer the program to the PLC and test it.
In the Sucosoft Navigator, select the tools and activate the “Test and commissioning” command
Select “Transfer …”. The “File Transfer / Manager” dialog box opens:
Mark the code file that you want to transfer to the PLC and select the ‘Transfer Þ PLC’ button to launch the command. A progress bar allows you to follow the progress of the current operation:
Launch of the program:
Click on the “Program status …” button in the “List of connections” window. The following dialog opens:
You can use the buttons to start or stop your program or to get information about the errors that have occurred.
3.5- Entering the program in LD
You can build your programs in the LD languages and put them into service, as described for the IL language. The instruction part of a UOP in LD language is represented by graphic symbols. The declaration part is presented in the same form as in IL language.
Choose LD programming language using Options >> Programming language >> LD
You can also build your programs in FBD languages and commission them, as described for the IL language. The instruction part of a POU in FBD language is represented by graphic symbols. The declaration part is presented in the same form as in IL language.
Choose the FBD programming language using the option Options >> Programming language >> FBD
Download Sucosoft s40 programming software
It may interest you
- Download Levi Studio software from Wecon
- Download V-NET Mobile APP (Android version)
- Download WECON’s V-NET Client Software
- Download PIStudio Software from Wecon
- What is home automation (domotic)