Images and screenshots may differ from the current version due to development environment updates.
IEC Editor
is a PLC programming tool matching IEC 61131-3
standard. It supports ST
, IL
, LD
standard programming.
The code can run in Simulation mode or installed into a PLC target.
Project contains the POU
objects which make up a PLC program and hardware configuration necessary to run on a specific target systems (PLCs, devices).
POU objects are managed in the POUs edit window.
Device specific resource objects are managed in the Hardware view.
A project is saved into <INSTALL_FOLDER>\nwsirius_IEC\applicat\<PROJECT_NAME>
folder and POU structure is saved in a XML file named <PROJECT_NAME>.XML
. The XML format matches PLCOPEN XML standards.
Project tasks configuration can be done in the Configurations
node of project tree.
The template of a new project consists in a configuration part and a Main
POU in structured text format. The project template does not contains hardware
The project settings is the first node of a project tree. The Project Settings dialog can be used to edit or view project specific information like e.g. author name, version, etc.
Part of other project can be imported from the Import... file menu. User can select which part of the project add to the current project. The import function works with the PLCOPEN XML standard XML files.
The programming languages supported by IEC Editor
are mentioned in the IEC standard IEC 61131-3:
The term POU is basically used for all objects which are used to create a PLC program.
POU is the Program Organization Unit of type Program, Function or Function block.
In order to add a POU select an appropriate entry in the Project tree (for example the Program Node), right click and use command New program from the context menu.
The Create a new POU
dialog will open, where you have to configure the POU concerning name, type and implementation language. Notice that the POU type can be changed by the POU Type combo box.
Variables can be defined for each type of POU. Variable can be LOCAL
, TEMP
and INPUT
, OUTPUT
, IN_OUT
for functions and function blocks.
Local variable can be defined NORMAL
, RETAIN
, CONSTANT
. Variables types can be elementary types, user defined data type or arrays.
Along with the standard data types, the user can define his own data types.
Data types can be added to the project via the Add data type command. Right click on the Data types node in the project tree. The data type editor will appear and the object can be configured.
Global Variables are the variables visible by the entire project. They are defined in the Configuration
project section.
Global variables can be normal, RETAIN
or CONSTANT
. Hardware is automatically included in global variables, but they are not shown in the variable panel, in oder to separate the user’s defined global variables to the hardware variables.
Global variables array can not be defined. Array must be encapsulated into a data type, in this setting they can used like external var into POUs.
In the Hardware
tab (Sirius PLC hardware tree) you can map the hardware on which the application is running.
The root node of the tree always is a dummy node called Sirius PLC
that represent the PLC. When a project is created there is only this one and three sub-nodes (hardware groups).
The hardware items name are editable here, right click on node under groups or press F2 button after node selection. Double click on node to open the Hardware
tab in main page.
Configuration is the Project’s section where tasks and their instances are defined. Double click on Configuration
to open the configuration page.
The page allows users to create and configure task definitions and add POUs to them. Task Init
, System
and Slow
are created by default and can not be deleted.
To create a new Task just press the Add cyclic task button, then configure it.
To append POUs to tasks, select a task, select a POU from the “POUs” combo, then press Add.
To remove a POU, select the POU from the list and press Remove.
Use move up or move down to change the order of execution of pous.
Values from bus (ie: canopen) are setted in the System Task (2 ms). If the values are used in a 10 ms task they can be changed. To use a stable value, store the field into a variable at the beginning of POU. Then use it.
The editor user interface is organized in five main sections; they can be resized in height and width, but not moved or hide.
The editor components are listed below:
Section | Name | Description |
---|---|---|
1 | Menu bar | Provides menu to manage projects, edit source, find text |
2 | Tool bar | Contains the tools button for project life cycle management, from New Project to Install on target device. |
3 | Structures Panel | Here is possible to see project structure, hardware structure and watch list for debugging. |
4 | Edit panel | Contains tab sheet in order to edit source code |
5 | Footer Panel | Variables, Messages and Find Results are in this pane |
6 | Debug panel | Debug your project on plc or simulation |
See in the following chapters an overview of structure of the main menus and commands contained into the menu bar.
It contains the commands for project managements.
New | Creates a new project. A pop-up window appears, in order to choose the project’s name. A folder named project name is created. Inside the folder are placed the project’s files. the project’s source code is written in a project name.xml file.This is PLCOPEN XML standard file. The project directory is placed into <INSTALL_FOLDER>\nwsirius_IEC\applicat\ .The project can in a single xml file or multiple files, each per POU. Multiple files are simple to merge, if there are many developer to work on it |
Open | Opens a saved project. Source code and Hardware configuration are loaded. To load the project double click on the main xml project file. |
Save | Save the current project into the project’s folder. This command save the source code into project name.XML file. If the "expand project" mode is on, the project is splitted in many files, one per POU. To save the project in a single file, use the "PLC Opne project" mode. |
Save project as... | Create a copy of the current project. A pop-up will appear to choose the project name. All the project files are saved in the new folder and the project main file is renamed with the new project name. |
Import | Import part of a project (POUs) from other PLCOPEN XML file format, The pop-up shows the parts of the chosen project; they can be imported by checking them. If global variables are present, the global vars check box will appear. Checking it, all the global variables of the selected project will imported in the current project. |
Exit | Close the Sirius ES - Editor IEC Editor application. if some modification are made, a pop-up inform you, to save them or not. |
Contains commands for editing operations.
Copy | Copy selected source code to clipboard |
Paste | Paste from clipboard |
Cut | Copy to clipboard and remove the selected code from source |
Project Settings | Opens the project settings windows (like double click on project settings into the project’s tree). |
Show mode | Set the type of data visualization in the watch tab, data can be shown as decimal, binary or hex. |
Contains commands for finding and replacing source code.
Find... | Allow to find text inside source code. From the “Find” window you can insert the text to find and specify if search only in the current document or in the entire project. Case Sensitive and Whole Word Only parameters can be set for filtering the search. Matching cases are listed in the Find Results tab. Pressing F3 key or clicking on results, the specific result is highlighted. |
Find in FIles... | Open the same popup of the find command, but with look in setted to "Entire project". |
Replace... | Specified text will be replaced with another. Case Sensitive and Whole Word Only parameters can be set for filtering. The prompt allow you to accept current replace, replace all or cancel the replacing operation. If Entire Project is checked, prompt on Replace are unavailable. |
Tools to manage projects and PLC.
HMI configuration (simulation only) | Open the HMI configuration window. User can set the user interface (.UI files) selecting it with the “Open file” and screen dimensions. These fields must be filled to run the HMI interface. |
Zoom Hint window | When the Hint window is shown in the text editor, the user can maximize the window to see it from a distance (if the plc is not near the computer). |
Import eds file | Allow you to import an eds file into repository, for Can Nodes configuration. Select an eds file from disk then click the “Open” button. A message box will appears on success. |
AutoIndent | Enable / Disable editor text indentation. Reopen editor form to take effects |
Keep caret X | Enable / Disable editor text caret x keep position, used to move the cursor accross rows in different modes. Reopen editor form to take effects |
Sort structures | Reorder the watch list fields and the hardware ascending |
Smart tabs | Used the tab key similar to space, (1 step) |
Lowercase autocomplete | Datatypes created by the program are usually in uppercase. With this, the autocomplete code is in lowercase expect the user defined fields. |
Extract EDS parameters | Allow user to choose an EDS file previously imported and extract from it the parameter list inside “Manufacturer object” group. |
Expand project / PLC Open project | Used to select the project saving method. Use expand to save project in multiple XML file (one per POU). Use PLC Open mode to save the project into one standard (PLC Open standard) XML file. |
Verbose Can Tracer | Add more informationn about TX/RX in the Can Tracer |
Silent Messages | Reduce the number of PLC's error message shown in the message tab. When the editor IEC ask something to PLC, some messages (and errors) are displayed into popup windows. To disable popus, check thesilent messagesand all the messages are written in the message tab instead of popup. |
Re-calibrate target | Launch the touch-screen calibration program on the selected ip address |
Reinitialize "Retain Variables" | Reset Retain variables of the selected IP Address |
Reboot PLC | Send the "reboot" command to the selected IP address. |
Read board S/N | Read the serial number of the board of PLC with the selected IP address. |
Delete remote working dir | If the plc responds to the selected IP address all the content of the PLC directory (/SiriusApplicat) will be deleted. |
This menu is enabled only if connected to PLC (target or simulation).
Console | Used to send LINUX command to the PLC. Commands must be terminated by themselves because they can not be killed (like TOP). Command output is shown in the message tab. In the example “LS /SiriusApplicat” command is sent to simulation, the result is the LS of project’s folder content. |
Save values | Save all the variable values used by the PLC. A “save as” form allows user to choose destination file. It creates a text file with VAR_NAME VAR_VALUE |
Send values (safe) | Load from file variable’s values and sends them to PLC after pausing it. After this operaton PLC will be restarted. |
Send value (on fly) | Send values to PLC without pausing it. To use with a limited number of variables. |
Cpu usage statistics (Real time) | Monitor the CPU usage when connected to target (not simulation). |
Cpu usage statistics (User space) | Monitor the process executed on PLC in the user space |
Cpu Info | Show information about the CPU |
Pause PLC program | Pause the execution of the IEC program tasks. Thw PLC is running but the IEC tasks will not executed. |
Restart PLC program | The IEC tasks run again. |
Commands for getting on line help and informations.
Help online... | Link to this site. |
About | Informations about the IEC Editor, Designer, core, hmi... |
See in the following paragraph an overview on the buttons contained into the tool bar.
New | Create new project, the same function of menu file item “New”. |
Open | Open saved project, the same function of menu file item “Open”. |
Save | Save current project, the same function of menu file item “Save”. |
Platform: | Select the target platform in order to select the right compiler to generate code. Once selected the platform, select the compile mode. |
Compile: | Select the mode to compile the project. Simulation build a Windows EXE to run the code on your PC. Target build for the specified platform. If Simulation is selected, the target IP Address is forced to 127.0.0.1 (localhost) on order to connect the editor or HMI to the simulation. If Target is selected, Target IP comboBox is enabled to choose the real target IP address. |
Build | Used to build all the project. Perform a clean of all the files and recompile them. In the Message tab, operations are listed. |
Cancel build | Used for abort the project building. |
Install | After building the project, you can install generated code on a removable device (like USB pendrive). Atfer choosing device, code will be copied to this. |
Sync | Deploy the application into the connected target device using Network. This is an in-line operation |
PLC | Launch the PLC simulator. |
HMI | Launch the HMI user interface on desktop (like simulation). |
Connect | Connect the editor to the target device, using the specified IP address. After connection established, Project can be debugged. |
IP Address Text Box | The target device IP address. 127.0.0.1 is the IP address of simulation. |
Connection status | The circle led represent the target connection status. - Grey: not connected - Blink Red: is trying to connect - Blink Dark green/Ligth green: is connected to target device. - Blink Green/Yellow: is connected to target device with PLC program paused. |
Start/Stop TRACE | Start and stop the variable data logger/oscilloscope. The button is enabled when connected to simulation or PLC |
Start/Stop CAN | Start and stop the can channels analyzer. The button is enabled when connected to simulation or PLC |
PLC Messages status | Blink red when there areunread messages in the Plc Warning Tab |
Contains tabs that include the Project tree, Hardware Tree, Variables watch list and Tracer.
In the project tab, the project’ structure is shown. The root node is the project name, its child represent the main parts of the project. The possible operations in this section are executed by Double click or Right Click on nodes.
Double click to open a pop-up window with project settings and informations. The same popup from the Edit -> Project settings menu.
Double Click to create data types in textual mode A text editor form appears.
Data types created with the EDS editor.
System Data Types used in some Function blocks or by the user.
Double Click to explode nodes structures, Right Click to add POUs or add folders.
Is possible to rename, cancel folders inside this three nodes. Only one level of folders is permitted.
For POUs of the same type, is possible to drag& drop between folders.
A level below, there are data types, POUs, and the configuration conf1.
Double click on them to open in the editor pane.
This is the hardware configuration. The root node is the Sirius PLC. When a project is created, the hardware tree is empty (only root).
To add hardware, right click on root or node, the click the type of hardware you need, if there are multiple choice, a pop-up window can be appear to select hardware items.
Local I/O represent the Sirius PLC board type. It maps I/O pins.
CAN channels contains the can bus of the hardware.
Under a can channel is possible to add CAN Nodes inheriting properties from their parent.
Axis represents the total of axis. One or more Axes can be associated to a peripheral.
After configuring hardware, your tree can be as shown below.
Right click on node to show the context menu; then Add, Rename, delete or copy (if possible) the selected item. When node is selected, press F2 button to rename it or Del to delete it.
To show the hardware properties, double click on nodes to open the “Hardware” tab in the editor pane.
Watch tab is used to monitor variable values during the program execution. This is possible with PLC simulation or real target device (Connect to target clicking the Connect button in tool bar).
Variables can be added to watch list after connecting to PLC.
The values can be edited to change the plc values runtime; for bool values type 0/1 or true/false or duoble click on variable name to toggle the value.
Is possible to create groups for variables organization. It also possible to filter variable from the text field. Right click inside watch tab to add groups.
Then type the group name.
To add variable in the created group, select it and "add" the variable.
If target is connected, variable can be added to watch list from the Variable panel. Right click on variable name, then click “Add to watch” to attach variable to the watch list. Is possible to add variable from the editor pane.
If POU is in structured text, right click on var name and click “Watch variable” to append its.
The “Get name” option copy to clipboard the runtime full name of variable.
“Watch all POU variables” add to watch list all the variables used into POU, locals and globals.
If it’s a ladder POU, CRTL + Left Click to append variable into watch list. When PLC is connected, variables value will be filled with runtime values. You can set values by editing the “value” field.
Watching variables can be done with different format, just click Edit menu, select Show mode and change the values format (Decimal, Binary or Hex)(See Menu bar -> Edit menu).
Right Click on watch list node to show its context menu
Delete the variable, POU or group from watch list.
Copy the variable full name to the tracer, To monitor the value with the oscilloscope
Copy the variable’s full name to clipboard. IE: FIRST will be copied like RES1__TASK10MS_MAIN.FIRST
Tracer tab is the monitor of variables and can channels.
There are two inner Tabs: Oscilloscope and Can-Bus.
The first one contains a simple data logger to monitor variables. It can record variables data (max 10 variables) to a maximum of 1000 samples for each variable.
The tab Can-Bus shows the jittering for all 4 can channel supported.
Is possible to filter each can channel by Node Id and COB-ID to show only the desired data.
Byte and type fields are used to cast data in a specific IEC format. From the selected byte, the other byte are visualized in specified data format (IE: WORD, REAL LWORD...).
Trace 1 to 10 are the variables slot to sample. The name must be the runtime name of the variable, like the watch tab.
Show grid enable/disable the yellow vetical bar on the traces.
Trigger is a boolean field that can stop recording when the specified boolean variable is set to true.
Rate is the sample timing. It tell to the system when sample variables, with multiples of realtime Timing specified in the configuration form.
Rate * Realtime timing = Sample timing.
The TRACE button in tool-bar is enabled when IEC Editor is connected to PLC (or simulation). Pressing the button, the system starts to record, Pressing again, it will stop and show results in the Tracer form.
The value on right tells the number of recorded milliseconds. The system can record
The form shows the variables values in the sampled record.
In the bottom tab there are information about variables: the minimum and the maximum values are fixed; Selected changes when the cursor (vertical yellow bar) is moved with mouse or arrow keys. It shows the value under cursor.
Timing is the absolute time of machine since last power on.
The tracer can save 1000 sample for each variable; after that, older sample will lost. System records until it’s out of memory
Using CTRL+Mouse wheel, the oscilloscope can zoom in or out.
This is a CAN channels monitor. it shows all packet sent and received from/to Can nodes. Sync difference shows the time in seconds from a packet to another of the same type.
The “edit panel” contains all the tabs to insert, edit and show data and source code.It can contains different types of forms, linked to the type of data to shown or section selected. The edit panel can contains the form listed below:
The hardware form contains all informations of the hardware tree node selected. Double click on hardware tree node to open it (see image below).
The InitValue column is editable. User can customize hardware. Initial values are saved into the project.
If selected node has children and them have the same field, the modified value is inerithed from children’s fields
You can filter properties by name writing text in the search box, on the top of tab.
When the IEC Editor is connected to Target or Simulation, the RuntimeValue column is filled with real values.
User can change values of InitValues and RuntimeValues by editing column cells. InitValue can be edited only when disconnected (must be build or make to modified values taking effect), RuntumeValue only when connected to PLC.
Once a target is added, is possible to configure it double clicking on it.
A form appears to manage Pins configuration.
Select the use of pinout you need.
For using Analog inputs like digital inputs, use the DI_STRUCT fields, for analog use the AI_STRUCT fields
If you need analog input with current, only AI_STRUCT can be used.
Allows to configure each can channels
CHannel can be 0 or 1.
Cob-id can be specified for each channel. Default is 127.
Baudrate is the channel speed. Choose between 125-250-500-1000 bps.
Can TIc is the counter for the sync message.
From the system time (fast task) every can tic the sync message is sent.
Sync time = system time * can tic.
Sync enable / disable the sync message for nodes.
Preamble:
"Bus Load is too high" means that the controller fails reading/writing through the bus,mainly due to:
Cables are not correctly connected from client to server side | Wrong slots,the cable is notwired correctly |
Too much data is mapped, cycle time is notenough | Increase "CANBAUDE" increase "Task_System" time |
Bad wiring or electrical noises | |
Invalid bustermination resistors | Measuring from "CH" to "CL" wires the value of electrical resistance should be +/- 60 Hom Nn higher value means that probably does not have any slave termination A lower value meansthat probably have more than one slave termination Cable is not wired correctly |
ERRORRX | One or more mapped TPDO was not received The bus load is too high (see "Preamble") Client is bad configured or does not have this entry |
TXFQFULL | Outgoing CAN message was not deliverd to client CAN BUS status is in "Bus Off" or in "Passive Mode" Bus load is too high (see "Preamble") Bus controller is busy, look at "IF_COMR_BUSY" value |
CANRXERR\CANTXERR | Bus load is too high (see "Preamble") |
CANTXERRCNT | Count of how many times CANTXERR reach a bad value |
BUS_STATUS | Bus off, electrical problem Warning, delay flushing read/write queue Passive mode, disconnected cable Additional error infos stuff form ack, bit1, bit0, crc |
REGISTERBUF | Passive mode error counter |
STATUS_BOFF | Bus off error counter |
STATUS_EWARN | warning" error counter |
STATUS_EPASS | Passive mode error counter |
IF_COMR_BUSY | Hardware controller has trouble |
LOST_MSG_OBJ | Something goes wrong receiving messages |
STATUS_KO | Flag to signal that the bus has errors |
TX_BUFFER_KO | Flag to signal that the there are errors flushing outgoing data |
RX_BUFFER_KO | Flag to signal that the there are errors flushing incoming data |
QUEUE_SIZE_OUT | Actual size of theout going queue |
QUEUE_TAIL_OUT | Counter of how many times the out going queue was full |
QUEUE_SIZE_IN | Actual size of the incoming queue |
QUEUE_TAIL_IN | Counter of how many times the incoming queue was full |
CAN Node
If the selected node is a CAN node, the EDS configuration tab will appear.
The EDS (electronic data sheet) configuration tab allow user to configure a can node by an eds file.
To configure node from eds, first import the eds file from Tools -> Import eds file... Menu.
Once imported, click the “Browse” button from form to choose the file and load it.
Once selected the file, the system loads information from it and fill fields with default value.
The form contains four inner tab, used to configure node communication from/to PLC.
Node Settings
The tab contains general information about node configuration. The form blocks will be enabled if the relative sections are present into eds file loaded.
Node IDisconfigurable from this form or from the general informations tab.
Startup checks Vendor, Hardware and Firmware are enabled if the node supports them (and the eds file contains these informations)
Default transmission type combo contains value from 0 to FF; if selected the value is used to configure the PDOs settings.
Sync time is calculated with TaskSystem Timing and and CanBus CanTic value. If this value is empty the system use 1 by default.
Heartbeat and Nodeguarding are not choosable both. If one is selected, the other one will be disabled.
If in the file Heartbeat consumer times are present, the system shows the consumer table to set each value.
Emergency is enabled if configured in eds file.
Pdo mapping
In this tab, RPDO and TPDO can be configured
The form presents the PDO mapping configured in loaded file. Is possible to modify the mapping, adding and deleting object from PDOs, and changing their properties.
Checking the PDO will be enabled for the node. To disable PDO, just unselect it.
To change the PDO properties, first select a PDO, then click the “PDO properties” corresponding button (RPDO or TPDO). A pop-up is opened to customize selected PDO
Is possible to modify the base offset in order to generate a COB-ID with the selected NodeId (auto generating COB-ID is valid for the first four RPDO / TPDO)
The system can use more than four PDO, if configured correctly.
Transmission type is inherited from the Node settings Tab; it can be modified for each PDO.
To add a new mapping, click the corresponding button:
Once selected in tree the correct object, click OK to add mapping to the selected PDO.
If a special mapping is needed, or the desired object is not present, is possible to edit the selected object before click OK. A custom mapping will be added to PDO.
Once mapping is created, it appears in the PDO structure. The PDO max length is 64 bit, if the sum of the lengths exceeds max length, a message tell the configuration error.
Is possible to create custom RPDO/TPDO clicking the ADD buttons. A form appears to configure new PDO.
Insert the PDO index, description, offset to calculate COB-ID and the transmission type.
To delete PDO or mapping, select the item and press the corresponding “Delete” button. If the selected item is PDO, all its mapping are deleted.
After some modifications, if the result is a mistake, is possible to reset all the RPDOs / TPDOs with the default eds configuration. Press the corresponding Reset button to reinitialize the PDOs.
If error occurred on COB-ID values, the system show the errors in red. And a hint window tell which error is occurred.
SDO
The SDO tab contains the SDO list to configure the node. PLC sends to CAN Node the SDO informations, in order to initialize it. Is possible to Add SDO directly to the list, choosing them to the Objects Dictionary or creating SDO manually.
To add a new SDO click the “Add” button: the object dictionary pop-up allow to select an object in order to append it to list. Is not possible to modify items with this form.
To add a custom SDO, click the “Add custom” button; With this form is possible to create an SDO and after to append to the list.
Notes
A text field used to save notes and comments about the node.
To save the node configuration click the “Save changes” button in the on the top of the eds Form. It save a configuration file and associate it to the node. The file name is visible in the General informations Tab of the node (FILENAME field).
If at least a PDO is selected in the PDO tab (and it has mapping), a window with the variable and data-types structures to be created appears.
Names and types can be modified; the structure hierarchy will be updated with new names and types.
Data types can be divided into two sub types (ie. a WORD can be divided into 2 BYTES) and two adjacent equals types can be collapsed into a bigger one (IE two WORD became a DWORD)
To Divide collapse, right click on elementary type nodes.
If a Mapping node would be changed, left click on it and a combo box will appears to choose a possible types.
If a data-type is already created for the same index and bit size, it will appear in the combo.
To create a custom data-type select “New data type...” from combo box.
A pop-up allow user to insert the data-type name.
Once the name is verified, the new structure is added to data-type’s tree view.
Clicking “Save structures” button, the system creates all data-type and variables present in tree view. If in the project there are items with the same name, they will be replaced with these new items.
Click “Default structure” to reset to the structure proposed by the system.
Click "Cancel" to abort the structures creation and configure them manually. This operation in very important and for expert users.
If a previous saved structure is modified manually, the Structure form try to adjust the current data types to the new one.
If the number of bytes in the saved data type is smaller than the new one, DUMMY FIELDS will be added to fill the new structure.
If the saved is bigger than the new one, fields at the and of data type will the removed, and then filled with dummy match the new structure.
Then the merged structure is shown. The user can modify it and save.
If node RPDO/TPDO variable are already present, when the Save configuration button is pressed, the system load the saved data-types and merge the generated structure with them.
Some field can be deleted to match the PDO size, and some dummy field can be added for the same reason.
If the structure is with too many mistakes, it can be reinitialize with the Default structure Button. Clicking on it, the structure will be only the auto generated and user can modify/save it.
The AXIS_REF represent a axis of CNC or MOTION
A AXIS has the property listed below:
ABPID | BOOL | if true the axis in in close loop control | RO |
ABPROF | BOOL | axis is moving or not | RO |
ABSOFF | REAL | internal use only | RO |
ABSPOS | LREAL | absolute position of the axis | RO |
ACC | REAL | acceleration of axis UNIT/SEC2 | RW |
ACTSPA | REAL | calculated position by profile generator | RW |
ACTSPEED | REAL | internal use only | RO |
AO_RES | REAL | analog output resolution | RW |
AUXSTT | INT | internal use only | RO |
AXISIDX | INT | index of the axis, used for map the cnc axis | RO |
AXISNAME | STRING | name of the axis | RW |
AXIS_ERRORID | INT | error code | RO |
AXIS_ERRORSTR | STRING | error description | RO |
COE_ENC | LREAL | encoder coefficent unit = COE_ENC * ENCODER_PULSE | RW |
CURRENT_FB | STRING | PLC Open state machine description, see diagram below | RO |
DEC | REAL | deceleration of axis UNIT/SEC2 | RW |
DELAYPROBEOFF | INT | used with MC_HOME function block | RO |
DIFPOS | LREAL | derivative position on system task | RO |
DIRECTION | INT | internal use only | RO Used into MC_CAMIN |
DRVOK | BOOL | external drive status | RW |
ENABLEPOSITIVE | BOOL | internal use only | RO |
ENABLENEGATIVE | BOOL | internal use only | RO |
EN_ENC | BOOL | enable encoder reading | RW |
ERRDIN | REAL | maximum error tolerated by PID, 0 is disabled | RW |
ERRPID | REAL | difference between ACTSPA and ASBPOS | RO |
FCFW | BOOL | hardware limit switch pressed = true | RW |
FCRV | BOOL | hardware limit switch pressed = true | RW |
FKFFA | REAL | derivative factor of PID | RW |
FKIA | REAL | integral factor of PID | RW |
FKPA | REAL | proportionalfactor of PID | RW |
FLSIA | REAL | internal use only | RO |
HOMESTT | INT | internal use only | RO |
INTRATE | INT | used for cubic calculation, 0 = cubic disabled | RW |
ISTPOS | REAL | position hysteresis | RW |
JERK | REAL | jerk of axis UNIT/SEC3 | RW |
MAXACC | REAL | maximum acceleration/deceleration tolerated | RW |
MAXJERK | REAL | maxjerk acceleration value | RW |
MAXSPEED | REAL | maximum speed value | RW |
MODEPROF | INT | PID mode 0=feedback, 1=velocity (ERRPID not used) | RW |
MODULE | REAL | axis encoder module | RW |
MOTION_STATE | INT | internal use only | RO |
OFSPOS | REAL | offset position | RO |
OUTI | REAL | internal use only | RO |
POSFW | REAL | software limit switch 0=no software limit | RW |
POSRV | REAL | software limit switch0=no software limit | RW |
PROBEOFF | BOOL | used with MC_HOME function block | RO |
REALSPEED | REAL | actual axis speed UNIT/SEC | RO |
RECVPOWER | BOOL | drive powered ON | RW |
RECVRESET | BOOL | drive not in fault | RW |
REF_TO_LREF | ANY | Ref to analog output variable | RO |
REF_TO_RAWIN | ANY | encoder in address | RW |
REF_TO_RAWOUT | ANY | encoder out address | RW |
RELPOS | REAL | ABSPOS + OFSPOS | RO |
RELSIGN | BOOL | ofspos added or substrated from abspos 0=ABSPOS\OFSPOS,1=OFSPOS\ABSPOS, | RW |
SEGTIME | REAL | used for cubic calculation | RW |
SENDPOWER | BOOL | set to true by MC_POWER see diagram below | RW |
SENDRESET | BOOL | set to true by MC_RESET | RW |
SIMUL | BOOL | axis in simulation | RW |
SPEED | REAL | internal use only | RO |
STTJERK | INT | internal use only | RO |
TIMPOS | INT | timeout final position | RW |
TIMPOSOK | INT | time to stay into ISTPOS | RW |
VERBOSE | SINT | verbose level 0=none 1=critital 2=all messages | RW |
ZEROACC | REAL | used by MC_HOME | RW |
ZERODEC | REAL | used by MC_HOME | RW |
ZERODIR | BOOL | used by MC_HOME | RW |
ZEROED | BOOL | used by MC_HOME | RW |
ZEROSPEED | REAL | used by MC_HOME | RW |
ZEROLSPEED | REAL | used by MC_HOME | RW |
POUs can be defined in differents programming languages; ST (Structured text), IL (Instruction List) and LD (Ladder).
ST and IL are textual editor, LD has a specific form for creating Ladder Diagrams.
The Structured Text form is a text editor, that allow users to write code for programming PLCs.
The form contains buttons for printing page and manage find results (Next and Previous) The block button opens a pop-up window for inserting code blocks (also used for LD programming).
If the POU is program or function block, the instance name is visible (blinking black/red is not filled). If it is a function, the form show the return type of it.
The variable tab shows the local variables (local, in, out, inout, temp)of the selected POU.
Clicking on “Insert block...” button, The block properties form is shown.
On top, instance name (to fill if the selected item is a function block) and number of input can be specified for many functions, if the function is extensible and if using outputs or not.
On the left it contains a list of available function and a search field for filtering functions/function blocks and the example code.
In center there is a graphical representation of selected function (used in Ladder diagrams).
On the bottom there are description and examples of code for the specified function.
From the image example, Concat function in selected, when press of this code will be added to source, just assign it to a variable and replace the comment with input values (example in structured text).
:= CONCAT(IN1 := (*ANY_STRING*));
The editor form has auto-complete function: press CRTL+SPACE to open a contextual window in order to choose variables; when typing characters, the pop-up content will be automatically filtered.
CRTL+Mouse wheel to zoom in or out.
When connected to PLC, is possible to change variables value directly from editor form.
CRTL+double click , toggle values if the variable is boolean, or shows a pop-up for inserting the new value.
The Ladder Diagram is a graphics oriented programming language which approaches the structure of an electric circuit.
The Ladder Diagram consists of a series of networks, each being limited by a vertical current line (power rail) on the left. A network contains a circuit diagram made up of contacts, coils, optionally additional POUs (boxes) and connecting lines. On the left side there is one or a series of contacts passing from left to right the condition "ON" or "OFF" which corresponds to the Boolean values TRUE resp. FALSE. To every contact a Boolean variable is assigned. If this variable is TRUE, the condition will be passed from left to right along the connecting line. Otherwise "OFF" will be passed. Thus the coil(s), which is/are placed in the right part of the network, receive(s) an "ON" or "OFF" coming from left and correspondingly the value TRUE or FALSE will be written to an assigned boolean variable.
Click the “New rung” [F2] button to add a new diagram block.
“Delete selected item” [F3] button cancel the selected component. (Delete the current RUNG if no component is selected)
“Move up/down rung” [CTRL+PGUP] [CTRL+PGDN] buttons change rungs order, moving the current one up or down in the form order.
In rung blocks, contacts can be placed by clicking Serial (left or right) or Parallel buttons [F3 .. F5].
To add functions or function block, press the blocks button (serial left, right or parallel) [F6 .. F8]. The block properties form appears; then choose the function needed.
“Negate” [F9] button reverse the contact/coil logic condition.
“Break” [F10] button create an alternative end of rung on the left of selected item (it appends a coil).
The “add coil” [F11] button add a parallel coil at the end of the line.
To edit contacts or coils double click on them; the same operation to edit coils or function blocks and variable blocks.
In contacts, value can be from variables or from structured text expressions (which return true or false).
To add a parallel contact/block on a series of multiple components, select the components you need (Left shift + mouse left button) then press the parallel button.
The variable declaration is the same of other editor.
To edit input/output variables of Blocks, double click on IN or OUT of the block (or double click on variable’s name)
To add a parallel contact/block on a series of multiple items, select the components you need (Left shift + left mouse click) then press the parallel button (Parallel contact [F5] or Parallel Block [F8]).
Figure 2.70 Multiple selection for parallel+
Is possible working in LD editor with keyboard shortcut. Here the keys functions:
Key | Function |
---|---|
RETURN | Edit selected contact, coil or block |
DEL | Delete select items or rung |
F2 | Create new rung |
F3 | Add a serial contact on left |
F4 | Add a serial contact on right |
F5 | Add parallel contact |
F6 | Add a serial left function / function block (opens Block properties window) |
F7 | Add a serial right function / function block (opens Block properties window) |
F8 | Add a parallel function / function block (opens Block properties window) |
F9 | Negate contact or coil |
F10 | Add break coil |
F11 | Add coil |
CTRL + C | Copy rung to clipboard |
CTRL + X | Cut rung |
CTRL + V | Paste rung from clipboard |
CRTL + S | Save project |
↑ ←↓→ |
Move selection inside rung |
CTRL + ↑ | Move selection inside Function’s input-output |
CTRL + ↓ | Move selection inside Function’s input-output |
CRTL + RETURN | Edit selected Variable block (IN or OUT) |
PG ↑ | Select previous rung |
PG ↓ | Select next rung |
CRTL + PG ↑ | Move selected rung UP |
CRTL + PG ↓ | Move selected rung DOWN |
CTRL + Click left | Add to watch variable |
Instruction List (IL) is a textual programming language and is similar to the assembler language. IL code consists of a sequence of instructions separated by lines, which consist of one operator ("command"), one operand (variable, constant or instance name) and one optional modifier respectively. Jumps and labels can be used.
IL uses the same editor rules of ST POUs. With different keywords and highlighting.
The variable declaration is the same of other editor.
The configuration page allow to create tasks and their instances.
There are four type of Tasks: INIT, STARTUP, SYSTEM, CYCLIC and USERSPACE.
To run a POU, it must be added to a task.
The Configuration form defines one or more tasks for controlling the processing of an application program.
To create a new tasks just insert name, type and timing (if enabled); then click add.
Click delete to cancel the selected Task.
Select a task, modify it to change properties, then click apply to save modified task.
There are four type of tasks showed in the table below:
Task Type | Function |
---|---|
Init | Called once when the program starts, used to run setup POUs. |
StartUp | After Init task, the systsm configure hardware (axis, can nodes...) When the Hardware is configured the StartUp task is called to setup the system (or the program) with the corrected hardware IE: axis ID or can nodes initalized. |
System | Real time tasks. It is a deterministic tasks and run into a real time engine. Time cycle time in defined in the “Real time cycle time text box”. |
Userspace (Slow) |
Task with the lowest priority, called every 50 ms if it is possible (minimum time) |
Cyclic | Cyclic Tasks are used to run programs, their are NOT deterministic and the time can be slower. It depends of the working load. Time is inserted by the user, must be major and multiple of Real-time time. |
The Real Time Cycle time TextBox is used to set the real time timing. Values must be in the format: T#xxxD
xxxH
xxxM
xxxS
xxxMS
(D
= days, H
= hours, M
= minutes, S
= seconds, MS
= milliseconds). The minimum time value is 1ms
.
Cyclic task time must be greater than Real-time tasks time in order to read/write refreshed PLC’s variable values.
Instances are the representation of a program that run in a specific tasks. To create a new instance, select tasks, and select the program to run; then click “add POU”.
When the project runs, POUs are executed with the selected timing. Realtime instances have the highest priority, Slow instances have lowest one.
Dara type (or structures) are entities that describes a group of basic data types (like BOOL or INT).
Data Typres can not contain function blocks or array.
Data type can be defined by the user; perform double click on “Data Types” node in project tree (or double click on created data type) to open the editor.
It is a simple text editor used to create data types. Keywords are highlighted to help users to write code. After inserting code, press the “Apply changes” button on form or “CTRL + s” button on keyboard to modify the project’s data types.
To delete a data type, just delete text into editor and save.
To undo modification or reload data types, press the “Refresh data” button on form.
Mapping Data Types are the structures created by the Can Node configuration tool, using the eds file. They are identical to the normal data types but used for communication between PLC and Can nodes. They can be modified manually, or with the Can Node Configuration
The editor of this group of data type is similar to the other data type editor, This additionally has the "Delete unsued" button to remove data types without an associated can node.
If you change something in the mapped structure remember to open the relative can node with the configurator and press "Save changes" button, in order to regenerate the sdo list and the node configuration.
This data types are system defined. Can be used by the user but not modified. The editor is in read-only mode.
The footer panel contains four tabs.
Variables tab allows variables managements.
Message tab shows the system’s output messages
Find results contains a list of rows that matches with the find criteria.
Tracer tab shows the variable’s values in time.
Variable can be defined in this tab. There are two ways to declare variables: in Table mode with guided windows, or in textual mode by writing code.
This tab is visible only if Configuration Form or Editor (ST, LD or IL) are visible. In other cases, the tab is not used.
In table mode, to add a variable, click ADD VAR button: a window appears and a single var can be declared. Users have to insert name, type and class. Optionally can be specified if it is RETAIN or not and add documentation.
To create an Array click the ADD ARRAY button, a form is shown to create it. In this way arrays are at least of three dimensions.
To delete variable just select it and press DELETE button,
Up and Down buttons are used to change variables order, to have a custom variable visualization.
The “Get Name” button picks the variable complete name and copies it into clipboard.
To change variable data click on interested column field then modify it.
To switch variable declaration mode, click Text mode button to show the variables editor pane.
The “Clear unused” button, remove all POUs variables declared but never used.
In text mode, the variables declaration is in structured text. To save text, press the Table mode button to switch to the previous mode.
Before changing panel, variables are parsed and if no errors occurred, they are saved into POU structure. To change mode without apply modifications, just press Undo edit button.
In text mode variable can be declared in like the following example (text in {} is option):
VAR
varName {AT %ADDRESS} : varType {:= varInitialValue}; {(* varDocumentation *)}
arrayName {at %ADDRESS} : array [arrayBeginIndex .. arrayEndIndex] of arrayType; {(* arrayDocumentation *)}
END_VAR
In text mode array dimensions are not limited to three like table mode. Array initial values are not supported.
It shows all the messages from the system.
This tab is used for building errors and outputs, Sync with target,
After use the find functions, all matched results are listed here. This tab tells to user where the string searched is located: Configuration (global variable), Data Type or POU. In case of POU, POU name and rows are specified.
Double Click on a row to go on source code in editor form.
The tracer results tab work with Oscilloscope and shows variables value in time. Minimum and maximum values reached are listed into table with the actual value. This field changes when user move the cursor on oscilloscope. The timing column represents the elapsed time (from the boot of target) in seconds of the sample.
The debug panel enable the use of debugger in simulation or on target.
// TO BE DEFINED