akYtec ALP Programming software for akYtec programmable devices User manual ALP_2020.07_V17_EN © All rights reserved Subject to technical changes and misprints akYtec GmbH · Vahrenwalder Str. 269 A · 30179 Hannover · Germany · Tel.: +49 (0) 511 16 59 672-0 · www.akytec.
Contents 1 2 3 General ............................................................................................................................................................4 1.1 Abbreviations and terms ...........................................................................................................................4 1.2 About software ..........................................................................................................................................4 1.
4.7 4.7.1 Input calibration ................................................................................................................................35 4.7.2 Output calibration .............................................................................................................................35 4.8 5 6 Change target device ..............................................................................................................................36 Variables ........................
7.2 Using of text field .....................................................................................................................................74 7.3 Using of variables ....................................................................................................................................75 7.4 Using of constants ...................................................................................................................................76 7.5 Using of delay lines .....
General 1 General 1.1 Abbreviations and terms Abbreviations and terms used in this manual: Table 1.1 Abbreviations and terms Explanation ALP Programming software FBD Function Block Diagram is a graphical programming language Function Structural unit of a program with one return value. The function does not store information about its internal state, i.e. if the function is called with the same input values, it will return the same output value.
General Keyboard and mouse Screen resolution 1024x768 Recommended hardware requirements: 3.2 GHz processor 4 GB RAM 200 MB available hard disk space Free USB port Keyboard and mouse Screen resolution 1280x800 Internet connection is required for: Software update Device firmware update Slave device template download Macros download in Component Manager akYtec GmbH · Vahrenwalder Str. 269 A · 30179 Hannover · Germany · Tel.: +49 (0) 511 16 59 672-0 · www.akytec.
User interface 2 User interface Fig. 2.1 1. Title bar – shows the name of the software and the path to the open project file 2. Menu bar – consists of the following groups: File, View, Device, Service, Plugins and Help 3. Toolbars – Standard, Service and Insert: quick access to the essential functions of ALP 4. Library Box – a panel that displays all the functions, function blocks, and macros that can be added to the project 5.
User interface Open project Open a previously saved project Save current workspace Save the currently opened workspace Save project Save the current project Save project as… Create key file… Make a copy of the project in a different folder or with a different name Create a file with a key to protect the project from unauthorized access (in development) Project information… View and modify the information about the project (sect. 3.6) New macro… Open the new macro in the separate workspace (sect.
User interface Table 2.3 Menu Device Transfer application to device Firmware update… Device information Variable table… Calibration… Configuration… Port settings… Upload the current project to the device memory (sect. 3.7) Update the firmware of the connected device (sect. 3.8) Information about the software, the target device and the connected device (sect. 3.5) The editable table of the project variables with their parameters (sect. 5) Start calibration (sect. 4.7) Device configuration (sect.
User interface 2.2 Toolbars Table 2.6 Standard New project Open a new project. The current project will be closed.
User interface Variable, which value can be written in the program (sect. 7.3) Variable, which value can be read in the program (sect. 7.3) Variable output block Variable input block Constant block Constant value (sect. 7.4) Delay line Feedback with one-cycle delay (sect. 7.5) Network variable output block Network variable input block Block WriteToFB Block ReadFromFB Conversion to BOOL Conversion to INT Conversion to REAL 2.3 Variable, which value can be written via network (sect. 7.
User interface Fx – LED indicators The numbers (x) correspond to the ordinal numbers of physical I/O points of the target device. I/O points can be moved up and down along the workspace by drag-and-drop. Fig. 2.8 Table 2.7 Workspace toolbar Show / hide grid Show / hide vertical and horizontal rulers and a grid in the workspace. If the grid is visible, the blocks and connecting lines are snapped to the grid.
User interface Fig. 2.10 Show all Fig. 2.11 Show grouped Click the icon Show grouped to show the blocks of the selected library grouped (Fig. 2.11). Double-click the folder to open it. For descriptions of the library groups and individual blocks see sect. 6. 2.5 Property Box The panel Property Box is used to view and modify the parameters of the program elements. Select the element to view its properties. The standard position of the panel is the lower right window corner (can be changed).
User interface The parameters of the selected display form are shown in the lower part of the panel. To program the selected form, open it in a separate workspace Display Editor (Fig. 2.16), using the context menu or doubleclick the form in the group (Fig. 2.15). The workspace shows the selected display Fig. 2.14 form with the icons on the right of it, which are used to change the number of the displayed rows. The rows displayed first are bold outlined. For working with Display Editor see sect. 8.1. Fig.
User interface Table 2.8 Editor toolbars Common Save workspace Zoom Zoom out by 10% Original size Zoom in by 10% Select scale Display form Add display form Delete display form Fig. 2.17 Structure Editor 2.7 Status bar Status and error messages are displayed in the left field of the status bar. Besides that the status bar contains different status indicators that show information about the memory usage of the target device (resource indicators), status of the connected device and the programming interface.
User interface 2.8 Variable Box The panel Variable Box shows the project variables from the variable table. The standard position of the panel in the upper left window corner and can be changed. You can view the information about the variable in a tooltip text. The variable references are shown as links in the lower panel part. If you click on the link, the block to which the variable is referred is highlighted in the workspace. Fig. 2.
User interface Fig. 2.21 The internet access is necessary for Component Manager to interact with Online Database. The interface has two tabs: Online Database (sect. 2.9.1) and Local library (sect. 2.9.2). Blocks are shown in categories and can be filtered by name. 2.9.1 Online Database Add to project button – the selected blocks (macros or device templates) from Online Database are added to the project library. The blocks are than stored in the project file and can be viewed in Library Box (sect. 2.
User interface 2.9.2 Local library Add to project button – the selected blocks (macros or device templates) from Online Database are added to the project library. The blocks are saved in the project file and can be viewed in the Library Box (sect. 2.4) in the Project Macros (sect. 6.3) area. Import button – the selected blocks are added from a file in the project library. Export button – the selected blocks from the project library are saved as files under the specified path.
Usage basics 3 Usage basics To program the device, proceed as follows: Start ALP Create a new project for the selected target device or open an existing project (sect. 3.3) Save the project on the PC Test and debug the program in the simulation mode (sect. 7.11) Upload the project to the connected device (sect. 3.7) 3.1 Program execution The selected target device determines the number of available inputs and outputs and the availability of a real-time clock.
Usage basics Fig. 3.2 The new project appearance: workspace empty circuit program status bar information about available resources Library Box available program blocks Property Box workspace properties. Circuit program Now you can create the main circuit program in the workspace using the common program blocks from the toolbar Insert and the specific program blocks from Library Box.
Usage basics If the operating system does not find the correct driver, install the driver for PR200 or for the adapter PR-KP20. It can be downloaded from akytec.de. Select the port number in the dialog window Port settings and confirm with OK. All other settings are fixed and displayed only for your information. If the connection is established, the information about the connected device and the serial port is shown in the status indicators. Fig. 3.3 3.4.
Usage basics Fig. 3.5 The window Device Information contains the following information: Target device – the device for which the project was created Connected device – the information about the device connected to the PC Export into project – the button is active only if the device PR114-224.8D4A.4RXXXX is connected. It can be used to export the real output types of the connected device into the project.
Usage basics Proceed as follows: connect the device to PC power on the device adjust the port settings if necessary upload the project to the device The project can be uploaded to the device using the menu item Device > Transfer application to device or clicking the icon in the toolbar. When the upload is completed, the device can be powered off and disconnected from the PC. Fig. 3.8 If the target device does not match the connected device, a warning message will be displayed.
Usage basics Fig. 3.10 Click Select to confirm the selection and start the update (repair) process. The message about the update result is shown upon the update completion. 3.8.1 Forced firmware update / repair If the firmware is damaged (see respective user guide, table “Error indication”) and device automatic recognition is not possible, a forced firmware update should be used. Proceed as follows: 1. set the device in the forced download mode (see the device user guide) 2.
Device configuration 4 Device configuration The configuration of the device is a part of a project and can be set using the menu item Device > Configuration. The dialog window Device configuration consists of two parts. The configurable parameters of the device are presented in the parameter tree in the left part of the window. The content of a group is presented in the right part.
Device configuration Fig. 4.2 To synchronize the device clock with the PC clock, check the checkbox Synchronize with PC. In this case the fields Date and Time become inactive. To set the device clock to the new values click the button Save in the section Date/Time. Fig. 4.3 Specify the clock error in seconds per month in the field Deviation to set the clock correction. Enter a negative value if the device clock is too fast. Fig. 4.
Device configuration Note: The devices PR110 and PR114 can operate only in the slave mode and only with the PR-MI485 interface adapter. In order to organize data exchange in the network over the RS485 interface, a master device is required. There can be only one master in the network. Cycle time The program execution time (cycle time) is automatically adjusted (auto-tuning) depending on the program complexity.
Device configuration Query cycle can be set for each slave individually. 4.3.2 Add / remove interface If the device has a slot, for which no interface is configured, an appropriate interface can be added using the item Add Interface in the context menu. Fig. 4.7 An interface of the selected type with default settings is added. Depending on device, the interface can be replaced by another type of interface or removed using the context menu. Fig. 4.8 akYtec GmbH · Vahrenwalder Str.
Device configuration 4.3.3 RS485 Interface configuration Fig. 4.9 Interface configuration The type of the interface (RS485), the number of the assigned slot and the mode (master / slave) are displayed in the tree. To establish the connection over the interface, it has to be configured. The parameters of the interface are displayed in the right part of the window. The default value depends on the target device. The parameters Protocol and Interval between requests are only in the master mode available.
Device configuration Fig. 4.10 Master configuration in master mode The added slave device is displayed with its name and address in the tree below the interface. Select a slave to configure it in the right part of the window. The parameters of the slave can be specified in the upper part of the window (Fig. 4.11). To delete the slave, use the context menu or the icon Remove Slave. Fig. 4.
Device configuration Retries, max. – the number of the failed request attempts before query is stopped and the status of the device changes. The valid range is 0…255. Burst request – group request of consecutive registers to increase the data throughput Status variable – select a BOOL variable using the icon tus: o 1 – the device functions properly o 0 – the device is not connected. Start query – select a BOOL variable using the icon o 0 – query disabled o 1 – query enabled.
Device configuration Start reading – assign the BOOL variable for forced reading of the requested variable Start writing – assign the BOOL variable for forced writing of the requested variable Status variable – assign the INT variable to record the error code Comment – the text comment to describe the requested variable To create several variables with the same settings, select a variable and click the icon Duplicate. Fig. 4.
Device configuration Fig. 4.17 Slave configuration in slave mode Select the master in the tree to set the parameters for data exchange. Fig. 4.18 Master configuration in slave mode The common parameters for data exchange can be set in the upper window part.
Device configuration To create several variables with the same settings, select a variable and click the icon Duplicate. Fig. 4.20 Variable duplication Name – the name of the duplicated variable Start number – the initial number added to the name of the duplicated variable Quantity – the quantity of the duplicated variables Address step – the address increment Click OK to add the duplicated variables to the list of variables.
Device configuration The parameter Comment is common for all types of inputs. The text in this field is displayed in a tooltip, when the mouse is over the input in the workspace. The text can be entered in Property Box too. For further details about the configuration of the inputs, refer to the device user guide. Fig. 4.23 PR200 digital input configuration Other input parameters depend on the types of the input and the device. Fig. 4.24 PR200 analog input configuration 4.
Device configuration 4.7 Calibration Only general information about calibration of analog inputs or outputs is given in this section. For detailed information about calibration refer to the user guide of the device. If calibration of analog inputs or outputs is necessary, use the menu item Device > Calibration…. The item is active only if a device is connected. Select the calibration target (inputs or outputs) in the opened dialog. Fig. 4.
Device configuration Fig. 4.28 PR200 output calibration Proceed the same way with the other outputs if needed. The message about the calibration results will appear after the completion of the calibration. Fig. 4.29 4.8 Change target device The target device of a project can be changed using the menu item File > Change target device. A list of devices to which you can transfer the project appears. Select the device and confirm with OK. Check and repair broken links, if any.
Variables 5 Variables To see all project variables, click the icon Variable table. in the toolbar or use the menu item Device > The variables are divided into three groups, each of which has a separate tab in the table: Standard (sect. 5.3) Service (sect. 5.4) Network (sect. 5.5) Standard and network variables can be created, duplicated or deleted. The duplicated variable is a copy of the selected variable saved in the next free register cell.
Variables Used in project Comment 5.2 The variable has a reference to a block in the program The text displayed in a tooltip in the workspace, when the mouse is over the variable Data type The variables of the following types can be used in a program: Boolean (BOOL) Integer (INT) Real (REAL) Note: Different devices can have restrictions related to support of certain types of variables. 1. BOOL A variable of this type has only two possible values: 1 (True) or 0 (False).
Variables To create a variable, select the empty row in the table, enter the variable name and select its data type. Other parameters are optional. The created variable can be used in the project. Use the item Show references in the variable context menu to see where the variable is used in the project. Fig. 5.5 In the dialog window References to the variable select the reference you want to delete and click Delete. To remove the variable from the table, use the item Delete variable in its context menu. 5.
Variables Fig. 5.8 Network variables for master interface Network variables and their references are deleted in the same way as standard variables (sect. 5.3). For more details about network variables for master interface see sect. 4.3.3.1. If the interface is configured as a Slave, all network variables to be requested by the master are shown in one list (Fig. 5.9). For more details about network variables for Slave interface see sect. 4.3.3.3. Fig. 5.9 Network variables for Slave interface 5.
Variables Copy rules for network variables: Only the variables of a slave interfaces can be copied into another project and the interfaces in both projects must have the same slot numbers. The variables of the master interface variables should be created manually. Any register conflict must be resolved manually. akYtec GmbH · Vahrenwalder Str. 269 A · 30179 Hannover · Germany · Tel.: +49 (0) 511 16 59 672-0 · www.akytec.
Library 6 Library If a project is open, the panel Library Box contains the following libraries: Functions Function blocks Project macros Select an icon in the lower part of the panel to show the respective content. The library Project macros comprises the macros that have been created, imported or included to the project from Online Database. View options can be changed using the icons located in the toolbar of the panel. 6.
Library 6.1.1.2 Disjunction (OR) Fig. 6.2 The output Q is True if at least one of the inputs is True. The function OR represents a parallel connection in an electrical circuit. Table 6.2 Truth table I1 0 0 1 1 I2 0 1 0 1 Q 0 1 1 1 Bitwise operation example with integer inputs: OR = 6.1.1.3 0101 (decimal 5) 0011 (decimal 3) 0111 (decimal 7) Negation (NOT) Fig. 6.3 The function NOT inverts the signal. The output Q is True if the input is False and vice versa. Table 6.
Library 6.1.1.4 Exclusive OR (XOR) Fig. 6.4 The output Q is True if only one of the inputs is True. Table 6.4 Truth table I1 0 0 1 1 I2 0 1 0 1 Q 0 1 1 0 Bitwise operation example with integer inputs: XOR = 0101 (decimal 5) 0011 (decimal 3) 0110 (decimal 6) 6.1.2 Mathematical operators There are different operators for different data types: Table 6.5 Operator Addition Subtraction Multiplication Division Modulo operation Power function Absolute value 6.1.2.
Library Fig. 6.6 The output value may not exceed 4294967295 (32 bits). Otherwise the extra bits will be truncated. 6.1.2.2 Subtraction (SUB, fSUB) Fig. 6.7 The function SUB operates with INT variables, the function fSUB operates with REAL variables. The output value Q is the result of subtraction of the value I2 from the value I1. Example 1: Fig. 6.8 If the value I1 is less than the value I2, the output is calculated as follows: Q = I1 + 0x100000000 – I2 0x100000000 = 4294967296 Example 2: Fig. 6.9 6.
Library Fig. 6.11 The output value may not exceed 4294967295 (32 bits). If it does happen, the extra bits will be truncated. 6.1.2.4 Division (DIV, fDIV) Fig. 6.12 The function DIV operates with INT variables, the function fDIV operates with REAL variables. The output value Q is the quotient of the input values, where the value I1 is the dividend and the value I2 is the divisor. If the quotient is not an INT, it is rounded down to an INT. In case of division by 0 the output value is 0xFFFFFFFF. 6.1.2.
Library The output value Q is the value I1 raised to the power of the value I2. Example: Fig. 6.16 6.1.2.7 REAL-Absolute function (fABS) Fig. 6.17 The function fABS operates with REAL variables. The output value Q is an absolute value of the input value. 𝑄 = |𝑉| Examples: Fig. 6.18 6.1.3 Relational operators The relational operators are functions that test or define some kind of relation between two or more values. 6.1.3.1 Equal (EQ) Fig. 6.19 The function EQ operates with INT variables.
Library Fig. 6.20 6.1.3.2 Greater than (GT, fGT) Fig. 6.21 The function GT operates with INT variables, the function fGT operates with REAL variables. The output value Q is True if the value I1 is greater than the value I2. Table 6.7 Truth table I1 / I2 I1 = I2 I1 > I2 I1 < I2 Q 0 1 0 Examples: Fig. 6.22 6.1.3.3 Binary selection (SEL) Fig. 6.23 The function SEL operates with INT variables, the function fSEL operates with REAL variables.
Library Table 6.8 Table of states I1 0 1 Q I2 I3 Examples: Fig. 6.24 6.1.4 Bitshift operators The bitshift operators treat a variable as a series of bits that can be moved (shifted) to the left or right. 6.1.4.1 Shift register left (SHL) Fig. 6.25 The function SHL operates with INT variables. It is used to shift all bits of the operand X to the left by the N number of bits; vacated bits are zero-filled. The result is set to the output Q. Fig. 6.
Library 6.1.4.2 Shift register right (SHR) Fig. 6.28 The function SHR operates with INT variables. It is used to shift all bits of the operand X to the right by the N number of bits; vacated bits are zero-filled. The result is set to the output Q. Example: right shift of the number 152 (decimal) = 10011000 (binary) by 2 bits Fig. 6.29 6.1.5 Bit operators The bit operator treats a value as a series of bits to perform operations on one or more individual bits of an operand. 6.1.5.
Library Example: setting of the 4th bit to 1 in the number 38 (decimal) = 100110 (binary): Fig. 6.33 6.1.5.3 Decoder (DC32) Fig. 6.34 The decoder converts a binary code at the input to a position code at the output. Decoding is carried out bitwise by the logical operation AND with the operand 0x1F (11111b). Table 6.
Library 6.2 Function blocks The library contains the following FB groups: Triggers Timers Generators Counters Control 6.2.1 Triggers RS trigger reset dominant (RS) SR trigger set dominant (SR) Rising edge (RTRIG) Falling edge (FTRIG) D-trigger (DTRIG) 6.2.1.1 RS trigger reset dominant (RS) Fig. 6.37 The output Q is True with a rising edge at the input S (Set) and False with a rising edge at the input R (Reset). The input R has higher priority. Fig. 6.38 6.2.1.
Library 6.2.1.3 Rising edge (RTRIG) Fig. 6.41 Detector for a rising edge The output Q remains False until a rising edge at the input I. As soon as the input I becomes True, the output becomes also True and remains for one program cycle. Fig. 6.42 6.2.1.4 Falling edge (FTRIG) Fig. 6.43 Detector for a falling edge The output Q remains False until a falling edge at the input I. As soon as the input I becomes False, the output becomes True and remains for one program cycle. Fig. 6.44 6.2.1.
Library Fig. 6.46 The output Q can be forced set to True with a rising edge at the input S (Set) and forced reset to False with a rising edge at the input R (Reset), regardless of the states of the inputs C and D. The input R has higher priority. 6.2.2 Timers Pulse (TP) ON-delay timer (TON) OFF-delay timer (TOF) Timer (CLOCK) Weekly timer (CLOCKW) 6.2.2.1 Pulse (TP) Fig. 6.47 The block TP is used to generate one output pulse with the specified pulse duration. Fig. 6.
Library 6.2.2.2 ON-delay timer (TON) Fig. 6.50 Fig. 6.51 The output Q = False if the input I = False. The delay time specified at the input TON starts with a rising edge at the input I. When the time TON is elapsed, the output Q becomes True and remains until a falling edge at the input I. Input changes shorter than TON are ignored. The delay time and the time unit can be set in Property Box. Fig. 6.52 Time range: 0…4147200000 ms or 48 days. 6.2.2.3 OFF-delay timer (TOF) Fig. 6.
Library 6.2.2.4 Timer (CLOCK) Fig. 6.55 The block CLOCK is an interval timer controlled by a real-time clock. Fig. 6.56 The times TH and TL can be set in Property Box. Fig. 6.57 Time range: from 0.00 seconds to 24 hours. If TH < TL, the state of the output Q is as follows: Fig. 6.58 6.2.2.5 Week timer (CLOCKW) Fig. 6.59 The block CLOCKW is an interval timer with the parameter Weekday controlled by a real-time clock. Fig. 6.60 The times TH and TL can be set in Property Box.
Library Fig. 6.61 Time range: from 0.00 seconds to 24 hours. 6.2.3 Generators Pulse generator (BLINK) 6.2.3.1 Pulse generator (BLINK) Fig. 6.62 If the input I becomes True, the block BLINK generates a square wave on the output Q with a period of TH + TL, starting with an interval of the duration of TL, followed by a pulse of the duration of TH. It continues that way until the input I is False. Fig. 6.63 The times TH and TL and the time units can be set in Property Box. Fig. 6.
Library 6.2.4.1 Threshold counter with self-reset (CT) Fig. 6.65 The output Q is of type BOOL. If the number of pulses counted on the input C exceeds the threshold (Setting) specified at the input N, the output Q becomes True and remains for one program cycle. Fig. 6.66 The parameters Setting and State saving can be set in Property Box. Fig. 6.67 Threshold range: 0…65535. If State saving = Yes, the state of the counter is permanently stored in the non-volatile memory. 6.2.4.
Library Fig. 6.69 The input U has higher priority than the input D. The parameters Setting and State saving can be set in Property Box. Fig. 6.70 Setting range: 0…65535. If State saving = Yes, the state of the counter is permanently stored in the non-volatile memory. 6.2.4.3 Threshold counter (CTU) Fig. 6.71 The output Q is of type Boolean.
Library Threshold range: 0…65535. 6.2.5 Analog PID controller (PID) 6.2.5.1 PID controller (PID) Fig. 6.74 Fig. 6.75 The function block PID is used for implementation of the proportional-integral-derivative control. Table 6.10 PID block inputs/outputs Name Type I/O Description Values E BOOL I Enable control (0 = Off, 1 = On). If disabled, the parameter Pwr takes the value of the parameter Output safe state.
Library Access Name Type Description AT completed BOOL Kp calculated REAL Calculated proportional gain Ti calculated Td calculated Values Flag: 0 – auto-tuning stopped 1 – auto-tuning started Property Write Read Box ToFB FromFB 0/1 0…100 REAL Calculated integral time -3.402823e+38… 3.402823e+38 REAL Calculated derivative time -3.402823e+38… 3.
Library Fig. 6.78 Upon completion of the auto-tuning, the new values of the parameters Kp, Ti and Td are calculated and the flag AT completed becomes 1. If Start AT = 0, the flag AT completed = 0 as well. If you set Start AT = 0 before the completion of auto-tuning, the auto-tuning is stopped, the flag AT completed becomes 0 and no new coefficients are calculated. During the auto-tuning, a test signal limited by parameters Output max. and Output min. is applied to the output Pwr.
Library The macro can be saved in the project under another name using the menu item File > Save macro as…. The saved macro is available only in this project. Fig. 6.81 If the macro should be used in other projects, it must be saved as a file i.e. exported, and then imported from this file into another project (sect. 6.3.1). If a macro used in the project is changed, it will be displayed in red in the program and the user will be prompted to update the macro (sect. 6.3.5). Fig. 6.
Library 6.3.3 New macro using main menu Select the item File > New macro in the main menu. Specify the number of inputs and outputs in the opened dialog and confirm with OK. The new empty macro is opened in a separate workspace. Fig. 6.84 The number of inputs and outputs can be always changed using workspace context menu. Fig. 6.85 To remove an input or an output, use Delete in its context menu. The data type for each input and output can be selected in Property Box. Fig. 6.
Library The name is displayed in the workspace tab. It is the name of the macro in the project. The text in the parameter Description is displayed in a tooltip, when the mouse is over the macro in the workspace. The name in the parameter Group is used in the library. If the group name is empty, the macro is assigned to the group Other in the project library. If you set the password for the macro, it will be asked every time the menu item Edit macro is selected. 6.3.
Library o o o o device inputs and outputs service variables network variables PID controller In case the above mentioned blocks are selected, they will remain in the main workspace and will be connected to the corresponding I/O points of the macro. If any WriteToFB / ReadFromFB blocks (sect. 7.7) are assigned to the selected FB, they will be included to the macro, even if they are not selected. If the read/write blocks are selected but not the assigned FB, they will not be included in the macro.
Library Fig. 6.90 6.3.7 Changing I/O points order The I/O points of the macro are placed on the sides of the macro in the order in which they were added, from top to bottom. This order can be changed. This can be useful if you want to place logically related I/O points nearby, or if you want to insert an empty macro into the program and determine the position of its I/O points later, after developing its algorithm.
Library Fig. 6.91 Variable – click Select to select an INT variable from the list and confirm with OK. The display element will move according to the coordinate value controlled by the variable. Length – the number of the reserved characters. The display element occupies one display row in height, its length can be from 1 to 16 characters. o 6.4.1 Text box Text box is used to display plain text. Parameters: Text – text to display. The parameter Length specifies the number of the reserved characters.
Library Parameters: Variable – the reference to a variable. Use the icon able. in the input field to select the vari- Data type – INT or REAL. If the variable has been already selected, its data type will be accepted. Digits – the total number of the displayed digits Decimal digits – the number of the characters after the decimal point: 0…6 characters or Auto for Auto-precision *.
Library Example: To display the variable VAR1, 4 digits with Auto-precision are reserved. The value 1.546745 will be displayed rounded as 1.547. If the value will be changed to 110.478696, it will be displayed as 110.5. 6.4.3 I/O box (BOOL) I/O box (BOOL) is used to display a variable of BOOL type. The value of the variable can be changed with the device function buttons. Fig. 6.97 Parameters: Variable – the reference to a variable. Use the icon able.
Library Fig. 6.99 Parameters: Variable – the reference to a program variable. Use the icon the variable. in the input field to select Row list – the list with text rows. The Text from the row is displayed if the value of the referenced variable is equal to the row ID. The column Characters shows the number of characters in the text. An exclamation mark is displayed near the number if the value of the parameter Length is exceeded. Length – the number of the reserved characters Fig. 6.100 6.4.
Library Fig. 6.102 akYtec GmbH · Vahrenwalder Str. 269 A · 30179 Hannover · Germany · Tel.: +49 (0) 511 16 59 672-0 · www.akytec.
Circuit program development 7 Circuit program development It is recommended to start creating a circuit program with planning. The plan should describe all possible states of the device during operation in form of a mode diagram, a table of I/O states, an electrical or functional diagram, etc. After all the operation tasks are described, the program can be developed using the standard blocks from the toolbar Insert (Table 2.6) and the specific blocks from the project library (sect. 6).
Circuit program development Fig. 7.3 7.2 Using of text field Text fields are used to explain the program. Fig. 7.4 To add a text field to the program, click the icon in the toolbar Insert (Table 2.6), then choose the place for the text field in the workspace and use the left mouse button to draw a rectangle. Fig. 7.5 Fig. 7.6 Double-click the text field to write the text. Fig. 7.7 The parameters of the text field can be changed in Property Box. akYtec GmbH · Vahrenwalder Str.
Circuit program development Fig. 7.8 7.3 Using of variables To add a variable to the program click the corresponding icon in the toolbar Insert (Table 2.6), then click the workspace to place the variable block. Fig. 7.9 Fig. 7.10 To reference a variable to the block use the icon in the row Variable in Property Box. The variable table opens, but only the appropriate tabs in the table are visible. The selection of the displayed variables is determined by the type of the block. Fig. 7.
Circuit program development Fig. 7.13 The information about the error is displayed in the status bar. It is recommended to start programming with the creation of variables in the variable table. If a variable is used more than once in a project, all references can be followed with the item Show references in the variable block context menu. The function is also available in simulation or online debugging modes. 7.
Circuit program development Fig. 7.16 Example: A constant value 1 is transferred to the input I1 of the addition block ADD (Integer). A value from the block output (Q) calculated in the previous cycle is transferred to the input I1 over delay line. Fig. 7.17 Table 7.2 Cycle signal values Cycle 1 2 3 4 5 6 7 8 9 10 I2 0 0 1 1 2 2 3 3 4 4 Q 1 1 2 2 3 3 4 4 5 5 7.
Circuit program development Fig. 7.19 Connect the network variable output block to the desired block in the workspace. Fig. 7.20 If the network output variable block is used for requesting a slave, it receives an additional parameter Write at the end of cycle. If the parameter is set to Yes, the new value of the variable is assigned only at the end of the cycle, when all input variables are already read out. Fig. 7.
Circuit program development Fig. 7.22 The block ReadFromFB is used to read the current value of an FB parameter and use it in the program. The using is the same as of the WriteToFB block. Fig. 7.23 7.8 Conversion blocks Fig. 7.24 Conversion blocks are universal blocks used to convert an input value of any type into a value of a certain type. There are three blocks available in the Insert toolbar (Table 2.6): Table 7.
Circuit program development Fig. 7.26 7.10 Execution sequence Calculation of the values for outputs and delay lines is performed in a certain order. To see this order click the arrow near the icon lay lines or Outputs (Table 2.6). in the toolbar Service and select the De- Fig. 7.27 To change the order, double-click an output or a delay line and enter the desired number. Fig. 7.28 Click the icon to deactivate the edit mode. 7.
Circuit program development Table 7.4 Simulation toolbar Start Start the permanent simulation Single cycle Step-by-step simulation. Click the icon to execute one program cycle. Pause Interrupt the simulation. Click the icon once more to continue the simulation.
Circuit program development Fig. 7.33 If you want to make changes to the program, stop the simulation. Notes: Macros are excluded from simulation. Simulation for macros should be performed separately in the workspace of the macro. Simulation cannot be performed for o blocks without connections with device outputs or a network variables o incorrectly coupled variables o retain variables 7.11.
Circuit program development The online debugging is possible only if: the device is connected to the PC the program in the device and the program opened in ALP is the same the version of the device firmware is compatible with the current version of ALP The online debugging is only available for the main program workspace, not within macros. It is not possible to make changes in the project during online debugging.
Display programming 8 Display programming To determine the displayed information, use the tab Display Manager in the upper left corner of the window. Display Manager (sect. 2.6) is only for target devices with display available. The display can be programmed using one or more display forms with “jumps” from one to another so that the displayed information can be changed by program events (change of variable) or by operator (button event). Fig. 8.1 To open the selected form in Display Editor (sect. 8.
Display programming 8.1 Display Editor A form may consist of several rows, at least two. The operator can switch between them using the device function buttons. A display form is shown in the workspace with icons on the right edge, which are used to change the number of the displayed rows. The rows displayed first are outlined. Fig. 8.4 Put the display elements from Library Box by drag-and-drop onto the form. For more information about display elements refer to sect. 6.4. 8.
Display programming Fig. 8.5 To program the navigation through the display forms using different events, click the icon in the row to display form. In the opened dialog Jump in the section to display form, select the form to which the display should switch if in the Jump condition section specified event occurs. Select the event in the section Jump condition, as a device event or change of a variable by value. Fig. 8.6 A button event can be selected as Device event.
Display programming Fig. 8.9 Jump graphical representation The jump between two forms can occur by several events and the graphical structure can reach a very high complexity. 8.4 Copy / paste display form A display form or a group of forms can be copied and pasted into the same or another project. To copy a display form or a group of forms, use the item Copy in the form context menu and Copy group in the group context menu, as well as the shortcut Ctrl + C.
Keyboard shortcuts 9 Keyboard shortcuts Shortcut Ctrl + N Ctrl + O Ctrl + Alt + S Ctrl + S Ctrl + Р Ctrl + Z Ctrl + Y Ctrl + F7 F1 Ctrl + С Ctrl + V DEL Ctrl + → Ctrl + ← Ctrl + ↑ Ctrl + ↓ Ctrl + wheel up Ctrl + wheel down Description New project Open project Save project as… Save project Print… Undo Redo Transfer application to device Help Copy Paste Delete Increase the element width Decrease the element width Increase the element height Decrease the element height Zoom+ Zoom- Use Menu / File Menu / Fi
Program examples 10 Program examples Two examples with simple tasks explain the creation of a circuit program in the ALP programming software. 10.1 Task 1: Light switch with automatic switch-off The task is to switch the light on for a certain time, e.g. for a house entry. Task definition: 1. The light sensor F1 and the light button SB1 “TIME” are installed in front of the entrance door. 2.
Program examples Fig. 10.2 Input I1 – connected to the light sensor F1 Input I2 – connected to the button SB1 Input I3 – connected to the switch SA1 Output Q1 – output to implement the task points 1-4 Output Q2 – output to implement the task point 5 Program description: 1. If the button SB1 is shortly pressed (< 2 s), the logical AND (D2) is enabled. If the ambient light is insufficient, the first input of D2 is also True and the timer TP “Pulse” (D3) forms a pulse with 1 minute duration.
Program examples Fig. 10.3 10.2 Task 2: Mixer control The task is to implement an industrial mixer with simple control functions. Task definition: 1. Automatic and Manual operation modes are required. The switch SA1 “MODE” is installed to switch between the modes. 2. In Automatic mode the operating cycle can be started with the button SB1 “START” and stopped automatically with the end of the cycle or manually with the button SB2 “STOP”. The cycle duration is 5 minutes.
Program examples Fig. 10.4 Circuit program The circuit program can be implemented in the way shown in Fig. 10.5. Fig. 10.
Program examples If the button SB1 is pressed, the RS trigger D1 becomes True as long as there is no reset signal at the input R. Subsequent signal path depends on the state of the switch SA1 “MODE”: If SA1 is open (Manual mode), the logical AND (D7) and the logical OR (D8) are enabled and the motor M1 (output Q1) is switched on.
Program examples Fig. 10.6 Notes: 1. The remaining two unused inputs and one output can be used for implementation of additional functions. For example, to switch between different time settings for automatic motor operation or to switch other operating parameters of the mixer. 2. The technological cycle of operation can be completely automated by implementation of an incremental counter (CT) to switch off the RS trigger D1. akYtec GmbH · Vahrenwalder Str. 269 A · 30179 Hannover · Germany · Tel.